/full-stack-fastapi-ftgo

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

Primary LanguagePythonApache License 2.0Apache-2.0

🍕 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