FastAPI Full-stack

0

About Full stack, modern web application template. Using FastAPI, Vuejs, MongoDB, PostgreSQL, Redis, Metabase, Grafana, Docker, and more!

Infrastructure

fastapi
event-driven
docker-compose
docker

šŸ• Full-stack Microservice-Based Food Delivery Application

FastAPI Python Node.js Vue.js PostgreSQL MongoDB Redis SQLAlchemy Pydantic NGINX Docker RabbitMQ Prometheus Grafana Metabase YAML H3

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


šŸ”„ Technology Stack and Features

  • āš” 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:

  • šŸ’¾ PostgreSQL:

  • šŸš€ RabbitMQ:

  • šŸ‹ Docker Compose:

    • Containers for simplified deployment and scaling.
  • āœ… Pytest:

    • Async tests with pytest and pytest-async.

šŸ“‚ GUI Management Tools

These tools are configured and run via Docker in the infra/admin/docker-compose.yaml.

Setup Instructions

Step 1: Create Docker Networks

Create Docker networks for backend and frontend services.

docker network create --driver bridge backend-network
docker network create --driver bridge frontend-network

Step 2: Build and Run Infrastructure

Navigate to the infrastructure directory and start the services, including databases and GUI tools.

cd backend/infra
docker compose up --build

Infrastructure Layout:

backend/infra
ā”œā”€ā”€ admin (Metabase, RedisInsight, Mongo-Express)
ā”œā”€ā”€ mongo
ā”œā”€ā”€ monitoring (Grafana, Prometheus)
ā”œā”€ā”€ postgres
ā”œā”€ā”€ rabbitmq (with the Management extension)
ā””ā”€ā”€ redis

Step 3: Build and Run Microservices

Navigate to the backend directory and start all microservices.

cd backend/
docker compose up --build

Frontend Setup

The frontend is built with Vue.js for a dynamic and responsive user experience.

Step 1: Install Dependencies

Navigate to the ui/ directory and install the required packages.

cd ui/
npm install

Step 2: Start Development Server

Run the development server with hot-reloading enabled.

npm run serve

Interactive API Documentation

image

Admin Dashboards

Grafana (localhost:3000)

image

Metabase (localhost:3030)

image

RedisInsight (localhost:5540)

image

RabbitMQ Management (localhost:15673)

image

MongoDB Compass

image