This is my capstone project for ALX Software Engineering Backend Specializtion. It is a FastAPI-based RESTful API with SQLAlchemy as the ORM and PostgreSQL as the database engine. It allows management of users, orders, food items, and deliveries.
Before running the API, ensure you have the following installed:
Python 3.7 or later
PostgreSQL
-
Clone the Repository
git clone git@github.com:AbogeJr/ChapChap.git
-
Create a virtual environment in the project directory
cd ChapChap
python -m venv env
-
Activate Virtual Environment:
On Windows:
.\env\Scripts\activate
On Unix or MacOS:
source ./env/bin/activate
-
Install the dependencies
pip install -r requirements.txt
-
Configure PostgreSQL Database: Create a PostgreSQL database and populate your database credentials in the .env file i.e
DB_USER=[username] DB_HOST=[hostname] DB_PASSWORD=[password] DB_NAME=[database_name]
-
Run this command to update the databse schema
python init_db.py
-
Run the api
uvicorn main:app --reload
The API will be accessible at http://127.0.0.1:8000
The API documentation will be available at http://127.0.0.1:8000/docs
Register a user at http://127.0.0.1:8000/docs/auth/signup, authenticate and Enjoy!
Happy Hacking!