How saksham-goel1107/openresume works
Project Type and Purpose
• OpenResume is a full-stack, single-repository Next.js (v15) web application.
• Purpose: In-browser resume building (PDF generation) and resume parsing (AST readability check), plus an optional AI chat assistant.
File Structure
• src/app: Next.js App Router pages, components, API routes, global styles, and utilities.
• src/app/api/ai-chat/route.ts: serverless API route for AI chat.
• src/app/lib/parse-resume-from-pdf: client-side PDF parsing logic using PDF.js.
• src/app/components/ResumePDF & react-pdf: client-side PDF rendering.
• src/app/lib/redux: Redux Toolkit store for in-browser resume state.
• src/app/utils/redis.ts: Redis helper for caching or session storage in server functions.
• Dockerfile, CI workflows, docs/render-deployment.md: containerization and deployment configurations.
README Insights
• Tech stack: Next.js, React, TypeScript, Redux Toolkit, Tailwind CSS, PDF.js (parser), react-pdf (renderer).
• No user-account database; all builder state is local (Redux + browser localStorage).
• AI chat requires an external LLM API (Gemini/OpenAI) and Redis for key management.
• Hosted as a Dockerized web service (Render.com recommended).
Main Components & Their Interactions
a. Client (Browser)
• Renders Next.js pages (Home, /resume-import, /resume-builder, /resume-parser).
• Runs React components, Redux store, PDF parsing & rendering entirely in browser.
• Interacts with server only for AI chat features.
b. Next.js Server (Serverless Routes)
• Serves static assets and pre-renders pages (SSG/SSR).
• Handles /api/ai-chat route: accepts user prompts, fetches/stores conversation context in Redis, calls external LLM API, returns streamed responses.
c. External Services
• LLM API (Gemini/OpenAI) for AI chat.
• Redis instance for caching API keys or chat session data.
d. CI/CD & Deployment
• GitHub Actions for lint/test/scan.
• Docker container built via Dockerfile, deployed to Render.
Architectural Patterns & Design Principles
• Monorepo with Next.js App Router (colocates pages, components, and server routes).
• “Feature folder” structure: each page (resume-builder, parser, import) has its own directory.
• Client-heavy logic: parser & builder run entirely in browser for privacy.
• Serverless functions for “thin” API layer (AI chat).
• Redux Toolkit centralizes app state; localStorage persistence.
Essential Elements
• Labels: “Browser (React + Redux)”, “Next.js Serverless API”, “Redis Cache”, “LLM API”, “Static Assets CDN”.