ZenithSolve Backend is a robust and scalable backend solution designed to handle complex business logic and data processing. It provides a set of APIs for various functionalities and ensures high performance and security.
- User Authentication: Secure user authentication and authorization.
- Data Management: Efficient data handling and storage.
- API Endpoints: Well-documented API endpoints for various operations.
- Error Handling: Comprehensive error handling mechanisms.
- Logging: Detailed logging for monitoring and debugging.
- Testing: Unit and integration testing using pytest.
ZenithSolve-Backend/
├── app/
│ ├── __init__.py
│ ├── main.py
│ ├── crud/
│ ├── db/
│ ├── routers/
│ ├── schemas/
├── config/
├── env/
├── htmlcov/
├── tests/
├── docker-compose.yml
├── Dockerfile
├── LICENSE
├── Makefile
├── README.md
├── requirements.txt
- Python: Programming language
- FastAPI: Web framework
- SQLAlchemy: ORM for database interactions
- Pytest: Testing framework
- Docker: Containerization
- Swagger: API documentation
- Uvicorn: ASGI server
- Python 3.8+: Ensure you have Python installed. You can download it from python.org.
- PostgreSQL: Ensure you have PostgreSQL installed and running. You can download it from postgresql.org.
- .env file: Create a
.envfile in the root directory to store database variables. Use the provided.env.exampleas a reference.
-
Clone the repository:
git clone https://github.com/yourusername/ZenithSolve-Backend.git cd ZenithSolve-Backend -
Create a virtual environment:
python3 -m venv venv source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt
-
Set environment variables: Provide a
.env.examplefile and set the necessary environment variables. -
Run the application:
uvicorn app.main:app --reload
The Makefile provides various commands for local testing, running code, linting, and pytest checks.
-
Run the application:
make start-local
-
Run ruff linting and pytest checks:
make precommit-check
-
Build the Docker image:
docker build -t zenithsolve-backend . --no-cache -
Run the Docker container:
docker run --network host -p 8000:8000 zenithsolve-backend
Swagger UI is available for API testing. Once the application is running, navigate to http://localhost:8000/docs to access the Swagger UI.
Unit tests are written using pytest. To run the tests in VSCode:
- Open the command palette (
Ctrl+Shift+P). - Select
Python: Discover Tests. - Run the tests using the test explorer.
This project is licensed under the MIT License. See the LICENSE file for more details.