An open API service indexing awesome lists of open source software.

https://github.com/patricksferraz/pinned-place

A modern, scalable location-based service built with Go. Features RESTful API, PostgreSQL, Kafka, and Kubernetes support. Perfect for handling location data with high reliability and performance.
https://github.com/patricksferraz/pinned-place

api backend clean-architecture cloud-native database devops distributed-systems docker event-driven go golang high-performance infrastructure-as-code kafka kubernetes location-service microservices postgresql rest-api scalable

Last synced: 5 months ago
JSON representation

A modern, scalable location-based service built with Go. Features RESTful API, PostgreSQL, Kafka, and Kubernetes support. Perfect for handling location data with high reliability and performance.

Awesome Lists containing this project

README

          

# Pinned Place ๐ŸŽฏ

[![Go Report Card](https://goreportcard.com/badge/github.com/patricksferraz/pinned-place)](https://goreportcard.com/report/github.com/patricksferraz/pinned-place)
[![GoDoc](https://godoc.org/github.com/patricksferraz/pinned-place?status.svg)](https://godoc.org/github.com/patricksferraz/pinned-place)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A modern, scalable location-based service built with Go, designed to handle location data efficiently and reliably.

## ๐ŸŒŸ Features

- RESTful API for location management
- PostgreSQL database for reliable data storage
- Kafka integration for event streaming
- Docker and Kubernetes support for easy deployment
- Hot-reload development environment with Air
- Comprehensive database migrations
- Admin interface for database management

## ๐Ÿš€ Quick Start

### Prerequisites

- Go 1.18+
- Docker and Docker Compose
- Make (optional, but recommended)

### Environment Setup

1. Clone the repository:
```bash
git clone https://github.com/patricksferraz/pinned-place.git
cd pinned-place
```

2. Copy the example environment file and configure it:
```bash
cp .env.example .env
```

3. Start the services using Docker Compose:
```bash
docker-compose up -d
```

### Development

The project uses Air for hot-reloading during development. To start the development server:

```bash
make dev
```

## ๐Ÿ—๏ธ Project Structure

```
.
โ”œโ”€โ”€ app/ # Application layer
โ”œโ”€โ”€ cmd/ # Command-line interface
โ”œโ”€โ”€ domain/ # Domain models and business logic
โ”œโ”€โ”€ infra/ # Infrastructure implementations
โ”œโ”€โ”€ k8s/ # Kubernetes configurations
โ””โ”€โ”€ utils/ # Utility functions and helpers
```

## ๐Ÿ› ๏ธ Technology Stack

- **Language**: Go
- **Database**: PostgreSQL
- **Message Broker**: Kafka
- **Containerization**: Docker
- **Orchestration**: Kubernetes
- **Development**: Air (hot-reload)
- **Database Admin**: Adminer

## ๐Ÿ“š API Documentation

The API documentation is available at `/swagger` when running the application.

## ๐Ÿ”ง Configuration

The application can be configured through environment variables:

- `REST_PORT`: Port for the REST API
- `POSTGRES_*`: PostgreSQL configuration
- `KAFKA_*`: Kafka configuration
- `DSN_*`: Data Source Name configuration

See `.env.example` for all available configuration options.

## ๐Ÿงช Testing

Run the test suite:

```bash
make test
```

## ๐Ÿ“ฆ Deployment

### Docker

Build and run using Docker:

```bash
make docker-build
make docker-run
```

### Kubernetes

Deploy to Kubernetes:

```bash
kubectl apply -f k8s/
```

## ๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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*

## ๐Ÿ™ Acknowledgments

- Thanks to all contributors who have helped shape this project
- Inspired by modern microservices architecture
- Built with best practices in mind

---

โญ Star this repository if you find it useful!