FTGO is a scalable, microservice-based food ordering application built with Python (FastAPI) and Vue.js, designed following object-oriented design principles.
๐ You can use this project as a template to build your backend microservice project in Python ๐
๐ New features and technologies will be added soon!
Source Code: https://github.com/deepmancer/full-stack-fastapi-ftgo
-
โก FastAPI:
- ๐ฎ pydantic for settings and request/response validation.
- ๐ JWT middleware for secure authentication.
- ๐ง Permission manager for role-based access control on routes.
- ๐ Rate limiting for API protection.
- โ RequestId, Timing, and many exciting middlewares!
- ๐ Secure password hashing by default.
- ๐ Customizable profilers with Prometheus.
-
๐ฑ MongoDB:
- Async client with motor and Object Document Mapping (ODM) with beanie.
- mongo-motors package for singleton and managed connection.
-
๐งฐ Redis:
- Async operations for caching and session management.
- redis-py with aredis-client.
-
๐พ PostgreSQL:
- Async client with aqlachemy ORM & automatic migrations with alembic..
- asyncpg-client as the session manager.
-
๐ RabbitMQ:
- Utilizing rabbitmq-rpc and aio-pika.
- No server-side implementation.
-
๐ Docker Compose:
- Containers for simplified deployment and scaling.
-
โ Pytest:
- Async tests with pytest and pytest-async.
- ๐ Grafana: Automatic metric dashboards on endpoints using Prometheus.
- ๐ Metabase: PostgreSQL/MongoDB analytics and reporting.
- ๐ RedisInsight: Redis data visualization and management.
- ๐ฟ Mongo-Express: MongoDB admin interface.
- ๐ฅ RabbitMQ Management: Visualizing and monitoring events.
These tools are configured and run via Docker in the infra/admin/docker-compose.yaml
.
Create Docker networks for backend and frontend services.
docker network create --driver bridge backend-network
docker network create --driver bridge frontend-network
Navigate to the infrastructure directory and start the services, including databases and GUI tools.
cd backend/infra
docker compose up --build
backend/infra
โโโ admin (Metabase, RedisInsight, Mongo-Express)
โโโ mongo
โโโ monitoring (Grafana, Prometheus)
โโโ postgres
โโโ rabbitmq (with the Management extension)
โโโ redis
Navigate to the backend directory and start all microservices.
cd backend/
docker compose up --build
The frontend is built with Vue.js for a dynamic and responsive user experience.
Navigate to the ui/
directory and install the required packages.
cd ui/
npm install
Run the development server with hot-reloading enabled.
npm run serve