Skip to content

Go Marketplace is a sample project demonstrating a marketplace application built with Go using Clean Architecture principles. It features event-driven processing using a memory-based queue adapter.

Notifications You must be signed in to change notification settings

AdiPP/go-marketplace

Repository files navigation

Go Marketplace

Go Marketplace is a sample project demonstrating a marketplace application built with Go using Clean Architecture principles. It features event-driven processing using a memory-based and rabbitMQ queue adapter.

Table of Contents

Project Structure

The project is organized into several packages, each responsible for different aspects of the application:

  • pkg/domain/event: Defines the domain events used in the application.
  • pkg/domain/queue: Defines the interfaces for the queue system.
  • pkg/infrastructure/queue: Provides a queue adapter implementation.
  • pkg/interface/controller: Contains the HTTP controllers for handling API requests.
  • pkg/interface/listener: Contains the event listeners for handling events.
  • pkg/usecase: Contains the use cases that implement the business logic.

Prerequisites

Before running this project, ensure you have the following installed:

  • Go (version 1.22.2 or higher)

Installation

  1. Clone the repository:
git clone https://github.com/AdiPP/go-marketplace.git
cd go-marketplace
  1. Install the dependencies:
go mod tidy
  1. Run RabbitMQ:
docker compose up -d

Usage

To run the application, use the following command:

go run cmd/server/main.go

The application will start an HTTP server listening on port 8080. You can create orders by sending a POST request to the /create-order endpoint.

License

This project is licensed under the MIT License.

About

Go Marketplace is a sample project demonstrating a marketplace application built with Go using Clean Architecture principles. It features event-driven processing using a memory-based queue adapter.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages