Your Intelligent Career OS โ An AI-powered job search assistant that tracks applications, analyzes job fit, and tells you exactly what to do next.
AI Job Copilot is a full-stack SaaS application that transforms job searching from a chaotic spreadsheet exercise into an intelligent, data-driven workflow. It combines a beautiful dark-mode UI with powerful AI features to give you a real edge in your job search.
- JWT-based auth with access + refresh token pattern
- Short-lived access tokens (15 min) + long-lived refresh tokens (7 days)
- Auto token refresh โ seamless re-auth without re-login
- Protected routes with middleware guard
- Real-time stats: total applications, interviews, offers, response rate
- Area chart: application trend over 8 weeks (Recharts)
- Pie chart: status breakdown visualization
- Recent applications quick-view
- Full CRUD โ add, edit, delete job applications
- Fields: company, role, status, link, notes, salary, location, job description, date
- Advanced filtering by status + full-text search
- Responsive card grid layout
- Drag-and-drop pipeline view using
@dnd-kit - 4 columns: Applied โ Interview โ Offer โ Rejected
- Drag a card to automatically update its status in the DB
- Touch-friendly for mobile use
| Feature | What it does |
|---|---|
| Smart Match Score | Analyzes resume vs job description. Returns match %, matched skills, missing skills, suggestions |
| Next Best Actions | AI studies your job search data and generates a prioritized action plan |
| Weekly AI Report | Generates a full performance summary: strengths, weak areas, suggestions, health score |
| Resume Optimizer | Scores each resume section, identifies keyword gaps, gives ATS improvement tips |
| Follow-up Generator | Writes professional follow-up emails in professional/friendly/assertive tone |
| Interview Prep | Generates technical + behavioral questions, study topics, company insights |
| Layer | Technology |
|---|---|
| Frontend | Next.js 14 (App Router) + TypeScript |
| Styling | Tailwind CSS (custom premium design system) |
| State | Zustand (global store with persistence) |
| Backend | Next.js API Route Handlers |
| Database | MongoDB (Mongoose ODM) |
| Auth | JWT (jsonwebtoken + bcryptjs) |
| AI | OpenAI GPT-4o |
| Charts | Recharts |
| DnD | @dnd-kit/core + @dnd-kit/sortable |
| Fonts | Syne (display) + DM Sans (body) + JetBrains Mono |
| Toasts | react-hot-toast |
src/
โโโ app/ # Next.js App Router
โ โโโ api/ # API Route Handlers
โ โ โโโ auth/
โ โ โ โโโ login/route.ts # POST /api/auth/login
โ โ โ โโโ signup/route.ts # POST /api/auth/signup
โ โ โ โโโ refresh/route.ts# POST /api/auth/refresh
โ โ โ โโโ profile/route.ts# GET/PUT /api/auth/profile
โ โ โโโ jobs/
โ โ โ โโโ route.ts # GET (list) + POST (create)
โ โ โ โโโ [id]/route.ts # GET + PUT + DELETE by ID
โ โ โ โโโ stats/route.ts # GET dashboard analytics
โ โ โโโ ai/
โ โ โโโ match/route.ts # POST โ match score
โ โ โโโ actions/route.ts# POST โ next actions
โ โ โโโ report/route.ts # POST โ weekly report
โ โ โโโ resume/route.ts # POST โ resume optimizer
โ โ โโโ followup/route.ts# POST โ follow-up generator
โ โ โโโ interview/route.ts# POST โ interview prep
โ โโโ dashboard/page.tsx # Stats + charts
โ โโโ jobs/page.tsx # Job list with filters
โ โโโ kanban/page.tsx # Drag-and-drop board
โ โโโ ai-copilot/page.tsx # All 6 AI features
โ โโโ profile/page.tsx # User settings
โ โโโ login/page.tsx # Auth pages
โ โโโ signup/page.tsx
โ โโโ layout.tsx # Root layout + providers
โ โโโ globals.css # Design system + animations
โ
โโโ components/ # Reusable UI components
โ โโโ layout/
โ โ โโโ Sidebar.tsx # Main navigation
โ โ โโโ AppLayout.tsx # Authenticated page wrapper
โ โโโ dashboard/
โ โ โโโ StatCard.tsx # Metric display card
โ โโโ jobs/
โ โ โโโ JobCard.tsx # Job application card
โ โ โโโ JobFormModal.tsx # Add/edit modal
โ โโโ kanban/
โ โ โโโ KanbanBoard.tsx # DnD board
โ โโโ ai/
โ โโโ AIPanels.tsx # All 6 AI feature panels
โ
โโโ hooks/ # Zustand stores (state management)
โ โโโ useAuth.ts # Auth state + actions
โ โโโ useJobs.ts # Jobs state + CRUD actions
โ
โโโ lib/ # Core utilities
โ โโโ db.ts # MongoDB connection (cached)
โ โโโ auth.ts # JWT sign/verify helpers
โ โโโ middleware.ts # withAuth() route guard
โ โโโ openai.ts # All AI feature functions
โ โโโ api-client.ts # Frontend HTTP client (auto-refresh)
โ
โโโ models/ # Mongoose schemas
โ โโโ User.ts # User model (with bcrypt hook)
โ โโโ Job.ts # Job application model
โ
โโโ types/ # TypeScript type definitions
โ โโโ index.ts # All shared types
โ
โโโ utils/ # Shared utilities
โโโ index.ts # cn(), formatDate(), constants
- Node.js 18+
- MongoDB Atlas account (free tier works)
- OpenAI API key
git clone https://github.com/yourusername/ai-job-copilot.git
cd ai-job-copilotnpm installcp .env.example .env.localEdit .env.local:
MONGODB_URI=mongodb+srv://...
JWT_SECRET=your-secret-key-min-32-chars
JWT_REFRESH_SECRET=your-refresh-secret-min-32-chars
OPENAI_API_KEY=sk-proj-...
NEXT_PUBLIC_APP_URL=http://localhost:3000npm run devOpen http://localhost:3000 โ you'll be redirected to login.
Navigate to /signup, create an account. No email verification required in development.
| Variable | Required | Description |
|---|---|---|
MONGODB_URI |
โ | MongoDB connection string |
JWT_SECRET |
โ | Secret for signing access tokens (min 32 chars) |
JWT_REFRESH_SECRET |
โ | Secret for refresh tokens (different from above) |
OPENAI_API_KEY |
โ | Your OpenAI API key (for all AI features) |
NEXT_PUBLIC_APP_URL |
โ | Your app's base URL |
JWT_ACCESS_EXPIRY |
โ | Access token expiry (default: 15m) |
JWT_REFRESH_EXPIRY |
โ | Refresh token expiry (default: 7d) |
OPENAI_MODEL |
โ | OpenAI model to use (default: gpt-4o) |
The AI layer (src/lib/openai.ts) uses structured prompt engineering to get reliable JSON from GPT-4o:
1. User triggers an AI feature (e.g., Match Score)
2. Frontend POSTs to /api/ai/match with job data
3. API route (protected by withAuth middleware) fetches user's resume from DB
4. openai.ts constructs a system + user prompt with strict JSON schema
5. GPT-4o returns structured JSON (match score, skills, suggestions)
6. API validates and returns to frontend
7. Frontend renders the AI results with rich UI
Key design decisions:
- System prompt defines the AI's role and instructs JSON-only output
- User prompt injects real data (resume, job description, stats)
- Responses parsed with a
parseJSON<T>()helper that strips markdown fences - Each feature has its own typed interface (e.g.,
MatchAnalysis,NextAction) - All AI calls are wrapped in try/catch with user-friendly error messages
The UI is built on a custom premium dark theme:
- Colors: Deep black (#080B14) backgrounds, purple (#7C3AED) accent, blue (#2563EB) secondary
- Typography: Syne (display/headings) + DM Sans (body) โ chosen for premium SaaS feel
- Effects: Glassmorphism cards, glow shadows, ambient background orbs, grid pattern
- Animations: Staggered fade-in-up, shimmer skeletons, hover lift, spin loaders
- Components: All in
globals.cssas@layer componentsโglass-card,btn-primary,input-field,badge,nav-item
| Page | Route | Description |
|---|---|---|
| Login | /login |
JWT authentication |
| Signup | /signup |
Account creation |
| Dashboard | /dashboard |
Stats, charts, recent jobs |
| Applications | /jobs |
Full list with search/filter |
| Kanban | /kanban |
Drag-and-drop pipeline |
| AI Copilot | /ai-copilot |
All 6 AI features |
| Profile | /profile |
Resume, skills, target roles |
- Email notifications for follow-up reminders
- Browser extension to auto-import jobs from LinkedIn/Indeed
- AI-generated cover letters
- Calendar integration for interview scheduling
- Team/referral features (share job leads with connections)
- Export to CSV / PDF report
- Dark/light mode toggle
- Mobile app (React Native)
- Job market analytics (trends by role/location)
- Integration with Glassdoor for salary data
- JWT refresh token flow โ implementing secure silent token refresh without user interruption
- OpenAI structured outputs โ prompting for reliable JSON with type-safe parsing
- DnD-kit โ building accessible drag-and-drop that works on touch devices
- Mongoose connection caching โ preventing hot-reload from spawning too many DB connections
- Zustand with persistence โ persisting auth state across page refreshes without Redux complexity
- Next.js App Router patterns โ route handlers, server components, client components
Built with โค๏ธ and a lot of โ | AI Job Copilot