How jagan-shanmugam/cover-coach works
Main Components Identification
• Frontend: Represented by the Next.js application in the “src/app” directory with various pages (cover letters, CV builder, interview prep, job postings, etc.) and reusable UI components in “src/components” and “src/hooks”.
• Backend API Endpoints: Highlight API routes under “src/app/api” such as “/api/llm” (LLM interactions), “/api/scrape-job” (job scraping), “/api/customize-letter” (cover letter customization), etc.
• Database & Authentication: A Supabase backend is used, with PostgreSQL as the database containing core tables (job postings, documents, applications, CV details, etc.). Security via Row Level Security (RLS) and additional configurations via SQL scripts in the “scripts” directory should be noted.
• External Services and Integrations: Include external AI providers (OpenAI, DeepInfra, Perplexity, etc.), Brevo for transactional emails, and job board integrations (Arbeitnow, Findwork). These should be shown as connected to the relevant API endpoints or backend service.
• Additional Utilities & Helpers: The project also has a set of libraries (e.g., job scraping utilities, PDF template generation, and custom templates for cover letters/CVs), configuration files (ESLint, Tailwind, TypeScript), and middleware.
Relationships and Interactions
• Clear data flows: For example, the user interacts with the Next.js frontend which communicates with various API endpoints for AI services, job scraping, or PDF generation.
• Connection to Supabase: Indicate that API routes and authentication mechanisms in the frontend rely on Supabase for database operations, user management, and security policies (RLS).
• CI/CD Flow: Include flow from code commit → GitHub Actions (show branches “main” for production and PRs for preview) → Vercel deployment → monitoring and notifications.
Architectural Patterns & Design Principles
• Separation of Concerns: Clearly show the split between the UI (frontend), API (backend logic), and database layers.
• API-First Design: Illustrate that the API endpoints encapsulate core business logic and integrate with external AI/ML services.
• Component-Based UI: Highlight the modularity (reusable components for cover letters, CVs, interview prep, etc.).
• Serverless/API Routes: Emphasize that many backend functionalities are implemented as serverless endpoints using Next.js routing.
• Security: Represent integration with Supabase’s secure authentication and RLS, as well as the careful handling of environment configurations.
Technologies, Frameworks, and Libraries
• Frontend: Next.js 15, TypeScript, Tailwind CSS, shadcn UI, Framer Motion.
• Backend: Next.js API routes, Supabase (PostgreSQL, authentication, RLS), Node.js.
• AI/ML: LangChain with multiple LLM providers (OpenAI, DeepInfra, Perplexity, etc.).
• Deployment & CI/CD: Vercel, GitHub Actions (including production and preview workflows), ESLint.
• Database: PostgreSQL with several SQL scripts to set up tables and migration logic.