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

https://github.com/tyronejosee/prototype_fiber

A modular and scalable e-commerce API built with Go, following Clean Architecture (Hexagonal) and Domain-Driven Design principles.
https://github.com/tyronejosee/prototype_fiber

api-rest clean-architecture ddd-architecture fiber fiber-framework go golang gorn postgresql redis swago

Last synced: about 2 months ago
JSON representation

A modular and scalable e-commerce API built with Go, following Clean Architecture (Hexagonal) and Domain-Driven Design principles.

Awesome Lists containing this project

README

          



logo



Prototype Fiber


Prototypes




A modular and scalable e-commerce API built with Go, following Clean Architecture (Hexagonal) and Domain-Driven Design principles.




go-version


go-toolchain


fiber-version


gorm-version


postgresql


redis-version


jwt-version


swagger


docker


testify-version

## ✨ Features

- **Clean Architecture**: Well-organized code with clear separation of concerns
- **Domain-Driven Design**: Business logic encapsulated in domain entities
- **RESTful API**: Comprehensive endpoints for e-commerce operations
- **Authentication & Authorization**: JWT-based auth with role-based access
- **Database Integration**: PostgreSQL with GORM ORM
- **Caching**: Redis for improved performance
- **Docker Support**: Easy deployment with Docker Compose
- **Unit Testing**: Comprehensive test coverage
- **API Documentation**: Well-documented endpoints

## 📋 Prerequisites

- Go 1.21+
- PostgreSQL 13+
- Redis 6+
- Docker & Docker Compose (optional)

## ⚙️ Installation

Clone the repository.

```bash
git clone git@github.com:tyronejosee/prototype_fiber.git
cd prototype_fiber
```

Copy the environment file.

```bash
cp .env.example .env
```

Update the `.env` file with your configuration.

```env
DB_HOST=
DB_PORT=
DB_USER=
DB_PASSWORD=
DB_NAME=
REDIS_HOST=
REDIS_PORT=
JWT_SECRET=
```

Start all services with Docker Compose.

```bash
make docker-up
```

Build and start with logs.

```bash
make docker-build
```

View logs.

```bash
make logs
```

Stop all services.

```bash
make docker-down
```

Start PostgreSQL and Redis services.

```bash
make deps
```

Run the application.

```bash
make run
```

Run tests.

```bash
make test
```

## 🌱 Contributing

1. Fork the repository
2. Create a feature branch, e.g. `feature/your-feature-name`
3. Implement your feature
4. Write tests for new functionality
5. Ensure all tests pass
6. Submit a pull request to the `main` branch

## ⚖️ License

This project is licensed under the [MIT License](/LICENSE).

Enjoy! 🎉