This is a FastAPI-based project that provides essential functionality for a web application.
To get started with the Project M Backend, follow the steps below:
Run the following command to install the necessary dependencies:
uv sync
Activate the virtual environment using the following command:
.venv\Scripts\activate
Run the following command to initialize pre-commit hooks to ensure consistent code formatting and linting before each commit:
uv run pre-commit install
Start the FastAPI development server with the following command:
uv run fastapi dev ./src/main.py
This will run the FastAPI application with live reloading enabled.
Ensure that your code is properly formatted and passes linting before committing by running these commands:
uv run ruff format .
uv run ruff check .
The folder structure of the project is organized as follows:
/project-root
.github # GitHub Workflow Configs
.vscode # Visual Studio Code Configs
/src
/configs # Configuration files for the application
/functions # Contains routes functions
/interfaces # Contains interfaces for the application
/models # Contains database models
/queries # Contains queries for the application
/routes # Contains routes for the application
/utils # Contains utility functions
/main.py # Entry point for the application
/tests # Contains unit tests and integration tests
.editorconfig # Defines coding styles and formatting rules
.gitattributes # Defines attributes for files
.gitignore # Specifies files to ignore in Git
.pre-commit-config.yaml # Configuration file for pre-commit hooks
.python-version # Specifies the Python version used by the project
build.py # Build script for the application
ruff.toml # Configuration file for the Ruff linter and formatter
pyproject.toml # Project configurations and dependencies
README.md # Project documentation
LICENSE # License information
This project is licensed under the Private License. The copyright and ownership rights to the code are solely held by the project owner.