https://github.com/andreypomortsev/startducks_orders
This repository contains the source code for a scalable order processing system inspired by Starbucks. The system utilizes FastAPI to handle HTTP requests, Redis for message queuing, and PostgreSQL for managing inventory.
https://github.com/andreypomortsev/startducks_orders
docker docker-compose fastapi postgresql redis
Last synced: 3 months ago
JSON representation
This repository contains the source code for a scalable order processing system inspired by Starbucks. The system utilizes FastAPI to handle HTTP requests, Redis for message queuing, and PostgreSQL for managing inventory.
- Host: GitHub
- URL: https://github.com/andreypomortsev/startducks_orders
- Owner: andreypomortsev
- License: mit
- Created: 2024-06-04T06:47:53.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-04T12:31:19.000Z (about 2 years ago)
- Last Synced: 2025-10-06T01:39:13.322Z (9 months ago)
- Topics: docker, docker-compose, fastapi, postgresql, redis
- Language: Python
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Starducks Scalable Order Processing System
This project provides a scalable order processing system for a coffee shop, inspired by Starbucks. This repository contains the source code for a scalable order processing system inspired by Starbucks. The system utilizes FastAPI to handle HTTP requests, Redis for message queuing, and PostgreSQL for managing inventory.
## File Structure
```
startducks_orders/
├── api/
│ ├── Dockerfile
│ ├── Dockerfile.test
│ ├── main.py
│ ├── requirements.txt
│ └── tests/
│ ├── __init__.py
│ ├── test_main.py
│ └── test_data.sql
├── worker/
│ ├── __init__.py
│ ├── Dockerfile
│ ├── worker.py
│ └── requirements.txt
├── database/
│ ├── Dockerfile
│ └── init.sql
├── docker-compose.yml
├── LICENSE
└── README.md
```
## Getting Started
### Prerequisites
- Docker
- Docker Compose
### Running the Services
1. Clone the repository:
```sh
git clone https://github.com/andreypomortsev/startducks_orders.git
cd startducks_orders
```
2. Build and start the services:
```sh
docker-compose up --build
```
3. The FastAPI service will be available at `http://localhost:8000`.
## Endpoints
- `POST /order`: Create a new order
- Request Body: `{"preferences": ["Эспрессо", "Капучино"]}`
- Response: `{"result": "Order received"}`
## Authors
- [Andrei Pomortsev](https://www.linkedin.com/in/andreypomortsev/)
## License
This project is licensed under the MIT License - see the [LICENSE](.LICENSE) file for details.
```
This structure and the provided Docker configurations will help you containerize and manage the services efficiently. The use of Docker Compose allows for easy orchestration of the different services involved in the system.