A distributed task management system built using a scalable Go microservices architecture, featuring gRPC for fast inter-service communication, a dedicated API Gateway for HTTP routing, centralized authentication, task/user services, and full observability with OpenTelemetry and Jaeger. All services are containerized with Docker and orchestrated using Docker Compose for local development.
- Microservices architecture with independently deployable services for authentication, user management, and task operations
- High-performance inter-service communication using gRPC with Protocol Buffers for strict type safety
- RESTful API Gateway built with Gin for request routing, middleware, and unified HTTP access
- JWT-based authentication using golang-jwt for secure and stateless user sessions
- PostgreSQL as the primary database for reliable user and task persistence
- Redis caching support for future token/session optimization and performance improvements
- Centralized metrics collection and monitoring with Prometheus-compatible instrumentation
- Distributed tracing and observability powered by OpenTelemetry, exported to Jaeger for full request lifecycle tracking
- Structured application logging using Zap for high-performance, production-grade log output
- Containerization of all services using Docker for isolated, reproducible environments
- Service orchestration with Docker Compose for simplified local development and multi-service management
- Protocol Buffers for defining service contracts and generating gRPC server/client implementations
- Swagger documentation support within the API Gateway for interactive REST API exploration
- Clean architecture patterns with clear separation of handlers, business logic, repositories, and transport layers
cd to the project directory and run this command:
docker-compose up --build -dto stop all services:
docker-compose downto stop services and remove database volumes:
docker-compose down -vBefore using Swagger UI, please read API Endpoint section. You can visit Swagger UI in this address http://localhost:8080/swagger/index.html#/
cd todo-service
go test ./tests/unit/... -vcd todo-service
go test ./tests/unit -run TestTaskHandlerTestSuite -vcd todo-service
go test ./tests/unit -run TestTaskServiceTestSuite -vcd todo-service
go test ./tests/unit -run TestRepositoryInterface -v# Start test database
docker run -d --name test-postgres \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_DB=test_tasks \
-p 5432:5432 \
postgres:15-alpine
# Wait for database to start
sleep 5
# Run integration tests
RUN_INTEGRATION_TESTS=true go test ./tests/integration -v
# Clean up
docker stop test-postgres && docker rm test-postgres