How nainish-rai/stupid-mails works
Project Type and Purpose
• This is a full‑stack web application built on Next.js (App Router) that serves as an AI‑powered email management tool.
• Users connect their Gmail account via OAuth (Better‑Auth), the app pulls emails, uses OpenAI to classify them, stores metadata in PostgreSQL (via Prisma), and surfaces a focused dashboard in the browser.
File‑Structure Analysis
• app/ – Next.js pages & API routes (auth, Gmail endpoints, user preferences, waitlist, etc.)
• components/ & app/components/ – React UI building blocks (cards, lists, forms, ShadCN UI components)
• lib/ – Shared logic: Gmail API wrappers, classification helpers, Prisma client, auth utilities, React hooks
• prisma/ – Database schema & migration history
• public/ – Static assets
• memory‑bank/ – Project docs & architectural notes
README Insights
• Frontend: Next.js + React + Tailwind CSS + ShadCN UI
• Backend: Next.js API routes, Prisma ORM to PostgreSQL
• Integrations: Gmail API (read‑only OAuth), OpenAI API
• State management: React Query via QueryProvider
• Auth: Better‑Auth