Skip to content

A modern time record management service built with Go, featuring gRPC/REST APIs, event-driven architecture with Kafka, and comprehensive monitoring using Elastic APM. Perfect for HR systems and time tracking applications.

License

Notifications You must be signed in to change notification settings

patricksferraz/time-record-service

Repository files navigation

Time Record Service

Go Report Card License GoDoc

A modern, scalable time record management service built with Go, featuring gRPC and REST APIs, event-driven architecture, and comprehensive monitoring.

🌟 Features

  • 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

🚀 Quick Start

Prerequisites

  • Docker and Docker Compose
  • Go 1.16 or later
  • Make (optional, but recommended)

Installation

  1. Clone the repository:
git clone https://github.com/patricksferraz/time-record-service.git
cd time-record-service
  1. Copy the environment file and configure it:
cp .env.example .env
  1. Start the services:
make up

The service will be available at:

🛠️ Development

Building

make build

Running Tests

make test

Generating gRPC Code

make gen

Viewing Logs

make logs

📚 API Documentation

The REST API documentation is available at /swagger/index.html when the service is running.

🏗️ Architecture

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

🔄 Event Flow

The service processes the following events:

  • NEW_EMPLOYEE
  • NEW_COMPANY
  • NEW_TIME_RECORD

📊 Monitoring

The service integrates with Elastic APM for:

  • Performance monitoring
  • Error tracking
  • Distributed tracing
  • Log aggregation

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

👥 Authors

  • Patrick Ferraz - Initial work

🙏 Acknowledgments

About

A modern time record management service built with Go, featuring gRPC/REST APIs, event-driven architecture with Kafka, and comprehensive monitoring using Elastic APM. Perfect for HR systems and time tracking applications.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages