Aeternalis-Ingenium /
FastAPI-Backend-Template
A backend project template with FastAPI, PostgreSQL with asynchronous SQLAlchemy 2.0, Alembic for asynchronous database migration, and Docker.
84/100 healthLoading repository data…
jaehyeon-kim / repository
A template for rapidly building full-stack web applications in Python, featuring a FastAPI backend, a NiceGUI frontend, PostgreSQL, and Docker.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
This repository provides a template for building full-stack web applications using FastAPI for the backend and NiceGUI for the frontend. It includes a complete setup for a PostgreSQL database, JWT authentication, and a clean project structure, making it an excellent starting point for demos, prototypes, and internal tools.
Combining FastAPI and NiceGUI allows for the rapid development of web applications entirely in Python, which is a significant advantage for teams that want to avoid switching contexts between Python for the backend and JavaScript for the frontend.
FastAPI is a modern, high-performance web framework for building APIs. It offers automatic interactive documentation, data validation powered by Pydantic, and an intuitive syntax that accelerates development.
NiceGUI is a user-friendly, Python-based UI framework. It allows you to build web frontends without writing any HTML, CSS, or JavaScript. This is ideal for backend developers, data engineers, data scientists, and anyone who needs to create an interactive UI quickly.
This combination is perfect for demo applications because it enables a single developer to build and showcase a complete, interactive, and robust full-stack application in a fraction of the time it would take with traditional frameworks.
💡 Version 2.0: Unified Application Architecture
The initial version was designed with a distinct separation between a FastAPI backend and a NiceGUI frontend, which communicated over HTTP. This new version consolidates the application, leveraging the fact that NiceGUI is built on top of FastAPI. The result is a more tightly integrated structure that allows the UI and API logic to coexist in the same process.
Key Architectural Changes:
Selected from shared topics, language and repository description—not editorial ratings.
Aeternalis-Ingenium /
A backend project template with FastAPI, PostgreSQL with asynchronous SQLAlchemy 2.0, Alembic for asynchronous database migration, and Docker.
84/100 healthjonasrenault /
A FARM stack boilerplate with docker integration. This is a starting template for projects using a Python FastAPI server, MongoDB storage and React frontend, with docker setup for development and production.
83/100 healthnicegui.app.httpx) to the backend. They now import and call the necessary Python functions from the repository layer directly, removing the network layer for UI-to-backend communication.APIRouter onto the main NiceGUI application, ensuring that JSON endpoints remain available.frontend and backend directories have been merged into a single application package (e.g., app or src). A run.py script at the project root now serves as the single entry point.This updated architecture provides a more direct and cohesive way to build full-stack applications where the UI and backend logic are tightly coupled.
Follow these instructions to get the project running on your local machine.
Clone the Repository
git clone https://github.com/jaehyeon-kim/nicegui-fastapi-template.git
cd nicegui-fastapi-demo
Create a Virtual Environment and Install Dependencies
Choose one of the following methods:
uva. Install uv (if you haven't already)
# On macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows
irm https://astral.sh/uv/install.ps1 | iex
b. Create and Activate a Virtual Environment
# Create the virtual environment
uv venv venv
# Activate it (on macOS/Linux)
source venv/bin/activate
# Or activate it (on Windows)
venv\Scripts\activate
c. Install Dependencies
uv pip install -r requirements.txt
pipa. Create and Activate a Virtual Environment
# Create the virtual environment
python -m venv venv
# Activate it (on macOS/Linux)
source venv/bin/activate
# Or activate it (on Windows)
.\venv\Scripts\activate
b. Install Dependencies
pip install -r requirements.txt
Configure Environment Variables
Create a .env file in the project root by copying the example file.
cp .env.example .env
You can modify the .env file if needed, but the default values are configured to work with the Docker Compose setup.
Start the PostgreSQL Database
Run the following command to start the PostgreSQL database container in the background.
docker-compose up -d
Run the Application
Start the development server by executing the app.py script directly from your terminal.
python app.py
This command calls the ui.run() function at the bottom of the script, which starts the web server. Because the reload=True parameter is used, the server will automatically restart whenever you make code changes.
Once the server is running, you can access the following URLs:
Application Frontend: http://localhost:8000
API Docs (Swagger UI): http://localhost:8000/docs
Alternate API Docs (ReDoc): http://localhost:8000/redoc
When you are finished, you can stop the services and clean up the environment.
Stop the Uvicorn Server
Press Ctrl+C in the terminal where the application is running.
Stop the Database Container To stop the PostgreSQL container, run:
docker-compose down
Deactivate the Virtual Environment
deactivate
This project is licensed under the MIT License. See the LICENSE file for more details.
arturboyun /
This is a template for easy start of bot development for Telegram
69/100 healthmax-pfeiffer /
Cookiecutter project template for starting a FastAPI application. Runs in a Docker container with Uvicorn ASGI server on Kubernetes. Supports AMD64 and ARM64 CPU architectures.
68/100 healthA template for a FastAPI based Serverless Framework microservice running on AWS Lambda
27/100 healthIbraheemTuffaha /
A template for a Python FastAPI service with uv & Devcontainer
71/100 health