A modern, scalable time management system built with microservices architecture, designed to handle employee time tracking, company management, and comprehensive reporting.
- Authentication & Authorization: Secure authentication using Keycloak
- Employee Management: Complete employee information management
- Time Recording: Track employee work hours and attendance
- Company Management: Handle multiple companies and departments
- Timecard Processing: Automated timecard generation and processing
- API Documentation: Swagger/OpenAPI documentation
- Monitoring: Elastic APM integration for performance monitoring
- Event-Driven Architecture: Kafka-based event processing
The system is built using a microservices architecture with the following components:
- Proxy Service: Nginx-based API gateway
- Auth Service: Keycloak-based authentication and authorization
- Employee Service: Employee information management
- Time Record Service: Time tracking and attendance
- Company Service: Company and department management
- Timecard Service: Timecard processing and reporting
- Docker and Docker Compose
- Go 1.x
- Make (optional, for using Makefile commands)
- Git with SSH access configured
- Clone the repository with submodules:
git clone --recursive git@github.com:patricksferraz/timeclock.git
cd timeclock
If you've already cloned the repository without submodules, you can initialize them with:
git submodule update --init --recursive
- Copy the environment file and configure it:
cp .env.example .env
- Build and start the services:
make build
make up
The project is organized as a monorepo with the following structure:
timeclock/
├── services/
│ ├── auth-keycloak-acl/ # Authentication service
│ ├── employee-service/ # Employee management service
│ ├── time-record-service/ # Time tracking service
│ ├── company-service/ # Company management service
│ └── timecard-service/ # Timecard processing service
├── swagger/ # API documentation
├── .config/ # Configuration files
└── docker-compose.yml # Service orchestration
make build
- Build all servicesmake up
- Start all servicesmake down
- Stop and remove all servicesmake logs
- View service logsmake ps
- Check service statusmake attach SERVICE=<service_name>
- Attach to a service container
The system can be configured through environment variables. Key configurations include:
- Service ports
- Database credentials
- Keycloak settings
- Kafka configuration
See .env.example
for all available configuration options.
Once the services are running, you can access the Swagger documentation at:
http://localhost:9191
The system includes Elastic APM integration for monitoring:
- APM Server: http://localhost:8200
- Kibana: http://localhost:5601
- Elasticsearch: http://localhost:9200
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
When working with submodules:
- Make changes in the respective service submodule
- Commit and push changes in the submodule
- Update the main repository to point to the new submodule commit
- Commit and push the main repository
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Keycloak for authentication
- Apache Kafka for event streaming
- Elastic APM for monitoring
- PostgreSQL for data storage