This project is a timesheet management system where employees can add and commit their hours on a daily basis by selecting projects or non-project tasks. Employees can also add hours on a weekly basis. The system includes a mechanism to manage maximum weekly hours, handle overtime, and manage approval workflows.
- Introduction
- Features
- Technologies Used
- Getting Started
- Usage
- Folder Structure
- Contributing
- License
- Contact
The timesheet system allows employees to add and commit their working hours for different tasks. Employees can select either project or non-project tasks, provide details, and track their hours on a daily and weekly basis. There is a maximum weekly hours limit, and any hours beyond this limit are counted as overtime. The system includes a workflow for submitting hours for approval, where managers can approve or challenge the submitted hours, adding comments for each day.
- Add and commit hours on a daily basis by selecting project or non-project tasks.
- Track hours on a weekly basis with a maximum weekly hours limit.
- Handle overtime calculations when committed hours exceed the weekly limit.
- Submit hours for approval, with a workflow for manager review.
- Managers can approve or challenge submitted hours, with comments.
- Employees can justify or reconsider hours if challenged by a manager.
- Separate page for managing projects and weekly hours.
- Employees can view their previous week's hours.
- Admin role with full access to manage projects, weekly hours, and view all data.
- Manager role to approve or challenge employee hours.
- Employee role to commit hours.
- Login system with email authentication for admins, managers, and employees.
- Next.js
- NestJS
- Mongoose
- TypeScript
- Radix UI
- React Query
- React Context
- Zustand
- Class Validator
- Class Transformer
- ...
- Node.js (v14.x or later)
- npm
- yarn ( I didn't apply/check that, because unfortunately I am a windows user )
-
Clone the repository:
git clone https://github.com/your-username/your-repository-name.git cd your-repository-name
-
Install dependencies for the frontend:
cd frontend npm install
-
Install dependencies for the backend:
cd backend npm install
-
Create a
.env
file in theserver
andfront
directory and add your environment variables:DATABASE_URL=your-database-url JWT_SECRET=your-jwt-secret NEXTAUTH_SECRET=your-nextauth-secret
-
Start the backend server:
cd backend npm run start:dev
-
Start the frontend server:
cd frontend npm run dev
Provide an overview of the project's folder structure.
timesheet-pro/
├── timesheet-server/
│ ├── src/
│ │ ├── auth/
│ │ ├── hours/
│ │ ├── project/
│ │ ├── record/
│ │ ├── schemas/
│ │ ├── app.service.ts
│ │ ├── app.module.ts
│ │ ├── app.controller.ts
│ │ ├── main.ts
│ │ └── ...
│ ├── test/
│ ├── .env
│ ├── package.json
│ └── ...
├── timesheet-front/
│ ├── app/
│ │ ├── api/
│ │ ├── auth/
│ │ ├── components/
│ │ ├── contexts/
│ │ ├── hooks/
│ │ ├── hours/
│ │ ├── images/
│ │ ├── lib/
│ │ ├── project/
│ │ ├── store/
│ │ ├── timesheet/
│ │ ├── utils/
│ │ ├── layout.tsx
│ │ ├── NavBar.tsx
│ │ ├── page.tsx
│ │ ├── ValidationSchemas.tsx
│ │ └── ...
│ ├── public/
│ ├── .env
│ ├── package.json
│ └── ...
├── README.md
├── LICENSE
└── ...
(not recommended, because work is in-progress)
If you want to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature
). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature
). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.
Email - hafnan03@gmail.com