Skip to content

lezzin/curriculum-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

206 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Curriculum & Proposal Generator System (NestJS + Gemini + Vue 3)

A professional, AI-powered platform for generating tailored resumes and freelance proposals. Built with a robust NestJS backend and a reactive Vue 3 frontend, it leverages Google Gemini LLMs to synthesize content, Playwright for high-fidelity PDF generation, and BullMQ for scalable background processing.

πŸ— Architecture Overview

The system follows a Clean Architecture approach with a clear separation of concerns, utilizing asynchronous processing for AI-intensive and document generation tasks.

graph TD
    Client[Vue 3 + Vite] <--> API[NestJS API]
    API -- "Dispatch Job" --> RedisQ[BullMQ / Redis]
    RedisQ -- "Execute Task" --> Worker[Queue Processors]
    Worker -- "LLM Synthesis" --> Gemini[Google Gemini AI]
    Worker -- "Render PDF" --> Playwright[Playwright + Handlebars]
    Worker -- "Notify Progress" --> SSE[SSE / Redis Subscriber]
    SSE -- "Real-time Update" --> Client
    API -- "Store Metadata" --> DB[(PostgreSQL)]
Loading

Core Components

  • NestJS API: Orchestrates authentication (Passport/JWT), user management, and AI job dispatching.
  • Gemini Integration: Uses @google/generative-ai to generate professional summaries, skill lists, and tailored proposals based on user data.
  • BullMQ Engine: Manages background workers for resume and proposal generation to ensure high availability.
  • Playwright Renderer: Converts Handlebars-templated HTML into pixel-perfect PDF documents.
  • SSE Communication: Provides real-time status updates to the frontend during long-running AI processes.
  • Vue 3 Frontend: A modern, responsive SPA built with Tailwind CSS, Pinia, and Vee-Validate.

πŸ“‚ Project Structure Mapping

The repository is divided into a dedicated backend and frontend:

Backend (/backend)

src/
β”œβ”€β”€ application/
β”‚   β”œβ”€β”€ use-cases/      # Business logic (Resume, Freelance, User)
β”‚   └── queues/         # BullMQ queue definitions
β”œβ”€β”€ domain/
β”‚   β”œβ”€β”€ entities/       # Core domain models (Resume, User, Proposal)
β”‚   β”œβ”€β”€ repositories/   # Abstract repository interfaces
β”‚   └── enums/          # Domain-specific constants
β”œβ”€β”€ infrastructure/
β”‚   β”œβ”€β”€ queue/          # BullMQ processors (Resume/Freelance workers)
β”‚   β”œβ”€β”€ services/       # External integrations (Gemini, Playwright, Discord)
β”‚   β”œβ”€β”€ database/       # TypeORM entities and migrations
β”‚   └── sse/            # Real-time event broadcasting logic
β”œβ”€β”€ presentation/
β”‚   β”œβ”€β”€ controllers/    # REST API endpoints
β”‚   └── dto/            # Data Transfer Objects
└── templates/
    β”œβ”€β”€ page/           # Handlebars templates for web view
    └── pdf/            # Handlebars templates for PDF generation

Frontend (/frontend)

src/
β”œβ”€β”€ components/         # Shared UI and domain components
β”œβ”€β”€ composables/        # Vue Composition API logic (API, SSE, Theme)
β”œβ”€β”€ services/           # API and SSE client integrations
β”œβ”€β”€ stores/             # Pinia state management (Auth)
β”œβ”€β”€ views/              # Page components (Resume, Freelance, Reports)
└── interfaces/         # TypeScript type definitions

πŸ”„ System Flows

1. AI-Powered Generation Flow

Users provide basic data, and the system uses Gemini to enhance and tailor the content for specific roles or proposals.

sequenceDiagram
    participant U as User
    participant A as API
    participant Q as BullMQ
    participant G as Gemini
    participant S as SSE

    U->>A: Request Resume/Proposal
    A->>Q: Add Job to Queue
    A-->>U: Job Accepted (202 Accepted)
    Q->>G: Generate AI Content
    G-->>Q: Structured Data
    Q->>S: Notify: Content Generated
    S-->>U: SSE: "Enhancing content..."
    Q->>A: Persist Generated Data
Loading

2. PDF Document Generation

The system uses Playwright to render HTML templates populated with generated data into professional PDF files.

sequenceDiagram
    participant W as Worker
    participant H as Handlebars
    participant P as Playwright
    participant D as Database

    W->>D: Fetch Resume Data
    W->>H: Compile HTML with Template
    H-->>W: Raw HTML
    W->>P: Render HTML to PDF
    P-->>W: PDF Buffer
    W->>D: Mark Job as Complete
Loading

πŸš€ Key Features

  1. Intelligent Content Synthesis:
    • Contextual Proposals: Generates tailored freelance proposals based on project descriptions.
    • Resume Enhancement: Automatically expands bullet points and summaries using professional terminology.
  2. Robust Document Engine:
    • Playwright Integration: High-fidelity PDF exports that match the web preview exactly.
    • Handlebars Templating: Easy-to-extend template system for both web and PDF formats.
  3. Real-time UX:
    • SSE Progress Updates: Users see exactly what the AI is doing (e.g., "Analyzing experience", "Synthesizing skills").
    • Responsive Design: Optimized for both mobile and desktop usage.
  4. Security & Scalability:
    • Multi-provider Auth: Support for Google, GitHub, and standard JWT.
    • Background Processing: BullMQ ensures that slow AI calls never block the main API thread.

πŸ›  Usage & Extension

Environment Setup

  1. Backend:
    DATABASE_URL=postgres://...
    GEMINI_API_KEY=your_key
    REDIS_HOST=localhost
    GOOGLE_CLIENT_ID=...
    GITHUB_CLIENT_ID=...
  2. Frontend:
    VITE_API_URL=http://localhost:3000

Adding New Templates

  1. Create Template: Add a new .hbs file in backend/src/templates/pdf/.
  2. Update Enums: Add the template identifier to backend/src/domain/enums/resume.enums.ts.
  3. Frontend Support: Add the template preview in the frontend generator view.

About

A sophisticated, AI-driven platform for generating tailored resumes and freelance proposals. Built with NestJS and Vue 3, it leverages Google Gemini LLMs for content synthesis, Playwright for high-fidelity PDF generation, and BullMQ for scalable background processing.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors