A modern, scalable time record management service built with Go, featuring gRPC and REST APIs, event-driven architecture, and comprehensive monitoring.
- Dual API Support: REST and gRPC endpoints for flexible integration
- Event-Driven Architecture: Kafka integration for reliable event processing
- Database Management: PostgreSQL with pgAdmin interface
- Monitoring & Observability: Elastic APM integration
- Containerized: Docker and Kubernetes support
- Testing: Comprehensive test suite with coverage reporting
- Documentation: Swagger/OpenAPI documentation
- Docker and Docker Compose
- Go 1.16 or later
- Make (optional, but recommended)
- Clone the repository:
git clone https://github.com/patricksferraz/time-record-service.git
cd time-record-service- Copy the environment file and configure it:
cp .env.example .env- Start the services:
make upThe service will be available at:
- REST API: http://localhost:8080
- gRPC: localhost:50051
- pgAdmin: http://localhost:9000
- Kafka Control Center: http://localhost:9021
make buildmake testmake genmake logsThe REST API documentation is available at /swagger/index.html when the service is running.
The service follows a clean architecture pattern with the following components:
- Domain: Core business logic and entities
- Application: Use cases and business rules
- Infrastructure: External services integration
- Interface: API handlers and controllers
The service processes the following events:
NEW_EMPLOYEENEW_COMPANYNEW_TIME_RECORD
The service integrates with Elastic APM for:
- Performance monitoring
- Error tracking
- Distributed tracing
- Log aggregation
- 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
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Patrick Ferraz - Initial work