Ongoing Project of MERN Stack based Online Job Portal - Server (API)
Welcome to Project Job Dekho Server, a comprehensive backend solution for a job-seeking portal. This project aims to provide a seamless and efficient platform for job seekers and employers to connect. Job seekers can find and apply for jobs, while employers can post job listings and search for potential employees. This repository contains the server-side code, including routing, controllers, middleware, and database configurations.
- User Authentication and Authorization: Separate login systems for job seekers and employers.
- Job Management: Employers can post jobs, and job seekers can search and apply for jobs.
- Detailed Job Descriptions: Each job posting contains comprehensive details to help job seekers make informed decisions.
- Error Handling: Robust middleware for handling errors and asynchronous operations.
- Node.js: JavaScript runtime environment.
- Express.js: Web application framework for Node.js.
- MongoDB: NoSQL database for storing user and job data.
- Mongoose: ODM for MongoDB and Node.js.
- JWT: For user authentication and authorization.
PROJECT JOB DEKHO SERVER/
├── controllers/
│ ├── applicationController.js
│ ├── jobController.js
│ └── userController.js
├── middlewares/
│ ├── error.js
│ ├── catchAsyncError.js
│ └── authorization.js
├── routes/
│ ├── applicationRoutes.js
│ ├── jobRoutes.js
│ └── userRoutes.js
├── models/
│ ├── jobModel.js
│ ├── userModel.js
│ └── applicationModel.js
├── config/
│ └── db.js
├── utils/
│ ├── sendEmail.js
│ └── logger.js
├── app.js
├── server.js
└── README.md
- Application Controller: Manages the application process for job seekers.
- Job Controller: Handles job posting, updating, and retrieval operations.
- User Controller: Manages user registration, login, and profile operations.
- error.js: Centralized error handling middleware.
- catchAsyncError.js: Middleware for catching asynchronous errors.
- auth.js: Middleware for checking user roles and permissions.
- Application Routes: Routes related to job applications.
- Job Routes: Routes for job management (CRUD operations).
- User Routes: Routes for user management and authentication.
- Clone the repository:
git clone https://github.com/(my_username)/PROJECT-JOB-DEKHO-SERVER.git
- Navigate to the project directory:
cd PROJECT-JOB-DEKHO-SERVER
- Install dependencies:
npm install
- Set up environment variables by creating a
.env
file:PORT=5000 MONGODB_URI=your_mongodb_uri JWT_SECRET=your_jwt_secret
- Start the server:
npm start
- POST /api/users/register: Register a new user.
- POST /api/users/login: Login a user.
- GET /api/users/profile: Get user profile.
- POST /api/jobs: Create a new job.
- GET /api/jobs: Get all jobs.
- GET /api/jobs/:id: Get a job by ID.
- PUT /api/jobs/:id: Update a job by ID.
- DELETE /api/jobs/:id: Delete a job by ID.
- POST /api/applications: Apply for a job.
- GET /api/applications: Get all applications.
- GET /api/applications/:id: Get an application by ID.
Thank you for using Project-Job-Dekho-Server! If you have any questions or need further assistance, please feel free to open an issue on GitHub.