OfficeFlow is a full-stack Office Management System built using Node.js, Express, and MongoDB, with a React + Tailwind CSS frontend. It enables CRUD operations for Departments and Employees, supports pagination, search, and filtering, integrates a Country/State/City API, and features JWT-based Admin Login.
- ๐ Admin-only access with JWT Auth
- ๐ข Department CRUD
- ๐ค Employee CRUD with:
- Department selection
- Supervisor assignment (self-reference)
- Country/State/City selection via dynamic external API
- ๐ Employee listing with:
- Pagination
- Search (by name/email)
- Filter (by department and job title)
- ๐ Location dropdowns via CountriesNow API
- โ๏ธ Modern responsive frontend using React + Tailwind CSS
Use the following credentials to log in:
Email: faisal30@gmail.com Password: faisal23
| Layer | Tech |
|---|---|
| Frontend | React, Tailwind CSS |
| Backend | Node.js, Express.js |
| Database | MongoDB with Mongoose |
| Auth | JWT-based authentication |
| API | CountriesNow API (Location data) |
| View Rendering | React Components (no EJS) |
- Clone the repo:
git clone https://github.com/your-username/officeflow.git cd officeflow
Backend Setup:
cd backend
npm install npm run dev
Frontend Setup:
cd frontend
npm install npm start Environment Variables:
Create .env in /backend:
PORT=8000 MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret ๐ฌ API Endpoints ๐ Auth POST /api/admin/login โ Admin login (returns JWT)
๐ข Department GET /api/departments
POST /api/departments
PUT /api/departments/:id
DELETE /api/departments/:id
๐ค Employee GET /api/employees?page=1&limit=10&search=John&department=IT&jobTitle=Manager
POST /api/employees
PUT /api/employees/:id
DELETE /api/employees/:id
๐ External API (CountriesNow) Integrated with: https://countriesnow.space/api/v0.1/countries/
Used to dynamically fetch:
Countries
States based on Country
Cities based on State
๐ฎ Postman Collection Postman collection for all APIs is included in the /postman folder or Download Here (add link after uploading)
๐ธ Screenshots (Add screenshots of Dashboard, Employee Form, Filters, etc.)
๐งโ๐ป Author Syed Faisal Abdul Rahman Zulfequar
๐ License MIT License
