This repository contains the Pizza Order App system, structured using a microservices architecture. It includes an Identity Service for handling user authentication, authorization, and profile data; a Restaurant Service for managing restaurants and pizza menus; an Email Service for sending email notifications; a Search Service for searching restaurants and pizzas based on location; an Order Service for managing pizza orders; and a Payment Service for processing payments. The services communicate via asynchronous messaging.
- Handles user signups via REST APIs.
- Publishes signup events (e.g.,
user.registered) to a message broker. - It cares about credentials and permissions.
- Handles restaurant management via REST APIs.
- Publishes restaurant domain events (e.g.,
restaurant.created,menu.updated) to a message broker. - Validates ownership and permissions.
- Listens to order events from the broker.
- Sends confirmation emails to customers.
- A lightweight background service.
- Handles events from the broker (e.g., RabbitMQ) and indexes them.
- Exposes search API via Gin and Elasticsearch.
- Supports location-based and text-based search.
- Handles customer orders via REST APIs.
- Publishes order events (e.g.,
order.placed) to a message broker. - Implements Domain-Driven Design architecture.
- Language: Go (Golang)
- Database: PostgreSQL
- Search: Elasticsearch
- Architecture: Domain-Driven Design Architecture
- Messaging: RabbitMQ
pizza-order-app/
│── identity-service/ # Identity Service (Producer)
│ ├── cmd/ # Entry point
│ │ ├── main.go # Starts HTTP API, publishes events
│ ├── internal/
│ │ ├── application/ # Application logic/use cases
│ │ ├── domain/ # Domain models and interfaces
│ │ ├── infrastructure/ # DB, messaging
│ │ ├── interfaces/ # API controllers
│
├── restaurant-service/ # Restaurant Service (Producer)
│
│── email-service/ # Email Sending Service (Consumer)
│ ├── cmd/ # Entry point
│ │ ├── main.go # Starts email consumer
│ ├── internal/
│ │ ├── application/ # Email handling logic
│ │ ├── domain/ # Email domain models and interfaces
│ │ ├── infrastructure/ # Email transport, message broker
│
│── search-service/ # Uses events to sync ES data (Consumer)
│ ├── cmd/ # Entry point
│ │ ├── main.go # Starts search API and consumer
│ ├── internal/
│ │ ├── application/ # Search handling logic
│ │ ├── domain/ # Search domain models and interfaces
│ │ ├── infrastructure/ # Elasticsearch adapter, event consumer
│
├── order-service/ # Order Service (Producer)
│
├── web-user/ # Frontend UI for users (React)
│
│── .gitignore # .gitignore file
│── README.md # You are hereNote: This project is under active development.
Some features may be incomplete or subject to change.
You're welcome to explore or provide feedback!