ChapChap FastFood API

  • Web
  • Python
  • Backend
  • Personal
  • API
Cover Image for ChapChap FastFood API

ChapChap Fastfood API

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.

Prerequisites

Before running the API, ensure you have the following installed:

Python 3.7 or later
PostgreSQL

Getting Started

  1. Clone the Repository

git clone git@github.com:AbogeJr/ChapChap.gitcopy

  1. Create a virtual environment in the project directory

    cd ChapChapcopy

python -m venv envcopy

  1. Activate Virtual Environment:

    On Windows:

.\env\Scripts\activatecopy

On Linux or MacOS:

source ./env/bin/activatecopy

  1. Install the dependencies

pip install -r requirements.txtcopy

  1. 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]
  2. Run this command to update the databse schema

python init_db.pycopy

  1. Run the api

uvicorn main:app --reloadcopy

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!