NettedX Backend is a backend service built with FastAPI, designed to provide a robust and efficient API for NettedX. This project is structured to facilitate easy development, testing, and deployment.
- FastAPI
- Uvicorn
- Pydantic Settings
- Pytest + HTTPX
- Ruff
- Python >= 3.12
- uv
Please refer to the Development Guidelines
For users and production environments.
Make sure you have Docker installed on your device.
There are two ways to run the application using Docker:
- With the source code:
Clone the repository and run the following command in the project root directory:
docker-compose up --build- With released Docker image:
Pull the latest released Docker image from ghcr and run it:
docker run -p 8000:8000 ghcr.io/nettedx/nettedx-back:latestFor Developers.
- Clone the repository
git clone https://github.com/NettedX/nettedx-back.git- Install dependencies
uv sync- Start the development server
uv run devor
uv run uvicorn app.main:app --reload- Open the built-in documentation
Synchronized with your code in real-time, please refer to Apifox for the official documentation.
http://127.0.0.1:8000/docs
-
Run tests
uv run pytest
-
Run linter
uv run ruff check
-
Run formatter
uv run ruff format
All environment variables are managed using dotenv. Please refer to the .env.example file for a list of required environment variables.
Copy the .env.example file to .env and change the values as needed.
cp .env.example .env