How olyaiy/resume-lm works
Main Components
• Frontend (UI Layer):
• Built with Next.js 15, React 19, and TypeScript.
• Contains split application directories (e.g., src/app, src/components, src/pages) that cover areas such as Landing, Dashboard (user profiles, resume management, subscription, and settings), Authentication, and Resume & Cover Letter editors.
• Utilizes Shadcn UI and Tailwind CSS for styling.
• Backend (Server/API Layer):
• Implemented with Next.js API routes under src/app/api.
• Includes endpoints for chat (for AI-powered resume assistant), authentication callbacks, webhooks (for Stripe integration), and potentially other services (e.g., subscription management).
• Middleware and Server Components (e.g., middleware.ts, server.ts in Supabase utilities) handle authentication and server-side operations.
• Database:
• PostgreSQL is used (with schema defined in schema.sql) and is configured to use Row Level Security (RLS).
• Integration with Supabase Auth for user management.
• Tables include profiles, resumes, jobs, and subscriptions.
• External Services & Integrations:
• Stripe for payment processing and subscription management (evident from the API endpoints and components like subscription/checkout, subscription/stripe-session, etc.).
• AI processing services (e.g., OpenAI, Claude, Gemini, etc.) are used for generating content suggestions, resume scoring, and job description analysis.
• PDF generation (via React PDF) for exporting resumes.
Out the Relationships and Flows
• Client Layer
• Users interact via web browsers accessing multiple pages such as the landing page, login/authentication pages, dashboard, resume editor, and profile management.
• Frontend components send requests to API endpoints when performing actions like login, resume saving/updating, or subscription modifications.
• Server/API Layer
• The API endpoints (organized under src/app/api) process requests, invoke business logic (such as AI suggestions or resume management actions), and then communicate either back to the UI or forward necessary commands.
• Middleware and server modules (found in src/utils/supabase and middleware.ts) provide authentication, authorization, and rate limiting before calls reach core API handlers.
• Database Communication
• Business logic and API endpoints interact with the PostgreSQL database via the Supabase client or ORM tools.
• External Integrations
• Stripe webhooks and checkout processes are managed by dedicated API endpoint routes (check src/app/api/webhooks/stripe and subscription folders) which interface with the subscription components on the frontend.
• AI integration services are part of the content generation pipelines evident in resume and cover letter components.
Architectural Patterns & Design Principles
• Modular, Component-Based Design:
• The structure of the src/components directory shows a clear separation of concerns (authentication, resume editor, dashboard, etc.).
• This encourages reusability and maintainability.
• Server-Side Rendering and API Layer Separation:
• Leveraging Next.js App Router allows clear separation between static/dynamic rendering and API handling.
• Secure and Scalable Data Handling:
• Using Supabase with Row Level Security and dedicated middleware assures security best practices.
• Integration of Third-Party Services:
• Dependencies on Stripe and various AI solutions are abstracted into specific API endpoints and utility functions (e.g., in src/lib and src/utils).
Final Checklist
• A component for the user interface with sub-sections (Dashboard, Resume Editor, Cover Letter Editor, Profile Management).
• Separation of API endpoints (e.g., /api/chat, /api/webhooks/stripe) and the associated business logic handled in middleware.
• A detailed section for the database showing key tables and emphasizing the use of Supabase Auth and Prisma ORM integration.