A full-stack application for managing organizations, teams, employees, and leave requests.
- Authentication and authorization with role-based access control
- Organization and team management
- Employee management with reporting structure
- Leave request and approval system
- Responsive UI with modern design
- Next.js 14 with App Router
- TypeScript
- Tailwind CSS
- Shadcn UI components
- NextAuth.js for authentication
- React Hook Form for form handling
- Zod for validation
- NestJS
- TypeScript
- Prisma ORM
- MongoDB
- JWT authentication
- Passport.js
- Class-validator
- Node.js 18+ and npm
- MongoDB (local or Atlas)
- Clone the repository:
git clone https://github.com/yourusername/employee-management.git
cd employee-management- Install dependencies:
# Install backend dependencies
cd backend
npm install
# Install frontend dependencies
cd ../frontend
npm install- Set up environment variables:
Backend (.env)
DATABASE_URL="mongodb+srv://username:password@cluster.mongodb.net/employee-management?retryWrites=true&w=majority"
JWT_SECRET="your-jwt-secret"
JWT_EXPIRATION="1d"
PORT=12001
Frontend (.env.local)
NEXT_PUBLIC_API_URL=http://localhost:12001
NEXTAUTH_URL=http://localhost:8080
NEXTAUTH_SECRET=your-nextauth-secret
- Generate Prisma client:
cd backend
npx prisma generate- Seed the database:
cd backend
npm run prisma:seed- Start the backend:
cd backend
npm run start:dev- Start the frontend:
cd frontend
npm run dev- Access the application:
- Frontend: http://localhost:8080
- Backend API: http://localhost:12001
- API Documentation: http://localhost:12001/api
After seeding the database, you can log in with the following credentials:
-
Admin:
- Email: admin@demo.com
- Password: admin123
-
Manager:
- Email: manager@demo.com
- Password: manager123
-
Employee:
- Email: dev1@demo.com
- Password: employee123
This project is licensed under the MIT License - see the LICENSE file for details.