Overview
Welcome to Job Portal
A modern, feature-rich job portal built with React 18 (Admin Panel), Angular (Frontend), and Node.js (Backend). Perfect for job boards, recruitment agencies, and HR departments.
For Employers
Post jobs, manage applications, communicate with candidates, and track your hiring process.
For Job Seekers
Search jobs, apply with multiple resumes, track applications, and communicate with employers.
Admin Panel (React)
Modern React-based admin with CMS, user management, bulk operations, and analytics dashboard.
Technology Stack
Quick Links
Installation Guide
Step 1: Install Dependencies
cd backend
npm install
cd frontend
npm install
cd admin
npm install
Step 2: Set Up MongoDB
- Install MongoDB from official website
- Start MongoDB service:
Linux/Mac
sudo systemctl start mongod # or mongod - Verify MongoDB is running:
Command
mongosh
Step 3: Configure Environment
Update environment files in each application:
Backend Configuration
Create .env file in backend/ directory:
PORT=4000
DB_URL=mongodb://localhost:27017/job-portal
JWT_SECRET=your-secret-key-change-in-production
SESSION_SECRET=your-session-secret-change-in-production
# Optional
SENDGRID_API_KEY=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
LINKEDIN_CLIENT_ID=
LINKEDIN_CLIENT_SECRET=
Admin Panel Configuration (Optional)
Create .env file in admin/ directory:
VITE_API_URL=http://localhost:4000/
If not provided, defaults to http://localhost:4000/
Step 4: Start Development Servers
Backend Server
cd backend
npm start
Runs on http://localhost:4000
Frontend Application
cd frontend
npm start
Runs on http://localhost:4200
Admin Panel (React)
cd admin
npm run dev
Runs on http://localhost:3001
Step 5: Create Admin User
Before logging in, create an admin user:
curl -X POST http://localhost:4000/auth/register/admin \
-H "Content-Type: application/json" \
-d '{
"name": "Admin User",
"email": "admin@example.com",
"password": "Admin123!",
"company": "My Company"
}'
Then login at http://localhost:3001/login with your credentials.
Step 6: Seed Sample Data (Optional)
Populate database with test data:
curl -X POST http://localhost:4000/api/seeder/seed
See Test Credentials section for login details.
Access URLs
- Admin Panel:
http://localhost:3001 - Frontend:
http://localhost:4200 - Backend API:
http://localhost:4000
Configuration Guide
Environment Variables
Configure your application using environment variables or config files.
Backend Environment Variables
| Variable | Description | Default |
|---|---|---|
DB_URL |
MongoDB connection string | mongodb://localhost:27017/job-portal |
JWT_SECRET |
Secret key for JWT tokens | your-secret-key-change-in-production |
PORT |
Server port | 4000 |
NODE_ENV |
Environment mode | development |
SENDGRID_API_KEY |
SendGrid API key for emails | - |
GOOGLE_CLIENT_ID |
Google OAuth client ID | - |
GOOGLE_CLIENT_SECRET |
Google OAuth client secret | - |
File Upload Configuration
Configure file upload settings in backend/app/config/config.js:
upload: {
maxFileSize: 5 * 1024 * 1024, // 5MB
allowedMimeTypes: [
'image/jpeg',
'image/png',
'application/pdf',
'application/msword'
]
}
Email Configuration
Set up email notifications using SendGrid:
- Create a SendGrid account
- Generate an API key
- Add to
.env:.envSENDGRID_API_KEY=your-api-key-here FROM_EMAIL=noreply@yourdomain.com FROM_NAME=Job Portal
OAuth Configuration
Configure Google and LinkedIn OAuth from the admin panel under Settings → OAuth.
See ../OAUTH_SETUP_GUIDE.md for detailed OAuth setup instructions.
Features
Employer Features
Job Posting
Create and manage job listings with rich descriptions, requirements, and salary information.
Application Management
Review, shortlist, and manage candidate applications with status tracking.
Real-Time Messaging
Communicate directly with job seekers through integrated chat system.
Application Notes
Add internal notes and comments to applications for team collaboration.
Advanced Filtering
Filter applications by status, date range, and job position.
Job Seeker Features
Advanced Job Search
Search by keywords, location, industry, salary range, and more.
Multiple Resume Management
Upload and manage multiple resumes, set default, select per application.
Cover Letter Support
Add personalized cover letters to job applications.
Job Alerts
Create personalized job alerts with email notifications.
Search History
Automatically save and access recent job searches.
Social Sharing
Share job listings on social media platforms.
Admin Features
Dashboard Analytics
Real-time statistics, metrics, and activity tracking with clickable navigation cards.
Bulk Operations
Select multiple jobs/users for bulk activate, deactivate, or delete operations.
Job Approval Workflow
Approve or reject jobs with notes, track approval status, and manage pending jobs.
CSV Export
Export jobs, users, and applications data to CSV format.
CMS Management
Create and manage custom content pages (About, Contact, Help, Terms, Privacy) with SEO.
Settings & Branding
Configure application settings, upload logos/favicons, OAuth setup, and customize colors.
User Verification
Verify or reject users with notes, block/unblock users, and manage user status.
API Reference
http://localhost:4000/api/ (development) or /api/ (production)
Authentication
Most endpoints require authentication. Include JWT token in headers:
Authorization: Bearer YOUR_JWT_TOKEN
Endpoints
Authentication
/auth/register
Register a new user
/auth/login
Login user
Jobs
/jobs
Get all jobs
/jobs
Create a new job
/jobs/:id
Get job by ID
Applications
/applications
Submit job application
/applications
Get user applications
/applications/:id
Withdraw application
Resumes
/resumes
Upload resume
/resumes
Get user resumes
Postman Collections
Import Postman collections for easy API testing:
- Complete Collection:
backend/postman/job-portal-complete.postman_collection.json(All APIs - Admin + Frontend) - Admin Only:
backend/postman/job-portal-admin.postman_collection.json(Admin APIs only) - Original:
backend/postman/job-portal.postman_collection.json
See backend/postman/README.md for detailed usage instructions.
Deployment Guide
Build for Production
Frontend Build
cd frontend
npm run build -- --configuration production
Output: frontend/dist/frontend/
Admin Panel Build (React)
cd admin
npm run build
Output: admin/dist/
Nginx Configuration
Example Nginx configuration for single domain deployment:
server {
listen 80;
server_name your-domain.com www.your-domain.com;
# Frontend Angular SPA at /
root /var/www/job-portal/frontend;
index index.html;
# API under /api -> Node on port 4000
location /api/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:4000/;
}
# Admin React SPA at /admin
location /admin/ {
alias /var/www/job-portal/admin/dist/;
try_files $uri $uri/ /admin/index.html;
}
# SPA fallback for frontend
location / {
try_files $uri $uri/ /index.html;
}
}
SSL Certificate
Enable HTTPS with Let's Encrypt:
sudo certbot --nginx -d your-domain.com -d www.your-domain.com
PM2 Process Manager
Run backend with PM2 for production:
npm install -g pm2
cd backend
pm2 start server.js --name job-portal-api
pm2 save
pm2 startup
Troubleshooting
Common Issues
MongoDB Connection Error
Problem: Cannot connect to MongoDB
Solution:
- Verify MongoDB is running:
mongosh - Check connection string in
.envfile - Ensure MongoDB service is started:
sudo systemctl start mongod
Port Already in Use
Problem: Port 4000, 4200, or 3001 is already in use
Solution:
- Find process using port:
lsof -i :4000(or :4200, :3001) - Kill process:
kill -9 PID - Or change port in configuration:
- Backend: Change
PORTinbackend/.env - Admin: Change port in
admin/vite.config.tsor usenpm run dev -- --port 3002 - Frontend: Use
ng serve --port 4300
- Backend: Change
Admin Panel Cannot Connect to Backend
Problem: Admin panel shows connection errors
Solution:
- Verify backend is running on port 4000
- Check
VITE_API_URLinadmin/.envfile - Check browser console for CORS errors
- Verify backend CORS configuration allows
http://localhost:3001
Cannot Login to Admin Panel
Problem: Login fails or credentials don't work
Solution:
- Verify admin user was created (see Step 5 in Installation)
- Check credentials are correct
- Check backend logs for errors
- Verify
JWT_SECRETis set in backend.env - Clear browser localStorage and try again
Module Not Found
Problem: npm module errors
Solution:
- Delete
node_modulesfolder - Delete
package-lock.json - Run
npm installagain
CORS Errors
Problem: CORS policy errors in browser
Solution:
- Check CORS configuration in
backend/app/config/config.js - Ensure frontend URL is in allowed origins
- Verify API URL in frontend environment files
JWT Token Errors
Problem: Authentication token invalid or expired
Solution:
- Clear browser localStorage
- Login again to get new token
- Check JWT_SECRET in backend configuration
Log Files
Check log files for detailed error information:
backend/logs/error.log- Error logsbackend/logs/combined.log- All logs
Test Credentials
Demo@123
Employer Accounts
| Name | Company | Password | |
|---|---|---|---|
| Sarah Johnson | TechCorp Solutions | sarah.johnson@techcorp.com |
Demo@123 |
| Michael Chen | InnovateAI | michael.chen@innovateai.com |
Demo@123 |
| Emily Rodriguez | Creative Design Studio | emily.rodriguez@designstudio.com |
Demo@123 |
| David Thompson | FinanceHub | david.thompson@financehub.com |
Demo@123 |
| Lisa Anderson | HealthcarePlus | lisa.anderson@healthcareplus.com |
Demo@123 |
Job Seeker Accounts
| Name | Password | |
|---|---|---|
| Alex Martinez | alex.martinez@email.com |
Demo@123 |
| Jessica Kim | jessica.kim@email.com |
Demo@123 |
| Ryan Patel | ryan.patel@email.com |
Demo@123 |
| Sophie Williams | sophie.williams@email.com |
Demo@123 |
| James Wilson | james.wilson@email.com |
Demo@123 |
| Maria Garcia | maria.garcia@email.com |
Demo@123 |
Seed Sample Data
To populate database with test data:
curl -X POST http://localhost:4000/api/seeder/seed
Get credentials:
curl http://localhost:4000/api/seeder/credentials