How izadoesdev/mailer works
Project type and purpose
• Mailbuddy is a full‑stack, serverless web application: a secure, privacy‑focused email client built on Next.js. It features a React‑based UI (Once UI + TailwindCSS), Next.js API routes as the backend, Prisma ORM with PostgreSQL (and vector storage) as the database layer, and integrations with Gmail’s API and external AI services for smart categorization and search.
File structure
• Top‑level: Next.js config files (next.config.mjs), environment (.env.example), Prisma schema, API routes under src/app/api and src/api, UI under src/app and src/components, a custom UI library under src/once-ui, utility libraries under src/libs (auth, db, query, utils, vector), and tests.
• The src/app directory uses the Next.js App Router: layout, pages, client and server components are organized by route groups ((auth), (dev), (main), (secondary)).
• API routes live in src/app/api/... for public/edge routes and in src/api/... for server functions. They include authentication, email sync, background‑sync, calendar, contacts, and AI endpoints.
• Prisma files under prisma/ define your data model and migrations.
README for additional insights
• Confirms a zero‑knowledge architecture: all encryption happens client‑side (in src/libs/utils/encryption.ts and in auth helpers).
• Tech stack: Next.js (App Router + API routes), React, Once UI, TailwindCSS, Prisma ORM, PostgreSQL + vector storage, BetterAuth, Gmail API, AI/ML (semantic search, categorization).
Elements
• Blue = Client‑side components
• Green = Server/API
• Orange = Database & Storage
• Purple = External services