Connecting Job Seekers with Opportunities β’ Empowering Employers with Tools
Features β’ Installation β’ Documentation β’ Contributing
# Clone the repository
git clone https://github.com/Abhay-0103/Job-Portal-Project.git
cd Job-Portal-Project
# Backend setup
cd backend
npm install
# Configure .env file (see Installation section)
npm run dev
# Frontend setup (new terminal)
cd frontend
npm install
npm run dev
# Access the app at http://localhost:5173Prerequisites: Node.js v14+, MongoDB, npm v6+
- Overview
- Features
- Tech Stack
- Project Structure
- Core Features Breakdown
- Dependencies
- Design System
- Performance Optimizations
- Security Features
- Installation
- Environment Variables
- Usage
- API Documentation
- Deployment Guide
- Testing
- Browser Support
- Troubleshooting
- Future Enhancements
- FAQ
- Additional Resources
- Contributing
- Author
- License
- Acknowledgments
- Support
- Project Status
Job Portal is a comprehensive full-stack MERN (MongoDB, Express, React, Node.js) application designed to revolutionize the job search and recruitment process. Built as part of the BTI College Project, this platform seamlessly connects job seekers with employers, offering an intuitive interface and powerful features for modern hiring needs.
- Create a user-friendly platform for job seekers to find and apply for jobs
- Provide employers with efficient tools to manage job postings and applicants
- Implement secure authentication and role-based access control
- Build a scalable and maintainable codebase following industry best practices
- Deliver a responsive, modern UI that works across all devices
- Job Seekers - Individuals searching for employment opportunities
- Employers - Companies and recruiters posting job openings
- Administrators - Platform managers (future enhancement)
- π Secure Authentication - JWT-based authentication with bcrypt password hashing
- π Analytics Dashboard - Real-time insights and metrics for employers
- πΌ Job Management - Full CRUD operations for job postings with status control
- π Application Tracking - Comprehensive application management system
- β Save Jobs - Bookmark and organize favorite job opportunities
- π€ Profile Management - Rich user profiles with image upload support
- π¨ Modern UI/UX - Built with TailwindCSS and Framer Motion animations
- π± Responsive Design - Mobile-first approach for all devices
- π Real-time Notifications - Toast notifications for user actions
- π Advanced Search - Filter jobs by title, location, type, and more
- π Smart Job Search - Search jobs by title, keywords, location, and company
- π― Advanced Filters - Filter by job type (Full-time, Part-time, Contract, Internship)
- π Job Details - View comprehensive job descriptions, requirements, and salary
- π Easy Apply - Submit applications with resume upload and cover letter
- π Application Tracking - Monitor all your applications and their status in one place
- π Status Updates - Track application progress (Applied, In Review, Accepted, Rejected)
- β Save Jobs - Bookmark favorite opportunities for quick access later
- π€ Profile Management - Create and customize your professional profile
- πΌοΈ Profile Picture - Upload and update your profile picture
- π Resume Upload - Attach your resume to job applications
- πΌ Experience & Skills - Showcase your qualifications and expertise
- π± Responsive Dashboard - Access your dashboard from any device
- π Toast Notifications - Get instant feedback on all actions
- π¨ Modern Interface - Clean, intuitive design for better user experience
- β‘ Fast Loading - Optimized performance for quick page loads
- β Post Jobs - Create detailed job listings with rich text descriptions
- βοΈ Edit Listings - Update job details anytime
- ποΈ Delete Jobs - Remove outdated or filled positions
- π Job Status Control - Toggle job postings between open/closed states
- π Job Preview - Preview how your job posting will appear to applicants
- π·οΈ Categorize Jobs - Add job type, location, salary range, and requirements
- π₯ Review Applications - Access and evaluate all candidate applications
- οΏ½ Application Dashboard - See all applicants in a centralized view
- π― Filter Applicants - Sort by application date, status, or position
- π View Resumes - Download and review applicant resumes
- β Update Status - Change application status (Applied, In Review, Accepted, Rejected)
- π€ Applicant Profiles - View detailed candidate information in modal
- π Dashboard Analytics - Comprehensive metrics and statistics
- π Key Metrics:
- Total jobs posted
- Total applications received
- Active vs closed jobs
- Applications by status
- Recent application trends
- π Visual Data - Charts and graphs for better insights (future enhancement)
- π’ Company Profile - Showcase your organization professionally
- οΏ½οΈ Company Logo - Upload and display your company logo
- π About Company - Add company description and information
- π Contact Details - Display company contact information
- π Secure Login - JWT-based authentication system
- π User Registration - Easy signup with role selection (Job Seeker / Employer)
- π Password Security - Bcrypt password hashing with salt rounds
- πͺ Logout - Secure session termination
- π‘οΈ Protected Routes - Role-based access control for different user types
- π§ Clean Navigation - Intuitive navbar with quick access to key features
- π± Mobile Responsive - Seamless experience on all screen sizes
- π― Breadcrumbs - Easy navigation tracking (future enhancement)
- π Search Bar - Global search functionality
- β‘ Fast Performance - Optimized with Vite build tool
- π¨ Smooth Animations - Framer Motion for delightful interactions
- π Real-time Updates - Instant UI updates without page refresh
- πΎ Data Persistence - Session management with localStorage
- π― Error Handling - Comprehensive error messages and validation
| Technology | Version | Purpose | Documentation |
|---|---|---|---|
| Node.js | Latest | JavaScript runtime environment | Docs |
| Express.js | 5.1.0 | Fast, minimalist web framework | Docs |
| MongoDB | - | NoSQL document database | Docs |
| Mongoose | 8.19.2 | MongoDB object modeling & validation | Docs |
| JWT | 9.0.2 | Secure token-based authentication | Docs |
| Bcrypt.js | 3.0.2 | Password hashing & encryption | Docs |
| Multer | 2.0.2 | Multipart/form-data file upload | Docs |
| Cors | 2.8.5 | Cross-origin resource sharing | Docs |
| Dotenv | 17.2.3 | Environment variable loader | Docs |
| Nodemon | 3.1.10 | Development auto-restart utility | Docs |
| Technology | Version | Purpose | Documentation |
|---|---|---|---|
| React | 19.1.1 | Component-based UI library | Docs |
| Vite | 7.1.7 | Next-gen frontend build tool | Docs |
| TailwindCSS | 4.1.14 | Utility-first CSS framework | Docs |
| React Router DOM | 7.7.0 | Declarative routing for React | Docs |
| Axios | 1.10.0 | Promise-based HTTP client | Docs |
| Framer Motion | 12.23.24 | Production-ready animations | Docs |
| Lucide React | 0.546.0 | Beautiful & consistent icons (500+) | Docs |
| React Hot Toast | 2.6.0 | Lightweight toast notifications | Docs |
| Moment.js | 2.30.1 | Parse, validate, manipulate dates | Docs |
| ESLint | 9.36.0 | Code quality & linting tool | Docs |
| Aspect | Implementation | Description |
|---|---|---|
| Architecture Pattern | MVC (Model-View-Controller) | Separates data, logic, and presentation |
| API Design | RESTful API | Standard HTTP methods & status codes |
| Authentication | JWT with HTTP-only cookies | Secure token-based auth |
| State Management | React Context API | Global state for user auth |
| Database | NoSQL (MongoDB) | Document-based flexible schema |
| Styling Approach | Utility-first CSS | TailwindCSS atomic classes |
| File Structure | Feature-based | Organized by functionality |
| Code Organization | Modular components | Reusable, maintainable code |
| API Communication | Axios with interceptors | Centralized HTTP requests |
| Routing | Client-side routing | React Router DOM |
| Form Handling | Controlled components | React state management |
| Error Handling | Try-catch with middleware | Graceful error responses |
| Tool | Purpose |
|---|---|
| VS Code | Primary code editor |
| Postman | API testing & documentation |
| MongoDB Compass | Database GUI & management |
| Git | Version control system |
| GitHub | Code repository & collaboration |
| Chrome DevTools | Frontend debugging |
| React DevTools | Component debugging |
Click to expand complete project structure
job-portal/
β
βββ π backend/ # Backend API Server (Node.js + Express)
β βββ π .env # Environment variables (not in repo)
β βββ π .gitignore # Git ignore rules
β βββ π package.json # Backend dependencies & scripts
β βββ π server.js # Entry point - Express server setup
β β
β βββ π config/ # Configuration Files
β β βββ π db.js # MongoDB connection & database setup
β β
β βββ π controllers/ # Request Handlers & Business Logic
β β βββ π analyticsController.js # Analytics data & metrics management
β β βββ π applicationController.js # Job application CRUD operations
β β βββ π authController.js # User registration, login & authentication
β β βββ π jobController.js # Job posting CRUD & search operations
β β βββ π savedJobController.js # Saved/bookmarked jobs functionality
β β βββ π userController.js # User profile & data management
β β
β βββ π middlewares/ # Custom Middleware Functions
β β βββ π authMiddleware.js # JWT token verification & route protection
β β βββ π uploadMiddleware.js # Multer configuration for file uploads
β β
β βββ π models/ # Mongoose Database Schemas
β β βββ π Analytics.js # Analytics data schema
β β βββ π Application.js # Job application schema with status tracking
β β βββ π Job.js # Job posting schema with employer reference
β β βββ π SavedJob.js # Saved jobs schema with user reference
β β βββ π User.js # User account schema (jobSeeker/employer)
β β
β βββ π routes/ # API Route Definitions
β β βββ π analyticsRoutes.js # GET /api/analytics/* endpoints
β β βββ π applicationRoutes.js # /api/applications/* endpoints
β β βββ π authRoutes.js # POST /api/auth/register, /login endpoints
β β βββ π jobRoutes.js # /api/jobs/* CRUD endpoints
β β βββ π savedJobsRoutes.js # /api/save-jobs/* endpoints
β β βββ π userRoutes.js # /api/user/profile endpoints
β β
β βββ π uploads/ # Directory for user uploaded files
β βββ (resumes, images, documents) # Multer storage location
β
β
βββ π frontend/ # Frontend Application (React + Vite)
β βββ π .gitignore # Git ignore rules for frontend
β βββ π eslint.config.js # ESLint configuration & rules
β βββ π index.html # HTML entry point with Vite
β βββ π package.json # Frontend dependencies & scripts
β βββ π vite.config.js # Vite build & dev server configuration
β βββ π README.md # Frontend-specific documentation
β β
β βββ π public/ # Static Public Assets
β β βββ (images, icons, fonts) # Publicly accessible files
β β
β βββ π src/ # Source Code Directory
β βββ π App.jsx # Root application component with routing
β βββ π main.jsx # React DOM entry point
β βββ π index.css # Global TailwindCSS styles & custom CSS
β β
β βββ π assets/ # Static Assets (Images, Icons, Media)
β β βββ (logos, banners, icons) # Project-specific images
β β
β βββ π components/ # Reusable UI Components
β β βββ π LoadingSpinner.jsx # Loading state spinner component
β β βββ π StatusBadge.jsx # Application status badge component
β β β
β β βββ π Cards/ # Card-based UI Components
β β β βββ π ApplicantDashboardCard.jsx # Applicant info card for employer
β β β βββ π ApplicantProfilPreview.jsx # Applicant profile modal/preview
β β β βββ π JobCard.jsx # Job listing card component
β β β βββ π JobDashboardCard.jsx # Job metrics card for dashboard
β β β βββ π JobPostingPreview.jsx # Job posting preview card
β β β
β β βββ π Input/ # Form Input Components
β β β βββ π InputField.jsx # Reusable text input with validation
β β β βββ π SalaryRangeSlider.jsx # Salary range slider component
β β β βββ π SelectField.jsx # Dropdown select field component
β β β βββ π TextareaField.jsx # Multiline text input component
β β β
β β βββ π layout/ # Layout & Structure Components
β β βββ π DashboardLayout.jsx # Dashboard page wrapper layout
β β βββ π Navbar.jsx # Top navigation bar with auth
β β βββ π ProfileDropdown.jsx # User profile dropdown menu
β β
β βββ π context/ # React Context API Providers
β β βββ π AuthContext.jsx # Global authentication state management
β β
β βββ π pages/ # Page-level Components (Routes)
β β β
β β βββ π Auth/ # Authentication Pages
β β β βββ π Login.jsx # User login page
β β β βββ π SignUp.jsx # User registration page (role selection)
β β β
β β βββ π Employer/ # Employer-specific Pages
β β β βββ π ApplicationViewer.jsx # View & manage job applicants
β β β βββ π EditProfileDetails.jsx # Edit company/employer profile
β β β βββ π EmployerDashboard.jsx # Employer analytics dashboard
β β β βββ π EmployerProfilePage.jsx # View company profile page
β β β βββ π JobPostingForm.jsx # Create/edit job posting form
β β β βββ π ManageJobs.jsx # Job listings management page
β β β
β β βββ π JobSeeker/ # Job Seeker-specific Pages
β β β βββ π JobDetails.jsx # Individual job detail page
β β β βββ π JobSeekerDashboard.jsx # Job search & browse dashboard
β β β βββ π SavedJobs.jsx # Saved/bookmarked jobs page
β β β βββ π UserProfile.jsx # Job seeker profile page
β β β β
β β β βββ π components/ # Job Seeker-specific Components
β β β βββ π FilterContent.jsx # Advanced job search filters
β β β βββ π SearchHeader.jsx # Search bar with filters
β β β
β β βββ π LandingPage/ # Public Landing Page
β β βββ π LandindPage.jsx # Main landing page component
β β β
β β βββ π components/ # Landing Page Sections
β β βββ π Analytics.jsx # Platform statistics section
β β βββ π Features.jsx # Key features showcase
β β βββ π Footer.jsx # Footer with links & info
β β βββ π Header.jsx # Landing page header/navigation
β β βββ π Hero.jsx # Hero section with CTA
β β
β βββ π routes/ # Route Configuration & Protection
β β βββ π ProtectedRoute.jsx # HOC for authenticated route protection
β β
β βββ π utils/ # Utility Functions & Helpers
β βββ π apiPaths.js # Centralized API endpoint constants
β βββ π axiosInstance.js # Pre-configured Axios instance with interceptors
β βββ π data.js # Static data & mock constants
β βββ π helper.js # Common helper functions (date, format, etc.)
β βββ π uploadImage.js # Image upload utility functions
β
βββ π README.md # Main project documentation (this file)
| Category | Count | Description |
|---|---|---|
| Backend Controllers | 6 | Business logic handlers |
| Backend Models | 5 | Database schemas |
| Backend Routes | 6 | API endpoint definitions |
| Backend Middlewares | 2 | Custom middleware functions |
| Frontend Pages | 13 | Main page components |
| Frontend Components | 18 | Reusable UI components |
| Frontend Utilities | 5 | Helper functions |
| Configuration Files | 7 | Project & build configs |
| Total Files | ~62+ | Excluding node_modules & uploads |
Ensure you have the following installed on your system:
| Software | Version | Download Link |
|---|---|---|
| Node.js | v14.0+ | nodejs.org |
| npm | v6.0+ | Included with Node.js |
| MongoDB | v4.4+ | mongodb.com |
| Git | Latest | git-scm.com |
git clone https://github.com/Abhay-0103/Job-Portal-Project.git
cd Job-Portal-Project# Navigate to backend directory
cd backend
# Install all dependencies
npm install
# Create .env file in backend directory
touch .env # On Windows: type nul > .envConfigure your .env file:
# Server Configuration
PORT=5000
NODE_ENV=development
# Database Configuration
MONGODB_URI=mongodb://localhost:27017/job-portal
# Or use MongoDB Atlas:
# MONGODB_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/job-portal
# JWT Configuration
JWT_SECRET=your_super_secret_jwt_key_here_change_this
JWT_EXPIRE=7d
# CORS Configuration (Optional)
CORS_ORIGIN=http://localhost:5173# Start the backend server
npm start
# For development with auto-restart
npm run devβ
Backend should be running on http://localhost:5000
Open a new terminal window/tab, then:
# Navigate to frontend directory (from project root)
cd frontend
# Install all dependencies
npm install
# (Optional) Create .env file if you need custom API URL
touch .env # On Windows: type nul > .envConfigure your .env file (if needed):
# API Configuration
VITE_API_URL=http://localhost:5000# Start the development server
npm run devβ
Frontend should be running on http://localhost:5173
| Service | URL | Description |
|---|---|---|
| Frontend | http://localhost:5173 | React application |
| Backend API | http://localhost:5000 | Express API server |
| Uploads | http://localhost:5000/uploads | Static file serving |
Create a file start.sh (Linux/Mac) or start.bat (Windows) in the project root:
start.sh (Linux/Mac):
#!/bin/bash
cd backend && npm install && npm run dev &
cd ../frontend && npm install && npm run devstart.bat (Windows):
@echo off
start cmd /k "cd backend && npm install && npm run dev"
start cmd /k "cd frontend && npm install && npm run dev"| Variable | Description | Example |
|---|---|---|
PORT |
Server port number | 5000 |
MONGODB_URI |
MongoDB connection string | mongodb://localhost:27017/job-portal |
JWT_SECRET |
Secret key for JWT signing | your_secret_key_here |
JWT_EXPIRE |
Token expiration time | 7d (7 days) |
NODE_ENV |
Environment mode | development or production |
| Variable | Description | Example |
|---|---|---|
VITE_API_URL |
Backend API base URL | http://localhost:5000 |
cd backend
# Start with Node
npm start
# or
node server.js
# Start with Nodemon (auto-restart on changes)
npm run devcd frontend
# Start development server with hot reload
npm run dev
# Run ESLint
npm run lintcd backend
# Set environment to production in .env
# NODE_ENV=production
# Start production server
npm startcd frontend
# Build for production
npm run build
# Preview production build locally
npm run preview
# Output will be in: frontend/dist/| Command | Description |
|---|---|
npm start |
Start the server with Node |
npm run dev |
Start with Nodemon (auto-restart) |
| Command | Description |
|---|---|
npm run dev |
Start Vite dev server |
npm run build |
Build for production |
npm run preview |
Preview production build |
npm run lint |
Run ESLint |
- Frontend Development:
http://localhost:5173 - Backend API:
http://localhost:5000 - MongoDB:
mongodb://localhost:27017
http://localhost:5000/api
POST /api/auth/register
Content-Type: application/json
{
"name": "John Doe",
"email": "john@example.com",
"password": "password123",
"role": "jobSeeker" // or "employer"
}POST /api/auth/login
Content-Type: application/json
{
"email": "john@example.com",
"password": "password123"
}
Response: {
"token": "jwt_token_here",
"user": { ... }
}GET /api/auth/me
Authorization: Bearer {token}POST /api/auth/upload-image
Content-Type: multipart/form-data
Authorization: Bearer {token}
Form Data:
image: [file]
Response: {
"imageUrl": "http://localhost:5000/uploads/filename.jpg"
}GET /api/jobs
Query Parameters:
- search: string (optional)
- location: string (optional)
- type: string (optional)GET /api/jobs/get-jobs-employer
Authorization: Bearer {token}GET /api/jobs/:idPOST /api/jobs
Authorization: Bearer {token}
Content-Type: application/json
{
"title": "Full Stack Developer",
"company": "Tech Corp",
"location": "Remote",
"type": "Full-time",
"description": "Job description here",
"requirements": ["Node.js", "React"],
"salary": "80000-100000"
}PUT /api/jobs/:id
Authorization: Bearer {token}
Content-Type: application/json
{
"title": "Updated Title",
...
}DELETE /api/jobs/:id
Authorization: Bearer {token}PUT /api/jobs/:id/toggle-close
Authorization: Bearer {token}GET /api/applications
Authorization: Bearer {token}POST /api/applications
Authorization: Bearer {token}
Content-Type: multipart/form-data
Form Data:
jobId: string
coverLetter: string
resume: [file]GET /api/applications/:id
Authorization: Bearer {token}PUT /api/applications/:id
Authorization: Bearer {token}
Content-Type: application/json
{
"status": "accepted" // or "rejected", "pending"
}GET /api/save-jobs
Authorization: Bearer {token}POST /api/save-jobs
Authorization: Bearer {token}
Content-Type: application/json
{
"jobId": "job_id_here"
}DELETE /api/save-jobs/:id
Authorization: Bearer {token}GET /api/user/profile
Authorization: Bearer {token}PUT /api/user/profile
Authorization: Bearer {token}
Content-Type: application/json
{
"name": "Updated Name",
"bio": "User bio",
"skills": ["JavaScript", "React"]
}GET /api/analytics
Authorization: Bearer {token}
Response: {
"totalJobs": 10,
"totalApplications": 50,
"activeJobs": 8,
"pendingApplications": 20
}| Status Code | Description |
|---|---|
200 |
Success |
201 |
Created |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
500 |
Internal Server Error |
Most endpoints require JWT authentication. Include the token in the Authorization header:
Authorization: Bearer YOUR_JWT_TOKEN_HERE
-
Email Notifications - Automated emails for application updates and job matches
- Welcome emails for new users
- Application submission confirmations
- Status change notifications
- Daily/weekly job recommendations
-
Real-time Chat - WebSocket-based messaging between employers and candidates
- One-on-one chat functionality
- Message history and notifications
- File sharing in chat
- Online status indicators
-
Advanced Search & Filters - Enhanced job discovery
- Salary range filters
- Experience level filtering
- Skills-based matching
- Company size preferences
- Remote work options
-
Resume Builder - Integrated resume creation tool
- Multiple template options
- PDF export functionality
- Auto-fill from profile data
- Preview before download
-
Video Interview Integration - Built-in video calling
- Schedule video interviews
- Zoom/Google Meet integration
- Interview recording (with consent)
- Automated reminders
-
AI-Powered Recommendations - Machine learning job matching
- Personalized job suggestions
- Skills gap analysis
- Career path recommendations
- Salary predictions
-
Interview Scheduling - Automated interview coordination
- Calendar integration
- Availability management
- Time zone handling
- Automated reminders
-
Mobile Application - Native mobile apps
- React Native implementation
- iOS and Android support
- Push notifications
- Offline mode support
- Salary Insights - Market salary data and comparisons
- Company Reviews - Employee reviews and ratings
- Skill Assessments - Online coding challenges and tests
- Referral System - Employee referral bonuses
- Job Alerts - Custom email/SMS job notifications
- Analytics Dashboard V2 - Advanced charts and insights
- Multi-language Support - Internationalization (i18n)
- Dark Mode - Theme switching capability
- Social Login - Google, LinkedIn OAuth integration
- Application Templates - Pre-filled application forms
- Bulk Actions - Mass application status updates
- Export Data - CSV/PDF export for jobs and applicants
- Admin Panel - Platform administration dashboard
- Payment Integration - Premium job postings
- Job Expiry - Automatic job closure after deadline
- Performance monitoring dashboard
- Browser extension for job hunting
- Chrome extension for one-click applications
- Automated resume parsing
- Background verification integration
- API for third-party integrations
- Prepare for Deployment
# Login to Heroku
heroku login
# Create new Heroku app
heroku create your-job-portal-api
# Add MongoDB Atlas
# (Set up MongoDB Atlas and get connection string)
# Set environment variables
heroku config:set JWT_SECRET=your_secret_key
heroku config:set MONGODB_URI=your_mongodb_atlas_uri
heroku config:set NODE_ENV=production- Deploy
# Deploy to Heroku
git push heroku main
# View logs
heroku logs --tail- Connect GitHub repository to Railway
- Add environment variables in Railway dashboard
- Deploy automatically on git push
- Set up server (Ubuntu 20.04 recommended)
- Install dependencies:
# Update system
sudo apt update && sudo apt upgrade -y
# Install Node.js
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs
# Install MongoDB
# Or use MongoDB Atlas
# Install PM2 (Process Manager)
sudo npm install -g pm2- Deploy Application:
# Clone repository
git clone https://github.com/Abhay-0103/Job-Portal-Project.git
cd Job-Portal-Project/backend
# Install dependencies
npm install
# Set environment variables
nano .env
# Add all production environment variables
# Start with PM2
pm2 start server.js --name job-portal-api
pm2 save
pm2 startup- Set up Nginx as reverse proxy:
sudo apt install nginx
# Configure Nginx
sudo nano /etc/nginx/sites-available/job-portal
# Add configuration:
server {
listen 80;
server_name your-domain.com;
location / {
proxy_pass http://localhost:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
# Enable site
sudo ln -s /etc/nginx/sites-available/job-portal /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx- Set up SSL with Let's Encrypt:
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d your-domain.com- Install Vercel CLI:
npm i -g vercel- Deploy:
cd frontend
vercel
# Production deployment
vercel --prod- Configure Environment Variables:
- Add
VITE_API_URLin Vercel dashboard - Point to your deployed backend URL
- Build the project:
cd frontend
npm run build- Deploy:
- Drag and drop
distfolder to Netlify - Or connect GitHub repository
- Set build command:
npm run build - Set publish directory:
dist
- Install gh-pages:
npm install --save-dev gh-pages- Add to package.json:
{
"homepage": "https://yourusername.github.io/job-portal",
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d dist"
}
}- Deploy:
npm run deploy- Set
NODE_ENV=production - Use strong
JWT_SECRET - Configure MongoDB Atlas (not local)
- Enable HTTPS/SSL
- Set up CORS properly
- Configure rate limiting
- Add helmet.js for security headers
- Set up logging (Winston/Morgan)
- Configure error tracking (Sentry)
- Enable GZIP compression
- Set up monitoring (PM2/New Relic)
- Database backups enabled
- Environment variables secured
- Update API URLs to production
- Build optimized bundle (
npm run build) - Enable HTTPS
- Add Google Analytics (optional)
- Test on multiple browsers
- Optimize images and assets
- Configure CDN (optional)
- Set up error boundary
- Add meta tags for SEO
- Test mobile responsiveness
# Backend tests (when implemented)
cd backend
npm test
# Frontend tests (when implemented)
cd frontend
npm test
# E2E tests (when implemented)
npm run test:e2e| Module | Coverage | Status |
|---|---|---|
| Authentication | Manual | β Tested |
| Job Management | Manual | β Tested |
| Applications | Manual | β Tested |
| User Profiles | Manual | β Tested |
| File Uploads | Manual | β Tested |
| Unit Tests | 0% | β³ Planned |
| Integration Tests | 0% | β³ Planned |
| E2E Tests | 0% | β³ Planned |
- User can register as Job Seeker
- User can register as Employer
- User can login with valid credentials
- User cannot login with invalid credentials
- JWT token is stored and persists
- User can logout successfully
- Protected routes redirect to login
- Role-based access works correctly
- Can browse all jobs
- Can search jobs by keywords
- Can filter jobs by type/location
- Can view job details
- Can apply to jobs with resume
- Can save/unsave jobs
- Can view saved jobs
- Can track application status
- Can update profile
- Can upload profile picture
- Can post new jobs
- Can edit existing jobs
- Can delete jobs
- Can toggle job open/closed status
- Can view all posted jobs
- Can view applicants for each job
- Can download applicant resumes
- Can update application status
- Can view analytics dashboard
- Can update company profile
- Responsive on mobile devices
- Responsive on tablets
- Works on desktop browsers
- Toast notifications appear
- Loading states display correctly
- Error messages are clear
- Forms validate properly
- Navigation is intuitive
Backend won't start - Port already in use
Error: Error: listen EADDRINUSE: address already in use :::5000
Solution:
# Windows - Find and kill process
netstat -ano | findstr :5000
taskkill /PID <PID> /F
# Linux/Mac - Find and kill process
lsof -ti:5000 | xargs kill -9
# Or change port in .env
PORT=5001MongoDB connection failed
Error: MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017
Solutions:
-
Check if MongoDB is running:
# Windows net start MongoDB # Linux sudo systemctl start mongod # Mac brew services start mongodb-community
-
Verify connection string in .env:
MONGODB_URI=mongodb://localhost:27017/job-portal
-
Check MongoDB status:
# Linux/Mac sudo systemctl status mongod -
Use MongoDB Atlas if local connection fails
JWT token not persisting
Issue: User gets logged out on page refresh
Solutions:
- Check if token is saved to localStorage in
AuthContext.jsx - Verify axios interceptors are configured
- Clear browser cache and cookies
- Check browser console for errors
File upload not working
Error: File upload returns 500 error
Solutions:
- Check
uploadsdirectory exists in backend - Verify file size limits in uploadMiddleware.js
- Check file type validation
- Ensure proper multipart/form-data headers
CORS errors in browser
Error: Access to XMLHttpRequest blocked by CORS policy
Solutions:
-
Verify CORS configuration in server.js:
app.use(cors({ origin: 'http://localhost:5173', credentials: true }));
-
Check CORS_ORIGIN in .env:
CORS_ORIGIN=http://localhost:5173
-
Ensure frontend URL matches allowed origin
Images not displaying
Issue: Uploaded images show broken link
Solutions:
-
Verify uploads directory is served as static:
app.use('/uploads', express.static('uploads'));
-
Check image URL format in database
-
Verify file permissions on uploads directory
-
Check network tab for 404 errors
npm install fails
Error: npm ERR! code ERESOLVE
Solutions:
# Clear npm cache
npm cache clean --force
# Delete package-lock.json and node_modules
rm -rf node_modules package-lock.json
# Reinstall
npm install
# Or use legacy peer deps
npm install --legacy-peer-depsVite build fails
Error: Build failed with errors
Solutions:
- Check for TypeScript/ESLint errors
- Update dependencies:
npm update
- Clear Vite cache:
rm -rf node_modules/.vite
- Rebuild:
npm run build
- Enable compression middleware
- Implement database indexing
- Use connection pooling
- Cache frequently accessed data
- Optimize database queries
- Use PM2 cluster mode
- Code splitting with React.lazy()
- Image optimization and lazy loading
- Implement service workers
- Use React.memo() for expensive components
- Optimize bundle size with tree shaking
- Enable Gzip compression
Q: Can I use this project for commercial purposes? A: Yes, this project is open source under ISC license.
Q: How do I add more user roles?
A: Modify the User model in backend/models/User.js and add role-based logic in controllers.
Q: Can I customize the UI design?
A: Absolutely! All styling is in TailwindCSS - modify classes or update index.css.
Q: How do I add email notifications? A: Integrate nodemailer in backend and create email templates.
Q: Is this production-ready? A: Core features are stable. Add security enhancements (rate limiting, helmet.js) for production.
Q: Can I contribute to this project? A: Yes! Please read the Contributing section and submit PRs.
- None at the moment. Report issues here
We welcome contributions from the community! Here's how you can help:
-
Fork the repository
# Click the 'Fork' button on GitHub -
Clone your fork
git clone https://github.com/YOUR_USERNAME/Job-Portal-Project.git cd Job-Portal-Project -
Create a feature branch
git checkout -b feature/AmazingFeature
-
Make your changes and commit
git add . git commit -m 'Add: AmazingFeature description'
-
Push to your fork
git push origin feature/AmazingFeature
-
Open a Pull Request
- Go to the original repository
- Click "New Pull Request"
- Select your fork and branch
- Describe your changes
- Submit the PR
- β Follow the existing code style and conventions
- β Write clear, descriptive commit messages (use Conventional Commits)
- β Test your changes thoroughly before submitting
- β Update documentation for any new features
- β Add comments for complex logic
- β Keep pull requests focused on a single feature/fix
- β Be respectful and constructive in discussions
Type: Brief description
Examples:
- Add: User authentication feature
- Fix: Job application submission bug
- Update: TailwindCSS to version 4.1
- Refactor: Job controller logic
- Docs: API documentation updates
- β JWT-based authentication with HTTP-only cookies
- β Password hashing using bcrypt (10 salt rounds)
- β Protected routes with middleware authorization
- β Role-based access control (Job Seeker / Employer)
- β Secure file upload with validation
- User Model: Authentication, profile data, role management
- Job Model: Job postings with employer reference
- Application Model: Job applications with status tracking
- SavedJob Model: Bookmarked jobs with user reference
- Analytics Model: Platform metrics and statistics
- RESTful API architecture
- CORS enabled for cross-origin requests
- Error handling middleware
- Request validation
- File upload support (Multer)
- Database connection pooling
- Responsive Design: Mobile-first approach with TailwindCSS
- Animations: Smooth transitions with Framer Motion
- Loading States: Spinner component for async operations
- Status Badges: Visual application status indicators
- Toast Notifications: Real-time user feedback
- Modal Dialogs: Applicant profile preview, confirmations
- Landing Page: Hero, features, analytics, footer
- Authentication: Login, signup with role selection
- Job Seeker Dashboard: Job search, filters, saved jobs
- Employer Dashboard: Analytics, job management, applicants
- Profile Pages: User/company profiles with image upload
- Job Management: Create, edit, delete, toggle status
- React Context API for global auth state
- Local state management with hooks
- Persistent authentication with localStorage
- Axios interceptors for token management
| Package | Version | Purpose |
|---|---|---|
express |
^5.1.0 | Web framework for Node.js |
mongoose |
^8.19.2 | MongoDB ODM for data modeling |
jsonwebtoken |
^9.0.2 | JWT token generation & validation |
bcryptjs |
^3.0.2 | Password hashing & comparison |
cors |
^2.8.5 | Enable CORS for API requests |
dotenv |
^17.2.3 | Environment variable management |
multer |
^2.0.2 | File upload middleware |
| Package | Version | Purpose |
|---|---|---|
nodemon |
^3.1.10 | Auto-restart server on file changes |
| Package | Version | Purpose |
|---|---|---|
react |
^19.1.1 | Core React library |
react-dom |
^19.1.1 | React DOM rendering |
react-router-dom |
^7.7.0 | Client-side routing |
axios |
^1.10.0 | HTTP client for API requests |
tailwindcss |
^4.1.14 | Utility-first CSS framework |
@tailwindcss/vite |
^4.1.14 | TailwindCSS Vite plugin |
framer-motion |
^12.23.24 | Animation library |
lucide-react |
^0.546.0 | Icon library (500+ icons) |
react-hot-toast |
^2.6.0 | Toast notification system |
moment |
^2.30.1 | Date/time manipulation & formatting |
| Package | Version | Purpose |
|---|---|---|
vite |
^7.1.7 | Next-gen build tool & dev server |
@vitejs/plugin-react |
^5.0.4 | Vite plugin for React |
eslint |
^9.36.0 | Code linting & quality |
eslint-plugin-react-hooks |
^5.2.0 | ESLint rules for React hooks |
eslint-plugin-react-refresh |
^0.4.22 | ESLint plugin for React Fast Refresh |
@eslint/js |
^9.36.0 | ESLint JavaScript config |
globals |
^16.4.0 | Global identifiers for ESLint |
@types/react |
^19.1.16 | TypeScript definitions for React |
@types/react-dom |
^19.1.9 | TypeScript definitions for React DOM |
| Color | Hex Code | Usage |
|---|---|---|
| Primary Blue | #2563EB |
Primary buttons, links, accents |
| Secondary Purple | #9333EA |
Gradients, highlights |
| Success Green | #10B981 |
Success messages, hired status |
| Warning Yellow | #F59E0B |
Pending, interview status |
| Error Red | #EF4444 |
Errors, rejected status |
| Gray Scale | #111827 - #F9FAFB |
Text, backgrounds, borders |
- Font Family: System fonts (Inter, -apple-system, BlinkMacSystemFont)
- Headings: Bold, 1.5rem - 2.5rem
- Body Text: Regular, 1rem
- Small Text: 0.875rem
- Border Radius: 0.5rem (rounded-lg)
- Shadows: Subtle box-shadows for elevation
- Transitions: 200-300ms ease-in-out
- Spacing: 4px increment system (Tailwind)
- β Database indexing on frequently queried fields
- β Connection pooling for MongoDB
- β Efficient query design with Mongoose
- β File size limits on uploads (5MB for images)
- β GZIP compression for responses
- β Code splitting with React.lazy()
- β Vite's fast HMR (Hot Module Replacement)
- β Optimized asset bundling
- β TailwindCSS purging for smaller CSS
- β Image optimization and lazy loading
- β Memoization with React.memo() where needed
-
Authentication Security
- JWT tokens with expiration (7 days default)
- Secure password hashing with bcrypt
- HTTP-only cookies (prevents XSS attacks)
- Token validation on protected routes
-
Data Validation
- Input sanitization on all forms
- File type validation for uploads
- Request payload size limits
- Schema validation with Mongoose
-
Access Control
- Role-based authorization
- Route protection middleware
- User-specific data access
- Employer-only endpoints
-
Best Practices
- Environment variables for sensitive data
- CORS configuration for allowed origins
- Error handling without exposing internals
- Regular dependency updates
- Rate limiting on API endpoints
- HTTPS in production
- CSRF protection
- Security headers (Helmet.js)
- Input sanitization library (express-validator)
- SQL injection prevention (already handled by Mongoose)
- User registration (Job Seeker & Employer)
- User login with valid credentials
- Token persistence across sessions
- Logout functionality
- Protected route access
- Browse jobs with search/filters
- View job details
- Apply to jobs with resume upload
- Save/unsave jobs
- View application status
- Update profile
- Post new jobs
- Edit existing jobs
- Delete jobs
- Toggle job open/closed status
- View applicants
- Update application status
- View analytics dashboard
- Unit tests with Jest
- Integration tests for API endpoints
- E2E tests with Cypress/Playwright
- Performance testing
- Accessibility testing (WCAG compliance)
| Browser | Minimum Version | Support Status |
|---|---|---|
| Chrome | Latest 2 versions | β Fully Supported |
| Firefox | Latest 2 versions | β Fully Supported |
| Safari | Latest 2 versions | β Fully Supported |
| Edge | Latest 2 versions | β Fully Supported |
| Opera | Latest 2 versions | β Fully Supported |
| Mobile Safari | iOS 12+ | β Fully Supported |
| Chrome Mobile | Android 8+ | β Fully Supported |
- π MongoDB Documentation
- π Express.js Guide
- π React Documentation
- π TailwindCSS Docs
- π Vite Guide
- π JWT Introduction
- π BTI College - For providing the opportunity and resources
- π» Open Source Community - For amazing tools and libraries
- π Documentation Teams - React, Express, MongoDB, and TailwindCSS
- π¨ Design Inspiration - Modern job portal interfaces
- π₯ Contributors - Thanks to everyone who has contributed to this project
- π Icons - Lucide React icon library
- π Animations - Framer Motion team
If you have any questions or need help with the project:
- π§ Email: ab0321054@gmail.com
- π Report Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
- πΌ LinkedIn: Abhay Singh
- Check existing documentation in this README
- Search closed issues for similar problems
- Open a new issue with detailed description
- Provide error logs and steps to reproduce
Release Date: November 2025
- Core authentication system
- Job posting and management
- Application submission and tracking
- User profiles with image upload
- Employer analytics dashboard
- Saved jobs functionality
- Responsive UI design
- RESTful API implementation
- Email notification system
- Advanced search and filters
- Performance optimizations
- Enhanced analytics
- Real-time chat feature
- Video interview integration
- AI-powered job recommendations
- Mobile application (React Native)
- Resume builder tool
- Company reviews and ratings
- Interview scheduling system
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
Made with β€οΈ by Abhay Singh
Β© 2025 Job Portal - BTI College Project. All Rights Reserved.