A full-stack job portal application with role-based authentication for job seekers and employers.
- Role-based Authentication: Separate signup/signin for job seekers and employers
- Secure Backend: JWT token-based authentication with bcrypt password hashing
- Modern Frontend: React with Vite build tool and Tailwind CSS styling
- Modular Architecture: Clean, interview-ready code structure
- Node.js with Express.js
- MongoDB with Mongoose ODM
- JWT for authentication
- bcryptjs for password hashing
- Express middleware for validation and error handling
- React 19
- Vite build tool
- Tailwind CSS for styling
- Axios for HTTP requests
- Context API for state management
jobby/
├── backend/
│ ├── config/
│ │ └── database.js
│ ├── controllers/
│ │ ├── signUp.js
│ │ ├── signIn.js
│ │ └── logout.js
│ ├── middleware/
│ │ ├── auth.js
│ │ ├── authorizationRole.js
│ │ ├── validation.js
│ │ └── errorHandler.js
│ ├── model/
│ │ └── User.js
│ ├── routes/
│ │ ├── signUp.js
│ │ ├── signIn.js
│ │ └── logout.js
│ ├── utils/
│ │ └── password.js
│ ├── validation/
│ │ └── user.js
│ ├── .env
│ └── server.js
└── frontend/
├── src/
│ ├── components/
│ │ ├── SignUp.jsx
│ │ ├── SignIn.jsx
│ │ └── Dashboard.jsx
│ ├── services/
│ │ ├── api.js
│ │ └── AuthContext.jsx
│ ├── App.jsx
│ ├── main.jsx
│ └── index.css
├── index.html
├── package.json
└── vite.config.js
- Node.js (v16 or higher)
- MongoDB connection (local or cloud)
- npm or yarn
-
Navigate to the backend directory:
cd backend -
Install dependencies:
npm install
-
Create a
.envfile:MONGO_URL=your_mongodb_connection_string JWT_SECRET=your_jwt_secret_key PORT=5000 -
Start the server:
npm start
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Start the development server:
npm run dev
POST /api/signup- User registrationPOST /api/signin- User loginPOST /api/logout- User logout (requires authentication)
- Users can register as either "jobseeker" or "employer"
- JWT tokens are issued upon successful login
- Tokens are stored in localStorage for persistence
- Protected routes require valid JWT tokens
- Role-based access control for different user types
- ✅ Backend authentication system
- ✅ Frontend components with routing
- ✅ Tailwind CSS styling
- ✅ API integration with Axios
- 🔄 Dashboard functionality (in progress)
- 🔄 Job posting features (planned)
- 🔄 Job search functionality (planned)
This project follows clean code principles and is structured for scalability and maintainability. Each component has a single responsibility, making it easy to understand and extend.
MIT License