A premium email platform where your inbox has a price tag
Features • Quick Start • Architecture • Documentation • API
YesReply is a revolutionary email platform that puts a price on reaching your inbox. Users set their own email price (starting at $2, up to $5 for verified profiles), and senders pay to reach them. Recipients earn money for every email received and responded to.
- Set Your Price: Users create a profile with a custom
username@yesreply.techemail address and set their inbox price - Get Paid to Receive: Earn $0.20 immediately when someone sends you an email
- Earn More by Responding: Get the remaining payment (e.g., $1.80 more if sender paid $2) when you reply
- Automatic Refunds: If you don't respond within 48 hours, the sender gets an automatic refund
- Cash Out: Withdraw your earnings to your bank account (minimum $10)
- 🎓 Industry experts and consultants
- 💼 Busy professionals managing inbox overload
- 🚀 Founders and executives
- 📱 Content creators and influencers
- 💡 Anyone who values their time and attention
- 💰 Monetized Inbox: Charge $2-$5 per email based on verification level
- 👤 Professional Profiles: Showcase your expertise, job title, company, and interests
- 🔐 LinkedIn Verification: Increase your price limit to $5 with LinkedIn verification
- 💳 Stripe Integration: Secure payments and cashouts via Stripe
- 📧 AWS SES Integration: Professional email delivery with full threading support
- ⚡ Real-time Notifications: Get notified of payments and new emails
- 📊 Wallet Management: Track earnings, transactions, and cash out anytime
- 🔄 Automatic Refunds: 48-hour response window with automatic refund processing
- 📬 Email Threading: Proper RFC 822 email threading with Message-ID support
- 🔒 JWT Authentication: Secure token-based authentication
- 💾 Transaction History: Complete audit trail of all financial activities
- 🚀 Fast API: High-performance async Python backend with FastAPI
- ⚛️ Modern Frontend: React 18 with TailwindCSS for beautiful UI
- 🗄️ Flexible Database: PostgreSQL for production, SQLite for development
- 📝 Auto-generated API Docs: Interactive Swagger/OpenAPI documentation
- 🔧 Simple DB Management: No migrations - tables auto-create from models
- ☁️ Azure Ready: Optimized for Azure PostgreSQL deployment
- 🎨 Responsive Design: Works perfectly on mobile, tablet, and desktop
- 🧪 Type Safety: Full TypeScript support and Pydantic validation
- Python 3.10+
- Node.js 16+ and npm
- Poetry (Python package manager)
- PostgreSQL (production) or SQLite (development)
# Clone the repository
git clone https://github.com/yourusername/yesreply.git
cd yesreply
# Backend Setup
cd backend
poetry install
cp .env.example .env # Configure your environment variables
poetry run python init_db.py # Initialize database
# Frontend Setup
cd ../frontend/yesreply
npm install
# Start Development Servers
# Terminal 1 - Backend
cd backend
poetry run uvicorn app.main:app --reload
# Terminal 2 - Frontend
cd frontend/yesreply
npm startYour app will be running at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/docs
For detailed setup instructions, see SETUP.md
┌─────────────────────────────────────────────────────────────────┐
│ YesReply Platform │
└─────────────────────────────────────────────────────────────────┘
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ React Frontend │◄───────►│ FastAPI Backend │◄───────►│ PostgreSQL │
│ │ REST │ │ SQL │ Database │
│ - Dashboard │ API │ - Auth │ │ │
│ - Profile │ │ - Emails │ │ - Users │
│ - Payments │ │ - Payments │ │ - Emails │
│ - Settings │ │ - Webhooks │ │ - Transactions │
└──────────────────┘ └──────────────────┘ └──────────────────┘
│ │ │
│ ├─────────────────────────────┤
│ │ │
│ ┌────────▼──────────┐ ┌────────▼─────────┐
│ │ Stripe API │ │ AWS SES │
│ │ │ │ │
│ │ - Payments │ │ - Email Send │
│ │ - Refunds │ │ - Email Receive │
│ │ - Cashouts │ │ - Webhooks │
└──────────────────►│ - Webhooks │ │ - Threading │
Stripe.js └───────────────────┘ └──────────────────┘
- Framework: FastAPI (Python 3.10+)
- Database: PostgreSQL 14+ / SQLite (dev)
- ORM: SQLAlchemy 2.0
- Authentication: JWT (JSON Web Tokens)
- Payment Processing: Stripe API
- Email Service: AWS SES
- Validation: Pydantic v2
- API Documentation: OpenAPI/Swagger
- Framework: React 18
- Routing: React Router v6
- Styling: TailwindCSS
- Icons: Lucide React
- HTTP Client: Fetch API
- Payment UI: Stripe Elements
- Database: Azure Database for PostgreSQL
- Email: AWS SES
- Payments: Stripe
- Deployment: Docker-ready (Azure, AWS, or any cloud)
yesreply/
├── backend/
│ ├── app/
│ │ ├── api/ # API endpoints
│ │ │ ├── auth.py # Authentication (login, signup, token)
│ │ │ ├── verification.py # LinkedIn verification
│ │ │ ├── emails.py # Email management
│ │ │ ├── payments.py # Stripe payments & cashouts
│ │ │ ├── notifications.py # User notifications
│ │ │ ├── ses_webhook.py # AWS SES webhook handler
│ │ │ └── schemas.py # Pydantic schemas
│ │ ├── core/
│ │ │ ├── config.py # Configuration settings
│ │ │ └── security.py # JWT & password hashing
│ │ ├── db/
│ │ │ ├── base.py # SQLAlchemy base
│ │ │ ├── models.py # Database models
│ │ │ └── session.py # Database session
│ │ ├── utils/
│ │ │ ├── ses.py # AWS SES email utilities
│ │ │ ├── payment_processor.py # Stripe payment logic
│ │ │ ├── refund_scheduler.py # Automatic refund system
│ │ │ └── notification_manager.py # Notification system
│ │ └── main.py # FastAPI application
│ ├── init_db.py # Database initialization
│ ├── populate_dummy_data.py # Test data generator
│ ├── pyproject.toml # Python dependencies
│ └── .env # Environment variables
│
├── frontend/
│ └── yesreply/
│ ├── public/
│ ├── src/
│ │ ├── pages/
│ │ │ ├── Login.js # Login page
│ │ │ ├── SignUp.js # Signup page
│ │ │ ├── Dashboard.js # Main dashboard
│ │ │ ├── Profile.js # User profile
│ │ │ ├── Payments.js # Wallet & payments
│ │ │ └── ProfileCreation.js # Onboarding
│ │ ├── index.js # React entry point
│ │ └── index.css # Global styles
│ ├── package.json # Node dependencies
│ └── tailwind.config.js # TailwindCSS config
│
├── SETUP.md # Detailed setup guide
├── AZURE_POSTGRES_SETUP.md # Azure PostgreSQL guide
├── QUICKSTART_POSTGRES.md # Quick PostgreSQL reference
└── README.md # This file
- User accounts with authentication
- Profile information (name, job, company, bio)
- LinkedIn verification status
- Price limits and wallet balance
- Stripe customer and bank account IDs
- Email messages with threading support
- Payment tracking (initial + response payments)
- Refund status and timestamps
- Message metadata (read, starred, archived)
- AWS SES Message-IDs for threading
- Complete financial audit trail
- Types: credit purchase, email received, email responded, cashout, refund
- Links to emails, payments, and cashouts
- Stripe payment intent and transfer IDs
- Credit purchases via Stripe
- Payment status and failure reasons
- Card information (last 4 digits, brand)
- Withdrawal requests
- Bank account details
- Processing status
- Stripe payout IDs
- Payment received notifications
- Response opportunity alerts
- Refund processed notifications
- OAuth state management
- Verification status tracking
User ─┬─ Emails (sent)
├─ Emails (received)
├─ Transactions
├─ Payments
├─ Cashouts
└─ Notifications
Email ─┬─ Transactions
├─ Notifications
└─ Replies (self-referencing)
Development: http://localhost:8000
Production: https://api.yesreply.tech
All authenticated endpoints require a Bearer token:
Authorization: Bearer <your_jwt_token>POST /api/auth/signup # Create new account
POST /api/auth/login # Login and get JWT token
GET /api/auth/me # Get current user info
PUT /api/auth/profile # Update profileGET /api/verification/linkedin/authorize # Start LinkedIn verification
GET /api/verification/linkedin/callback # LinkedIn OAuth callbackGET /api/emails # List user's emails
POST /api/emails/send # Send a paid email
GET /api/emails/{email_id} # Get email details
POST /api/emails/{email_id}/reply # Reply to email
PUT /api/emails/{email_id}/read # Mark as read
DELETE /api/emails/{email_id} # Delete emailPOST /api/payments/create-payment-intent # Create Stripe payment
POST /api/payments/add-credits # Add credits to wallet
POST /api/payments/create-cashout # Request cashout
GET /api/payments/transactions # List transactions
GET /api/payments/wallet-balance # Get wallet balance
POST /api/payments/setup-bank-account # Add bank accountGET /api/notifications # List notifications
PUT /api/notifications/{id}/read # Mark notification as read
DELETE /api/notifications/{id} # Delete notificationPOST /api/ses/webhook # AWS SES webhook (internal)
POST /api/payments/webhook # Stripe webhook (internal)Visit http://localhost:8000/docs for the full interactive Swagger UI documentation with request/response examples and the ability to test endpoints directly.
Create a .env file in the backend/ directory:
# Database
DATABASE_URL=postgresql://user:password@host:5432/yesreply?sslmode=require
# JWT Authentication
SECRET_KEY=your-super-secret-key-change-in-production
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=10080
# AWS SES (Email Delivery)
AWS_ACCESS_KEY_ID=your_aws_access_key
AWS_SECRET_ACCESS_KEY=your_aws_secret_key
AWS_REGION=us-east-1
AWS_SES_FROM_DOMAIN=yesreply.tech
# Stripe (Payments)
STRIPE_SECRET_KEY=sk_test_...
STRIPE_PUBLISHABLE_KEY=pk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
# Payment Configuration
MIN_CASHOUT_AMOUNT=10.00
EMAIL_RECEIVE_PAYMENT=0.20
BASE_PRICE_LIMIT=2.0
LINKEDIN_VERIFIED_PRICE_LIMIT=5.0Create .env in frontend/yesreply/:
REACT_APP_BACKEND_API_PATH=http://localhost:8000- 🔒 JWT Authentication: Secure token-based auth with configurable expiration
- 🔑 Password Hashing: Bcrypt with automatic salt generation
- 💳 PCI Compliance: Stripe handles all payment card data
- 🛡️ SQL Injection Protection: SQLAlchemy ORM with parameterized queries
- 🔐 CORS Configuration: Configurable origin allowlist
- ✅ Input Validation: Pydantic models validate all inputs
- 🚫 Rate Limiting: Built-in FastAPI rate limiting (configurable)
- 🔒 SSL/TLS: Required for Azure PostgreSQL connections
- 🔑 Environment Variables: Sensitive data stored securely
- Sender pays: User pays (e.g., $2) to send an email
- Instant credit: Recipient receives $0.20 immediately
- Response reward: Recipient gets remaining $1.80 when they reply
- 48-hour window: If no reply within 48 hours, sender gets automatic refund
- Transaction logging: Every step is tracked in the transactions table
YesReply implements proper RFC 822 email threading:
- Message-ID: Unique identifier for each email
- In-Reply-To: Links reply to original message
- References: Complete thread history
- Thread Root ID: Groups related messages
This ensures replies are properly threaded in the YesReply interface and in users' external email clients.
| Level | Requirements | Price Limit | Benefits |
|---|---|---|---|
| Basic | Email + password | $2.00 | Basic profile |
| LinkedIn Verified | LinkedIn OAuth | $5.00 | Higher earnings, verified badge |
- Database: Azure Database for PostgreSQL (Flexible Server)
- Backend: Azure App Service or Azure Container Instances
- Frontend: Azure Static Web Apps or Azure Blob Storage + CDN
- Secrets: Azure Key Vault for environment variables
See AZURE_POSTGRES_SETUP.md for detailed Azure PostgreSQL setup.
# Build images
docker build -t yesreply-backend ./backend
docker build -t yesreply-frontend ./frontend
# Run with docker-compose
docker-compose up -d- Set up PostgreSQL database
- Configure environment variables
- Run database initialization:
poetry run python init_db.py - Start backend:
poetry run uvicorn app.main:app --host 0.0.0.0 --port 8000 - Build frontend:
npm run build - Serve frontend static files via nginx/CDN
Built with ❤️ by developers who value their time