mailflow-pro

MailFlow Pro

MailFlow Pro is a premium Gmail-powered email sending web app with Google OAuth authentication and a modern SaaS-style UI. The frontend is built with React, Vite, and Tailwind CSS, while the backend uses Express, Passport Google OAuth, and Gmail APIs for email sending.

What was done

Features

Project structure

Technologies used

Local setup

  1. Clone the repository:
    git clone https://github.com/mynameisatif/mailflow-pro.git
    cd mailflow-pro
    
  2. Setup backend:
    cd backend
    npm install
    
  3. Create a .env file in backend/ with:
    GOOGLE_CLIENT_ID=your_google_client_id
    GOOGLE_CLIENT_SECRET=your_google_client_secret
    GOOGLE_CALLBACK_URL=https://mailflow-api-w8kx.onrender.com/auth/google/callback
    SESSION_SECRET=some_secure_secret
    
  4. Start the backend:
    npm run dev
    
  5. Setup frontend:
    cd ../frontend
    npm install
    npm run dev
    
  6. Open the app in the browser at http://localhost:5173.

Deployment

How it runs

  1. User visits the landing page.
  2. If not authenticated, the app shows the login hero and a Google login button.
  3. Clicking the button redirects to the backend /auth/google route.
  4. Upon successful login, the backend redirects back to the frontend.
  5. The frontend calls /auth/me to detect the authenticated user.
  6. If authenticated, the dashboard and email form are displayed.
  7. The user composes an email, and the app sends it to the backend via /api/send-email.
  8. The backend uses the authenticated user session to send Gmail messages.

Notes for interview