Skip to content

dimitrisabra/Job-Tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“‹ JobTracker β€” Full-Stack Job Application Tracker

A complete, production-ready job application tracking system with user and admin roles, built with React, Node.js, Express, and MongoDB.


✨ Features

User Features

  • πŸ“Š Dashboard β€” Visual stats (total, interviews, offers, rejected) with bar & pie charts
  • πŸ’Ό Applications CRUD β€” Add, edit, delete job applications with full details
  • πŸ” Search & Filter β€” Search by title/company/notes, filter by status, sort by multiple fields
  • πŸ“„ Pagination β€” Efficient paginated results
  • πŸ”” Email Notifications β€” Mocked email on status change (real SMTP ready)
  • πŸ€– AI Notes Suggestions β€” OpenAI-powered improvements for application notes
  • πŸ“‹ Activity Log β€” Full history of all user actions
  • πŸ‘€ Profile Management β€” Update name, email, and password

Admin Features

  • ⚑ Admin Dashboard β€” Platform-wide analytics and user growth charts
  • πŸ‘₯ User Management β€” View, suspend, activate, and delete users
  • πŸ—‚οΈ All Applications β€” View and filter every application in the system
  • πŸ“ˆ Analytics β€” Status breakdowns, monthly growth, key metrics

Tech Highlights

  • πŸ” JWT authentication with role-based route protection
  • πŸ”’ Password hashing with bcrypt (12 rounds)
  • ⚑ Rate limiting (100 req/15 min per IP)
  • πŸ“± Fully responsive β€” mobile + desktop
  • πŸŒ™ Dark theme with clean modern UI

πŸš€ Quick Start

Prerequisites

  • Node.js v18+
  • MongoDB (local or Atlas)
  • npm or yarn

1. Clone the Repository

git clone <your-repo-url>
cd job-tracker

2. Backend Setup

cd backend
npm install

Create your .env file:

cp .env.example .env

Edit .env with your values:

PORT=5000
NODE_ENV=development
MONGODB_URI=mongodb://localhost:27017/job-tracker
JWT_SECRET=your_super_secret_key_change_this
JWT_EXPIRES_IN=7d
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your_email@gmail.com
EMAIL_PASS=your_app_password
OPENAI_API_KEY=sk-your-openai-key   # Optional β€” for AI notes feature
FRONTEND_URL=http://localhost:5173

Seed sample data (optional but recommended):

npm run seed

This creates:

Role Email Password
Admin admin@jobtracker.com Admin123!
User alex@example.com password123
User sarah@example.com password123

Start the backend:

npm run dev    # Development with nodemon
npm start      # Production

Backend runs at: http://localhost:5000


3. Frontend Setup

cd ../frontend
npm install
npm run dev

Frontend runs at: http://localhost:5173

The Vite dev server proxies /api requests to localhost:5000 automatically.


πŸ“ Project Structure

job-tracker/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ controllers/
β”‚   β”‚   β”œβ”€β”€ authController.js      # Signup, login, getMe
β”‚   β”‚   β”œβ”€β”€ jobController.js       # CRUD, stats, AI suggest
β”‚   β”‚   β”œβ”€β”€ userController.js      # Profile, password
β”‚   β”‚   └── adminController.js     # Admin analytics, user mgmt
β”‚   β”œβ”€β”€ middleware/
β”‚   β”‚   β”œβ”€β”€ auth.js                # JWT protect + adminOnly
β”‚   β”‚   └── errorHandler.js        # Global error handling
β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ User.js                # User schema + bcrypt hooks
β”‚   β”‚   β”œβ”€β”€ Job.js                 # Job application schema
β”‚   β”‚   └── ActivityLog.js         # Audit trail (90-day TTL)
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”œβ”€β”€ authRoutes.js
β”‚   β”‚   β”œβ”€β”€ jobRoutes.js
β”‚   β”‚   β”œβ”€β”€ userRoutes.js
β”‚   β”‚   └── adminRoutes.js
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ emailService.js        # Nodemailer email notifications
β”‚   β”‚   └── seedData.js            # Development seed script
β”‚   β”œβ”€β”€ .env.example
β”‚   β”œβ”€β”€ package.json
β”‚   └── server.js
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ common/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ LoadingScreen.jsx  # Loading screen + Spinner
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Pagination.jsx     # Reusable pagination
β”‚   β”‚   β”‚   β”‚   └── StatusBadge.jsx    # Job status badges
β”‚   β”‚   β”‚   β”œβ”€β”€ jobs/
β”‚   β”‚   β”‚   β”‚   └── JobModal.jsx       # Add/edit job modal + AI
β”‚   β”‚   β”‚   └── layout/
β”‚   β”‚   β”‚       β”œβ”€β”€ Layout.jsx         # App shell
β”‚   β”‚   β”‚       └── Sidebar.jsx        # Navigation sidebar
β”‚   β”‚   β”œβ”€β”€ context/
β”‚   β”‚   β”‚   └── AuthContext.jsx        # Global auth state
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”‚   β”œβ”€β”€ Login.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Register.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Dashboard.jsx          # Stats + charts
β”‚   β”‚   β”‚   β”œβ”€β”€ Jobs.jsx               # Application list + CRUD
β”‚   β”‚   β”‚   β”œβ”€β”€ Profile.jsx            # Profile + password
β”‚   β”‚   β”‚   β”œβ”€β”€ ActivityLog.jsx        # User activity history
β”‚   β”‚   β”‚   └── admin/
β”‚   β”‚   β”‚       β”œβ”€β”€ AdminDashboard.jsx
β”‚   β”‚   β”‚       β”œβ”€β”€ AdminUsers.jsx
β”‚   β”‚   β”‚       └── AdminJobs.jsx
β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”‚   └── api.js                 # Axios + all API calls
β”‚   β”‚   β”œβ”€β”€ App.jsx                    # Router + route guards
β”‚   β”‚   └── index.css                  # Tailwind + custom styles
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ vite.config.js
β”‚   └── tailwind.config.js
β”‚
└── README.md

