A modern job portal application built with the MERN stack (MongoDB, Express, React, Node.js). This application allows users to search for job listings, apply for jobs, and manage their profiles.
- User authentication and authorization
- Job search and filtering
- Job application system
- User profile management
- Responsive design
- Frontend: React, Bootstrap
- Backend: Node.js, Express
- Database: MongoDB
- State Management: Redux
- HTTP Client: Axios
- Node.js (>=14.x)
- npm or yarn
- MongoDB instance
git clone https://github.com/your-username/job-portal.git
cd job-portal
-
Navigate to the backend directory:
cd backend
-
Install dependencies:
npm install
-
Create a
.env
file in thebackend
directory and add your MongoDB connection string:MONGODB_URI=mongodb://localhost:27017/job-portal JWT_SECRET=your_jwt_secret
-
Start the backend server:
npm start
-
Navigate to the frontend directory:
cd ../frontend
-
Install dependencies:
npm install
-
Start the frontend server:
npm start
- Access the frontend at
http://localhost:3000
. - The backend API runs on
http://localhost:5000
.
POST /api/auth/register
: Register a new userPOST /api/auth/login
: Log in a user
GET /api/jobs
: Get all jobsGET /api/jobs/:id
: Get a job by IDPOST /api/jobs
: Create a new job (admin only)PUT /api/jobs/:id
: Update a job by ID (admin only)DELETE /api/jobs/:id
: Delete a job by ID (admin only)
GET /api/users/:id
: Get a user by IDPUT /api/users/:id
: Update user profileDELETE /api/users/:id
: Delete a user (admin only)
To run tests, navigate to the backend
or frontend
directory and use:
npm test