full-stack-fastapi-ftgo

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

APACHE-2.0 License

Stars
13
Committers
7

🍕 Full-stack Microservice-Based Food Delivery Application

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

Admin Dashboards

Grafana (localhost:3000)

Metabase (localhost:3030)

RedisInsight (localhost:5540)

RabbitMQ Management (localhost:15673)

MongoDB Compass