Frontend application for an AI-powered CV optimization platform that helps users tailor their resume and generate cover letters for specific job descriptions using large language models.
Users authenticate with email OTP, upload their CV, submit a job description, and receive AI-generated outputs including an optimized CV and a tailored cover letter.
This project demonstrates production-style frontend engineering practices including API integration, async job workflows, state management, and structured UI architecture.
- Email OTP authentication with access and refresh tokens
- User dashboard with statistics and credit balance
- CV upload for
pdf,docx,txt, andmdformats - AI optimization job creation
- Job status polling for asynchronous processing
- Optimization history with status filtering
- File preview for PDF, Markdown, text, and DOCX
- Downloadable optimized CVs and generated cover letters
The frontend is a React single-page application that communicates with the backend API and manages asynchronous optimization workflows.
Typical flow:
User Login ↓ OTP Verification ↓ Dashboard + Credit Balance ↓ CV Upload + Job Description ↓ Optimization Job Creation ↓ Polling Optimization Status ↓ Preview Generated Results ↓ Download Optimized Files
The app uses TanStack Query to manage server state and polling logic for long-running optimization jobs.
src/ components/ files/ File upload and preview components ui/ Shared UI primitives contexts/ Authentication state and session bootstrap lib/ API client, query client, utilities pages/ Login, dashboard, optimize, history services/ API integrations (auth, user, credits, files, optimizations) types/ Shared API and domain types
This structure separates UI components, service logic, and application state to maintain a clear and scalable architecture.
- React 18
- TypeScript
- Vite 5
- TanStack Query
- Axios
- Tailwind CSS v4
- React Hook Form
- React Dropzone
- React Hot Toast
- Mammoth (DOCX parsing)
- React Markdown
The frontend expects a backend API running by default at:
Main endpoints used:
POST /auth/send-otpPOST /auth/verify-otpPOST /auth/refreshPOST /auth/logoutGET /users/meGET /users/statsGET /credits/balanceGET /credits/historyPOST /credits/addPOST /files/uploadGET /files/:filenamePOST /optimizationsGET /optimizationsGET /optimizations/:id
Create .env.local in the project root:
VITE_API_BASE_URL=http://localhost:3000/api/v1
VITE_API_TIMEOUT=30000
- Node.js 20+
- npm
- Running CV Optimizer backend
npm install
npm run dev
npm run build npm run lint npm run preview
This project intentionally focuses on core functionality and currently has some gaps:
- Routing is state-based inside
DashboardPageinstead of using a dedicated router - Automated frontend tests are not implemented yet
- Tokens are stored in
localStorage(acceptable for development but weaker than httpOnly cookie-based auth) - A development shortcut for OTP login still exists in the login screen
Additional documentation is available in the docs/ directory:
START_HERE.mdFRONTEND_QUICK_START.mdFRONTEND_IMPLEMENTATION_GUIDE.mdTESTING_GUIDE.mdCV Optimizer App – Product Requirement.md
Recent security review improvements include:
- Removed request/auth logging that exposed token fragments in the browser console
- Removed an unused helper that could append auth tokens to file download URLs
- No API keys, private keys, or obvious hardcoded secrets were found in the repository
npm auditshould be used to verify third-party dependency status
- Building a structured React application with clear separation of UI, service, and state layers
- Integrating asynchronous AI workflows into a frontend application
- Managing server state and polling using TanStack Query
- Designing a maintainable frontend architecture for API-driven applications One small recommendation