A full-stack application for managing employee information with authentication and authorization.
- Node.js
- Express.js
- MongoDB
- JWT for authentication
POST /api/auth/register- Register new userPOST /api/auth/login- User login
GET /api/employees- Get all employeesPOST /api/employees- Create new employeeGET /api/employees/:id- Get employee by IDPUT /api/employees/:id- Update employeeDELETE /api/employees/:id- Delete employeePATCH /api/employees/:/:id/toggle-status- Toggle employee
PORT=5000
MONGODB_URI=mongodb://localhost:27017/employee_panel
JWT_SECRET=aeiou
- React.js
- Context API for state management
- Axios for API calls
- User authentication (Login/Register)
- Employee CRUD operations
- Responsive design
- Protected routes
- Form validation
src/
├── components/
├── pages/
├── assets/
├── context/
- Clone the repository
- Install dependencies:
npm install - Set up environment variables
- Run:
npm run dev
- Navigate to frontend directory:
cd auth_emp_frontend - Install dependencies:
npm install - Run:
npm run dev