How sri-dinesh/resume-builder-ai works
Project Type and Purpose
• The project is a full-stack web application built with Next.js and TypeScript. It leverages React for the frontend UI and uses Prisma ORM with PostgreSQL for the backend database.
• Its purpose is to provide an AI-powered platform for building and customizing professional resumes. Key features like AI-powered suggestions, real‑time previews, multiple resume templates, and subscription management with Stripe are core to its functionality.
File Structure
• The top-level directories (e.g., src, prisma, public) indicate a modern Next.js project following the app directory structure.
• In the src/app folder, note the separation between authentication (in the (auth) folder) and the main, logged-in area (in the (main) folder). The (main) directory further splits components by functional areas such as billing (for Stripe-related subscription management) and editor (which contains many specific forms and editor features).
• There is an API folder (src/app/api) that hosts endpoints for actions like contact submissions and handling stripe-webhook events.
• The prisma folder holds database schema and migration files, signifying a relational database (PostgreSQL) accessed through Prisma.
• Additional directories (components, lib, hooks) support UI elements, business logic (e.g., Google AI integration via google-ai-model.ts), and reusable custom hooks.
README for Additional Insights
• The README describes the tool’s core functionality and outlines major features like AI-generated content, customizable templates, real-time preview, and ATS optimization.
• It calls out the technology stack: Next.js, React, Prisma ORM, PostgreSQL, Tailwind CSS, Shadcn UI, and Stripe for payments.
• These details reinforce the structures seen in the file tree and offer important context for the system's integration points and external services.
a. Main Components:
• User Interface Client: This includes the Next.js–driven frontend with pages for authentication, resume editing, subscription management, and public landing pages.
• Frontend Application (Next.js): Covers routing, SSR/SSG where applicable, and integration of React components.
• API Layer: Next.js API routes (e.g., /api/contact, /api/stripe-webhook) performing server-side logic, validations, and handling data exchange.
• Business Logic and Libraries: Modules in the lib folder handling tasks like AI integrations, animations, stripe operations, and data validations.
• Database: Managed by Prisma ORM with PostgreSQL; shown as the persistent data store for resume data, user accounts, and transaction records.
• External Services:
• Stripe: For managing subscriptions and billing.
• AI/Google Model: For powering the resume content suggestion and generation.
• Middleware & Authentication: Paths and custom hooks indicating session management and route protection.
b. Relationships and Interactions:
• Users interact with the Frontend UI which communicates via the API layer.
• API endpoints orchestrate calls between the UI, the business logic components, and the database.
• Certain API endpoints (such as stripe-webhook) also directly receive callbacks from external services like Stripe.
• Business logic modules (found in lib) integrate with external AI models to provide content suggestions and generate resume sections.
c. Architectural Patterns and Design Principles:
• Separation of Concerns: The division between Authentication, Main Application, and API routes.
• Modular Design: Break down into UI components (both common and page-specific), business logic libraries, and backend services.
• Integration Patterns: Use of serverless functions (API routes in Next.js) for backend operations and external service webhooks.
d. Key Technologies and Frameworks:
• React & Next.js: For rendering the UI and handling page-based routing.
• TypeScript: Ensuring type safety across the project.
• Prisma ORM & PostgreSQL: For database interactions and schema management.
• Stripe: For payment and subscription management integration.
• Tailwind CSS: For styling the UI.
• Shadcn UI: For UI component styling/assembly.
Final Recommendations
• Be as detailed as possible, separating the project into the numerous components you’ve identified.