How ampersand-ai/pickra works
Project Type and Purpose
• This is a Single-Page Application (SPA) built with React, TypeScript, Vite, Tailwind CSS and the shadcn-ui component library.
• It is a client-side resume/job-matching tool that lets users upload resumes, define job requirements, and then calls external APIs (DeepSeek and OpenAI) to compute and display match results.
File Structure
• Top-level config: vite.config.ts, tsconfig.json, tailwind.config.ts, package.json
• src/ – main code:
• main.tsx + index.html – application entry point
• App.tsx + AppLayout.tsx – global shell, theme provider
• pages/ – route containers: Landing, Index, Test, Settings, NotFound
• components/ – UI widgets (FileUpload, JobRequirements, ResumeResults, etc.) and ui/ primitives from shadcn-ui
• context/ResumeMatchContext.tsx – React Context for global state
• hooks/ – custom hooks (useMobile, useToast)
• utils/ + lib/ – business logic: pdfParser.ts, deepseekApi.ts, openaiApi.ts, helpers
• No proprietary backend code – relies on external REST/HTTP services.
README for Additional Insights
• Hosted/edited via Lovable.dev
• Tech stack confirmed: Vite, React, TS, shadcn-ui, Tailwind
• Deployment: static build + publish on Lovable (custom domain optional)
Main Components & Relationships
a. Browser / Client
• Loads the SPA (static assets served by Vite in dev; bundled for production)
b. React Application
• Entry: main.tsx → App.tsx
• Theme Provider: wraps UI (Tailwind + shadcn-ui)
• Router/Pages: pages/ folder
• Layout: AppLayout
• Components: domain-specific (FileUpload, JobRequirementsList, ResumeResults, SendTestDialog)
• UI Primitives: components/ui/*
c. State Management
• ResumeMatchContext: holds uploaded files, job requirements, API responses
• Custom Hooks: useMobile, useToast for responsive design & notifications
d. Business Logic / Utilities
• PDF parsing (pdfParser.ts)
• API clients (deepseekApi.ts, openaiApi.ts)
• Mock data provider (mockData.ts)
e. External Services
• DeepSeek API (resume‐job matching)
• OpenAI API (scores, embeddings, LLM prompts)
f. Hosting Platform
• Lovable.dev (static site hosting, CI/CD triggered on Git pushes)
Architectural Patterns & Design Principles
• Component-Based UI (React + shadcn-ui primitives)
• Context API for cross-cutting state
• Separation of concerns: UI vs. state vs. data-access (utils)
• Hooks for reusable logic (responsive, notifications)
• Static hosting + HTTP calls to external services
Essential Elements
• Clear component names matching your file tree