A job board API for managing job postings and applications. This API allows users to post job listings, apply for jobs, and manage job applications using Express and Mongoose.
- Job Management: Create, retrieve, update, and delete job listings.
- Application Management: Apply for jobs and manage applications.
- Authentication: Secure endpoints with JWT-based authentication.
- Data Validation: Ensure data integrity with Zod schema validation.
To get started with the project, clone the repository and install the dependencies:
git clone https://github.com/zobkazi/job-board-api.git
cd job-board-api
yarn install
To start the development server with live reloading, run:
yarn dev
To build the project and start the production server, run:
yarn build
yarn start
- Endpoint:
POST /jobs
- Description: Create a new job listing.
- Request Body:
{ "title": "Software Engineer", "description": "Develop and maintain software.", "location": "Remote" }
- Response:
{ "id": "60c72b2f4f1a2c001f9b1e63", "title": "Software Engineer", "description": "Develop and maintain software.", "location": "Remote", "createdAt": "2024-08-18T12:00:00.000Z", "updatedAt": "2024-08-18T12:00:00.000Z" }
- Endpoint:
GET /jobs
- Description: Retrieve a list of all job listings.
- Response:
[ { "id": "60c72b2f4f1a2c001f9b1e63", "title": "Software Engineer", "description": "Develop and maintain software.", "location": "Remote", "createdAt": "2024-08-18T12:00:00.000Z", "updatedAt": "2024-08-18T12:00:00.000Z" } ]
- Endpoint:
GET /jobs/:id
- Description: Retrieve details of a specific job listing.
- Response:
{ "id": "60c72b2f4f1a2c001f9b1e63", "title": "Software Engineer", "description": "Develop and maintain software.", "location": "Remote", "createdAt": "2024-08-18T12:00:00.000Z", "updatedAt": "2024-08-18T12:00:00.000Z" }
- Endpoint:
POST /applications
- Description: Apply for a job listing.
- Request Body:
{ "jobId": "60c72b2f4f1a2c001f9b1e63", "applicantName": "John Doe", "resume": "http://example.com/resume.pdf" }
- Response:
{ "id": "60c72b2f4f1a2c001f9b1e64", "jobId": "60c72b2f4f1a2c001f9b1e63", "applicantName": "John Doe", "resume": "http://example.com/resume.pdf", "createdAt": "2024-08-18T12:00:00.000Z" }
MONGO_URL=your_mongodb_connection_string
PORT=3000
JWT_SECRET=your_jwt_secret
If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeature
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature/YourFeature
). - Create a new Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or feedback, please contact Zobaidul Kazi at [email protected] or visit GitHub Profile.
- Project Title: Provides a brief overview of the project.
- Description: Explains what the project does and its benefits.
- Features: Lists key features of the API.
- Installation: Instructions to install and set up the project.
- Usage: How to run the project in different modes.
- API Documentation: Details of the API endpoints.
- Configuration: Information on environment variables.
- Contributing: Guidelines for contributing to the project.
- License: Licensing details.
- Contact: Contact information for further inquiries.