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