https://github.com/patricksferraz/pinned-company
Modern company management system built with Go, featuring clean architecture, RESTful APIs, and event-driven design. Includes Docker, Kubernetes, and Kafka integration for scalable microservices.
https://github.com/patricksferraz/pinned-company
api-documentation backend clean-architecture cloud-native company-management devops docker event-driven fiber go golang gorm grpc kafka kubernetes microservices postgresql protobuf rest-api swagger
Last synced: 5 months ago
JSON representation
Modern company management system built with Go, featuring clean architecture, RESTful APIs, and event-driven design. Includes Docker, Kubernetes, and Kafka integration for scalable microservices.
- Host: GitHub
- URL: https://github.com/patricksferraz/pinned-company
- Owner: patricksferraz
- License: mit
- Created: 2022-04-02T21:42:59.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-05-08T13:31:18.000Z (about 1 year ago)
- Last Synced: 2025-07-28T10:29:55.506Z (10 months ago)
- Topics: api-documentation, backend, clean-architecture, cloud-native, company-management, devops, docker, event-driven, fiber, go, golang, gorm, grpc, kafka, kubernetes, microservices, postgresql, protobuf, rest-api, swagger
- Language: Go
- Homepage:
- Size: 60.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pinned Company
[](https://goreportcard.com/report/github.com/patricksferraz/pinned-company)
[](https://godoc.org/github.com/patricksferraz/pinned-company)
[](https://opensource.org/licenses/MIT)
A modern, scalable company management system built with Go, featuring a clean architecture design and robust infrastructure.
## ๐ Features
- 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
## ๐ ๏ธ Tech Stack
- **Backend**: Go 1.18+
- **Framework**: Fiber v2
- **Database**: PostgreSQL
- **ORM**: GORM
- **Container**: Docker
- **Orchestration**: Kubernetes
- **Message Broker**: Kafka
- **API Documentation**: Swagger
- **Environment Management**: godotenv
## ๐ Prerequisites
- Go 1.18 or higher
- Docker and Docker Compose
- PostgreSQL (if running locally)
- Make (for using Makefile commands)
## ๐ Getting Started
1. Clone the repository:
```bash
git clone https://github.com/patricksferraz/pinned-company.git
cd pinned-company
```
2. Copy the environment file and configure it:
```bash
cp .env.example .env
```
3. Start the application using Docker Compose:
```bash
docker-compose up -d
```
4. Run database migrations:
```bash
make migrate
```
5. Start the application in development mode:
```bash
make run
```
## ๐๏ธ Project Structure
```
.
โโโ app/ # Application layer
โโโ cmd/ # Command line entry points
โโโ domain/ # Domain models and interfaces
โโโ infra/ # Infrastructure implementations
โโโ k8s/ # Kubernetes configurations
โโโ utils/ # Utility functions and helpers
```
## ๐ง Development
### Available Make Commands
- `make build` - Build Docker containers
- `make ps` - Show running containers status
- `make logs` - Show containers logs
- `make up` - Start containers in detached mode
- `make start` - Start stopped containers
- `make stop` - Stop running containers
- `make down` - Stop and remove containers, networks, and volumes
- `make attach` - Attach to a running container (requires SERVICE parameter)
- `make prune` - Remove unused Docker data
- `make test` - Run test suite using Docker
- `make gtest` - Run Go tests with coverage report
- `make gen` - Generate protobuf files
### Hot Reload
The project uses Air for hot reloading during development. Configuration can be found in `.air.toml`.
## ๐ API Documentation
Once the application is running, you can access the Swagger documentation at:
```
http://localhost:8080/swagger/index.html
```
## ๐ณ Docker Support
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
## ๐งช Testing
Run the test suite:
```bash
make test
```
## ๐ค 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 MIT License - see the [LICENSE](LICENSE) file for details.
## ๐ฅ Authors
- **Patrick Ferraz** - *Initial work* - [patricksferraz](https://github.com/patricksferraz)
## ๐ Acknowledgments
- [Fiber](https://github.com/gofiber/fiber)
- [GORM](https://github.com/go-gorm/gorm)
- [Docker](https://www.docker.com/)
- [Kubernetes](https://kubernetes.io/)