How 3fnan/resumeiq works
1. Overall shape
- This is a Next.js 15 App Router application that acts as a stateless AI resume-analysis frontend with a single server API backend.
- There is no database or long-lived domain state in the repo; user data flows from the browser to an API route, then to external AI/PDF-processing libraries, and back to the UI.
2. Primary runtime boundary: client UI vs server analysis
- The browser/client side owns the landing experience, file upload interaction, dashboard rendering, theme/visual state, and user-triggered resets.
- The server side is concentrated in src/app/api/analyze/route.ts, which coordinates resume parsing and Gemini-powered analysis.
- This boundary is the key architectural seam for a diagram: UI components collect input, the API route performs analysis, and results are returned to the dashboard.
3. App Router entry points
- src/app/page.tsx is the main composition/root screen for the product experience.
- src/app/layout.tsx provides the shared app shell.
- src/app/globals.css holds global styling and theme/system-wide presentation rules.
- src/app/api/analyze/route.ts is the single backend endpoint and the main integration point for analysis.
4. Frontend composition
- The UI is split into reusable components under src/components/.
- Hero.tsx and Navbar.tsx form the public-facing top section.
- ResumeUpload.tsx is the user input surface for uploading or submitting a resume.
- Dashboard.tsx is the results area, likely responsible for showing analysis tabs, scores, and generated outputs.
- src/components/ui/ contains design-system primitives (Button, Card, Progress, Tabs) used across the app.
5. Request/data flow
- The typical flow is: user uploads a resume in the browser → upload component posts to /api/analyze → server parses the document and calls Gemini → structured analysis is returned → dashboard renders the results.
- Based on the README, the analysis can cover ATS scoring, missing keywords, interview questions, and cover-letter content.
- The dashboard then becomes the presentation layer for multiple AI-generated output categories rather than a single result.
6. Server-side analysis pipeline
- src/utils/pdf.ts handles PDF text extraction using pdf-parse.
- src/utils/gemini.ts encapsulates the Google Gemini API client and prompt logic.
- The API route likely combines extracted resume text with any target job description or user context, then sends that to Gemini for structured output.
- This separation is important: PDF parsing is isolated from AI prompting, and both are isolated from the UI.
7. External dependency and integration boundary
- The only clearly stated external service is Google Gemini API, used for scoring and generation.
- The API key is environment-based (GEMINI_API_KEY), so the service dependency is server-only and not exposed to the client.
- This makes the server route the trust boundary: it receives uploaded content, prepares prompts, calls the model, and returns sanitized/structured output.
8. Type boundary
- src/types/index.ts centralizes shared TypeScript shapes for analysis data passed between server and client.
- This type layer is the contract that keeps the API payloads and dashboard rendering aligned.
- For an architecture diagram, treat it as the schema boundary between analysis results and UI presentation.
9. Presentation and interaction model
- The UI appears to be a single-screen product experience with a guided flow: landing content, upload interaction, then an analysis dashboard with tabs and progress indicators.
- The Tabs and Progress primitives suggest the results are organized into multiple sections rather than a single flat report.
- The README also indicates copy/download/print-oriented output, so the client is designed for both on-screen review and export-friendly presentation.
10. Testing and quality boundary
- tests/resume-analyzer.spec.js plus playwright.config.js indicate end-to-end browser testing with Playwright.
- These tests likely validate the user journey from upload through dashboard rendering and reset behavior.
- This is the main automated verification layer for the client/server interaction, not unit-heavy backend logic.
11. Infrastructure and deployment model
- The project is built to deploy on Vercel or Netlify with Next.js server routes enabled.
- The app depends on runtime environment configuration, especially the Gemini API key.
- Since the backend is an API route inside the Next.js app, deployment must support server-side execution, not just static hosting.
12. What to draw in an architecture diagram
- Draw one browser/client box containing the landing page, upload form, dashboard, and UI primitives.
- Draw one server box containing the /api/analyze route plus PDF parsing and Gemini orchestration utilities.
- Draw one external service box for Gemini.
- Show data flowing from user input to server analysis and back to rendered report sections, with no database or persistence layer in between.
Main entry points: Dashboard.tsx Dashboard · page.tsx Home page · ResumeUpload.tsx Resume upload · route.ts Analyze API
Components 17
Client UI
Browser-side experience for landing, upload, and results rendering
- Home page · Main App Router screen composing the product experience
src/app/page.tsx - App shell · Shared document and application wrapper
src/app/layout.tsx - Global styles · App-wide CSS and theme rules
src/app/globals.css - Navbar · Top-level navigation and branding
src/components/Navbar.tsx - Hero · Landing-page introduction and value proposition
src/components/Hero.tsx - Resume upload · Resume submission and reset interaction surface
src/components/ResumeUpload.tsx - Dashboard · Tabbed analysis output and report presentation
src/components/Dashboard.tsx - Button · Shared action control used across the interface
src/components/ui/Button.tsx - Card · Shared content container for page sections
src/components/ui/Card.tsx - Progress · Score and completion visualization
src/components/ui/Progress.tsx - Tabs · Section switching for multi-part analysis results
src/components/ui/Tabs.tsx
Server Analysis
Next.js API route and analysis utilities
- Analyze API · Single server endpoint that orchestrates resume analysis
src/app/api/analyze/route.ts - PDF parser · Extracts resume text from uploaded PDF files
src/utils/pdf.ts - Gemini client · Builds prompts and calls the Google Gemini API
src/utils/gemini.ts
Shared Contracts
Types used across client and server
- Analysis types · Cross-layer TypeScript contract for analysis payloads
src/types/index.ts
External Service
Third-party model API used for analysis
- Gemini API · External AI service used for scoring and generation
Testing
End-to-end browser verification
- E2E spec · End-to-end resume analysis journey checks
tests/resume-analyzer.spec.js
Connections 22
- App shell → Home page: wraps · Provides the shared application shell for the main screen
- App shell → Global styles: loads · Applies global styling to the app
- Home page → Navbar: composes · Renders the navigation header
- Home page → Hero: composes · Renders the landing introduction
- Home page → Resume upload: composes · Renders the resume submission flow
- Home page → Dashboard: composes · Renders the analysis results area
- Navbar → Button: uses · Shares common action styling
- Hero → Card: uses · Wraps promotional content in reusable layout blocks
- Resume upload → Button: uses · Uses action controls for upload and reset
- Resume upload → Card: uses · Frames the upload surface
- Dashboard → Tabs: uses · Organizes multiple analysis outputs into sections
- Dashboard → Progress: uses · Displays scoring and completion indicators
- Dashboard → Card: uses · Presents report content in structured blocks
- Resume upload → Analyze API: submits · Sends the uploaded resume for analysis
- Analyze API → PDF parser: parses · Extracts text from the resume document
- Analyze API → Gemini client: orchestrates · Builds analysis prompts and requests model output
- Gemini client → Gemini API: calls · Invokes the external Gemini service
- Analyze API → Analysis types: returns · Shapes the response contract consumed by the UI
- Dashboard → Analysis types: renders · Consumes the shared analysis schema
- E2E spec → Resume upload: drives · Exercises upload and reset flows
- E2E spec → Dashboard: asserts · Verifies results rendering after analysis
- E2E spec → Analyze API: covers · Validates the browser-to-server analysis path