A Django & Machine Learning-powered job recommendation system where recruiters can post jobs and job seekers can apply for them. The system provides personalized job recommendations using TF-IDF & Cosine Similarity.
- User Authentication (Register/Login with JWT)
- Job Listings (Recruiters can post, update, delete jobs)
- Job Applications (Job Seekers can apply for jobs)
- Smart Job Recommendations (ML-based matching using TF-IDF & Cosine Similarity)
- Email Notifications (Recruiters get alerts when a job seeker applies)
- REST API with DRF (Test via Postman)
- Secure & Optimized (Rate limiting, pagination, optimized queries)
- Django, Django REST Framework (DRF)
- PostgreSQL
- Scikit-Learn, NLTK
- JWT Authentication (Simple JWT)
- SMTP Email (Gmail, SendGrid)
- Environment Variables (
python-dotenv) - Rate Limiting & Pagination (DRF)
git clone https://github.com/hossein-sa/smart-job-recommendation.git
cd smart-job-recommendationpython -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txt- Create a database named
job_recommendation - Update
.envfile with your database credentials:
DB_NAME=job_recommendation
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_HOST=localhost
DB_PORT=5432
python manage.py makemigrations users jobs applications
python manage.py migratepython manage.py createsuperuserFollow the prompts to set up an admin user.
python manage.py runserverThe API is now running at: http://127.0.0.1:8000/
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register/ |
Register a new user |
| POST | /api/auth/login/ |
Log in and get JWT token |
| GET | /api/auth/profile/ |
Get user profile |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/jobs/ |
Get all jobs (paginated) |
| POST | /api/jobs/ |
Create a new job (Recruiter) |
| GET | /api/jobs/{id}/ |
Get details of a job |
| PUT | /api/jobs/{id}/ |
Update a job (Recruiter Only) |
| DELETE | /api/jobs/{id}/ |
Delete a job (Recruiter Only) |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/jobs/{id}/apply/ |
Apply for a job (Job Seeker) |
| GET | /api/jobs/{id}/applications/ |
Get all applications (Recruiter Only) |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/jobs/recommendations/ |
Get recommended jobs (Job Seeker) |
Use JWT Token for Authenticated Requests
Example (Postman):
Authorization: Bearer your-access-token- Recruiters receive an email when a job seeker applies.
- Job Seekers receive a weekly job alert with new job postings.
python manage.py send_job_alertsCreate a .env file in the project root:
SECRET_KEY=your-secret-key
DEBUG=True
ALLOWED_HOSTS=127.0.0.1,localhost
DB_NAME=job_recommendation
DB_USER=postgres
DB_PASSWORD=your-password
DB_HOST=localhost
DB_PORT=5432
EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USE_TLS=True
EMAIL_HOST_USER=gmail-address
EMAIL_HOST_PASSWORD=your-app-password
Make sure to keep .env secure and add it to .gitignore.
job-recommendation-system/
│── users/ # User Authentication & Profiles
│── jobs/ # Job Listings & Recommendations
│── applications/ # Job Applications
│── templates/ # Email Templates (if needed)
│── static/ # Static Files
│── manage.py # Django CLI
│── requirements.txt # Dependencies
│── .env # Environment Variables (Not Pushed to GitHub)
│── README.md # Project Documentation
Contributions are welcome! Follow these steps:
- Fork the repository
- Create a new branch (
git checkout -b feature-name) - Commit your changes (
git commit -m "Added new feature") - Push to your fork (
git push origin feature-name) - Submit a Pull Request
This project is licensed under the MIT License.
Email: sadeghi.ho@hotmail.com
GitHub: Hossein Sadeghi