{"id":17930972,"url":"https://github.com/ernor1/em_backend_ab","last_synced_at":"2026-05-06T08:36:51.811Z","repository":{"id":259784427,"uuid":"877070597","full_name":"Ernor1/em_backend_ab","owner":"Ernor1","description":"Employee management system apis","archived":false,"fork":false,"pushed_at":"2024-10-29T02:49:30.000Z","size":185,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T23:45:46.168Z","etag":null,"topics":["attendance-system","mailservice","management-system","nestjs","openai","prisma-orm"],"latest_commit_sha":null,"homepage":"https://em-backend-ab.onrender.com/api-doc","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ernor1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-23T03:14:53.000Z","updated_at":"2024-10-29T02:49:33.000Z","dependencies_parsed_at":"2024-10-28T01:44:28.135Z","dependency_job_id":null,"html_url":"https://github.com/Ernor1/em_backend_ab","commit_stats":null,"previous_names":["ernor1/em_backend_ab"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ernor1%2Fem_backend_ab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ernor1%2Fem_backend_ab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ernor1%2Fem_backend_ab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ernor1%2Fem_backend_ab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ernor1","download_url":"https://codeload.github.com/Ernor1/em_backend_ab/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246982625,"owners_count":20864134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["attendance-system","mailservice","management-system","nestjs","openai","prisma-orm"],"created_at":"2024-10-28T21:18:51.506Z","updated_at":"2026-05-06T08:36:51.762Z","avatar_url":"https://github.com/Ernor1.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Employee Management Application - Attendance Tracking System\n\n## Description\n\nThis application is an employee management system built using the NestJS framework. It provides functionality to manage employees, track attendance, send email notifications upon attendance records, and generate reports. The app is deployed on Render, and the deployment pipeline includes two jobs: testing and deployment. A link to the deployed project can be found in the project description.\n\n## Features\n\n- **Full Authentication System:**\n  - Register, Login, Logout, Forgot password, Password reset functionalities using `PassportJS`.\n  \n- **Employee Management (CRUD):**\n  - Manage employee records with fields like `name`, `email`, `employeeIdentifier`, and `phoneNumber`.\n\n- **Attendance Tracking:**\n  - Record employee check-ins and check-outs.\n\n- **Email Notification System:**\n  - Automatically send email notifications to employees when attendance is recorded using background processing queues.\n\n- **Attendance Reports:**\n  - Generate PDF reports using `jsPDF` and Excel reports using `ExcelJS` with daily attendance data.\n\n- **API Documentation:**\n  - Interactive and detailed API documentation is available through Swagger, using OpenAPI standards.\n\n## Deployment Information\n\nThe application is deployed on Render, with a continuous integration (CI) pipeline that runs the following jobs:\n\n1. **Test**: Executes the test suite to ensure all functionalities work as expected.\n2. **Deploy**: Deploys the application to Render if all tests pass successfully.\n\nYou can find the deployment link in the project description.\n\n## Technology Stack\n\n- **NestJS v10**: Core framework for the API.\n- **PassportJS**: For authentication.\n- **TypeORM**: Database management and migrations using Prisma ORM.\n- **Jest**: Testing framework.\n- **jsPDF**: For generating PDF reports.\n- **ExcelJS**: For generating Excel reports.\n- **Bull Queues**: For background job processing.\n- **OpenAPI (Swagger)**: For API documentation.\n- **Render**: For application hosting and deployment.\n- **Gemini AI (Google)**: Used for generating personalized email content due to ChatGPT being closed-source.\n\n## Email Notification System\n\nEmails are automatically sent to employees upon check-in. These emails are generated using **Gemini AI** by Google, which personalizes the content of the notification messages.\n\n## Swagger Documentation\n\nThe application includes a well-detailed and interactive API documentation using Swagger, accessible at `/api-doc` (e.g., `https://em-backend-ab.onrender.com/api-doc`). It covers all available endpoints, request/response formats, and necessary authentication details.\n\n## Bonus Features\n\n- **GitHub Actions**: The CI pipeline is configured with GitHub Actions to run tests automatically on pull requests (PRs).\n\n## Setup Instructions\n\n### Prerequisites\n\n- Node.js v18.x.x or higher\n- npm v9.x.x or higher\n- PostgreSQL or any other supported database\n- Redis for background job processing (email notifications)\n\n### Installation\n\n1. **Clone the repository:**\n   ```bash\n   git clone https://github.com/Ernor1/em_backend_ab.git\n   cd em_backend_ab\n   ```\n\n2. **Install dependencies:**\n   ```bash\n   npm install\n   ```\n\n3. **Set up environment variables:**\n   Create a `.env` file in the root directory and include the following variables:\n   ```\n   DATABASE_URL=your-database-url\n   JWT_SECRET=your-jwt-secret\n   MAIL_HOST=smtp.mailtrap.io\n   MAIL_PORT=your-mail-port\n   MAIL_USER=your-mail-username\n   MAIL_PASS=your-mail-password\n   GEMINI_API_KEY=your-gemini-api-key\n   ```\n\n4. **Run database migrations:**\n   ```bash\n   npm run migration:run\n   ```\n\n5. **Start the application:**\n   ```bash\n   npm run start:dev\n   ```\n\n6. **Access the API Documentation:**\n   Visit `http://localhost:8000/api-doc` to view the interactive Swagger documentation.\n\n### Running Tests\n\n- Run the tests with the following command:\n  ```bash\n  npm run test\n  ```\n\n- Check test coverage:\n  ```bash\n  npm run test:cov\n  ```\n\n### Generating Reports\n\n- **PDF Reports:** \n  - Generate daily attendance data reports in PDF format using `jsPDF`.\n  \n- **Excel Reports:**\n  - Generate Excel reports of attendance data using `ExcelJS`.\n\n### Email Notifications\n\nThe application sends an email to employees upon check-in. The content is generated using **Gemini AI by Google** for personalized messages, instead of OpenAI's ChatGPT.\n\n## Deployment\n\nTo deploy this project to Render or any other cloud provider, follow these steps:\n\n1. Configure the environment variables based on the platform's guidelines.\n2. Ensure Redis is available either as a managed service or locally.\n3. Set up PostgreSQL or another supported database for the application.\n\n## GitHub Actions\n\nThe project uses GitHub Actions for continuous integration. The workflow file located in `.github/workflows/main.yml` is configured to automatically run tests when a pull request (PR) is created.\n\n## Conclusion\n\nThis Employee Management application is a complete solution for managing employees and attendance tracking. It integrates modern web development practices such as authentication, background processing, email notifications, and detailed API documentation. \n\nFor any further questions or issues, feel free to reach out.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fernor1%2Fem_backend_ab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fernor1%2Fem_backend_ab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fernor1%2Fem_backend_ab/lists"}