πŸ“˜ API Documentation

Base URL: http://localhost:5000/api

All protected routes require: Authorization: Bearer <token>


πŸ” Auth

Method Endpoint Auth Description
POST /auth/signup ❌ Register new user
POST /auth/login ❌ Login, get JWT
GET /auth/me βœ… Get current user

POST /auth/signup

{ "name": "Alex Johnson", "email": "alex@example.com", "password": "password123" }

Response: { token, user: { _id, name, email, role, status } }

POST /auth/login

{ "email": "alex@example.com", "password": "password123" }

Response: { token, user: { _id, name, email, role, status, lastLogin } }


πŸ’Ό Jobs

Method Endpoint Auth Description
GET /jobs βœ… List user's jobs (paginated)
GET /jobs/stats βœ… Dashboard statistics
GET /jobs/activity βœ… User activity log
GET /jobs/:id βœ… Get single job
POST /jobs βœ… Create job
PUT /jobs/:id βœ… Update job
DELETE /jobs/:id βœ… Delete job
POST /jobs/:id/ai-suggest βœ… AI notes suggestion

GET /jobs β€” Query params:

?page=1&limit=10&status=Applied&search=stripe&sortBy=createdAt&sortOrder=desc

POST /jobs β€” Body:

{
  "jobTitle": "Senior Engineer",
  "company": "Stripe",
  "status": "Applied",
  "notes": "Applied via referral",
  "dateApplied": "2024-08-15",
  "location": "Remote",
  "salary": "$150k–$180k",
  "jobUrl": "https://stripe.com/jobs/123"
}

πŸ‘€ Users

Method Endpoint Auth Description
GET /users/profile βœ… Get profile
PUT /users/profile βœ… Update name/email
PUT /users/change-password βœ… Change password
GET /users/activity βœ… Activity log

⚑ Admin (Admin role required)

Method Endpoint Auth Description
GET /admin/stats βœ… Admin Platform analytics
GET /admin/users βœ… Admin All users (paginated)
GET /admin/users/:id βœ… Admin User detail + jobs
PATCH /admin/users/:id/status βœ… Admin Suspend/activate user
DELETE /admin/users/:id βœ… Admin Delete user + data
GET /admin/jobs βœ… Admin All jobs (paginated)
GET /admin/activity βœ… Admin System activity log

πŸ”§ Environment Variables

Variable Required Description
MONGODB_URI βœ… MongoDB connection string
JWT_SECRET βœ… Secret for JWT signing (keep secure!)
JWT_EXPIRES_IN ❌ Token expiry (default: 7d)
PORT ❌ Server port (default: 5000)
NODE_ENV ❌ development or production
FRONTEND_URL ❌ CORS allowed origin
EMAIL_HOST ❌ SMTP host
EMAIL_PORT ❌ SMTP port
EMAIL_USER ❌ SMTP email address
EMAIL_PASS ❌ SMTP password or app password
OPENAI_API_KEY ❌ For AI notes suggestions

🚒 Deployment

Backend (Railway / Render / Fly.io)

  1. Set all environment variables in the platform dashboard
  2. Set NODE_ENV=production
  3. Set FRONTEND_URL=https://your-frontend.vercel.app
  4. Deploy from your Git repo

Frontend (Vercel / Netlify)

  1. Update vite.config.js proxy OR set VITE_API_URL env var
  2. In src/services/api.js, change baseURL to your backend URL:
    baseURL: import.meta.env.VITE_API_URL || '/api'
  3. Deploy frontend to Vercel/Netlify

MongoDB Atlas

  1. Create a free cluster at mongodb.com/atlas
  2. Whitelist your server's IP
  3. Copy the connection string to MONGODB_URI

πŸ€– AI Feature Setup

  1. Get an API key from platform.openai.com
  2. Add OPENAI_API_KEY=sk-... to your .env
  3. In the Jobs page β†’ Edit a job β†’ click πŸ€– AI Suggest

The AI analyzes the job title, company, and current notes, then suggests improvements including interview prep, follow-up points, and research areas.


πŸ§ͺ Sample Test Data

After running npm run seed in the backend:

  • Admin account: Full admin dashboard access
  • Alex's account: 10 pre-populated job applications across all statuses, spanning 6 months of data for realistic chart visualization
  • Sarah's account: 2 applications for additional variety

πŸ“ License

MIT β€” free to use, modify, and distribute.

About

A complete, production-ready job application tracking system with user and admin roles, built with React, Node.js, Express, and MongoDB.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors