A modern, scalable company management system built with Go, featuring a clean architecture design and robust infrastructure.
- RESTful API built with Fiber
- Clean Architecture implementation
- PostgreSQL database with GORM ORM
- Docker and Kubernetes support
- Swagger API documentation
- Kafka integration for event-driven architecture
- Environment-based configuration
- Database migrations support
- Comprehensive testing setup
- Backend: Go 1.18+
- Framework: Fiber v2
- Database: PostgreSQL
- ORM: GORM
- Container: Docker
- Orchestration: Kubernetes
- Message Broker: Kafka
- API Documentation: Swagger
- Environment Management: godotenv
- Go 1.18 or higher
- Docker and Docker Compose
- PostgreSQL (if running locally)
- Make (for using Makefile commands)
- Clone the repository:
git clone https://github.com/patricksferraz/pinned-company.git
cd pinned-company- Copy the environment file and configure it:
cp .env.example .env- Start the application using Docker Compose:
docker-compose up -d- Run database migrations:
make migrate- Start the application in development mode:
make run.
├── app/ # Application layer
├── cmd/ # Command line entry points
├── domain/ # Domain models and interfaces
├── infra/ # Infrastructure implementations
├── k8s/ # Kubernetes configurations
└── utils/ # Utility functions and helpers
make build- Build Docker containersmake ps- Show running containers statusmake logs- Show containers logsmake up- Start containers in detached modemake start- Start stopped containersmake stop- Stop running containersmake down- Stop and remove containers, networks, and volumesmake attach- Attach to a running container (requires SERVICE parameter)make prune- Remove unused Docker datamake test- Run test suite using Dockermake gtest- Run Go tests with coverage reportmake gen- Generate protobuf files
The project uses Air for hot reloading during development. Configuration can be found in .air.toml.
Once the application is running, you can access the Swagger documentation at:
http://localhost:8080/swagger/index.html
The project includes Docker configuration for both development and production environments:
- Development: Uses Docker Compose with hot-reload support
- Production: Multi-stage Dockerfile for optimized builds
Run the test suite:
make test- 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 MIT License - see the LICENSE file for details.
- Patrick Ferraz - Initial work - patricksferraz