A2svHackathon

Description

  • An AI financial literacy platform to help learn about financial literacy and entrepreneurship.

Backend

Technologies

The project is created with:

  • Python Django
  • Django RestFramework
  • drf_yasg(swagger) -- for endpoint documentation

Installation

  • Make sure Python is installed.
python 3.8.10
To install requirements run:
make requirements or python3 manage.py install -r requirements.txt || pipenv install --dev

Environment Variables

Variable Description Default
SECRET_KEY Required - String of random characters used to provide cryptographic signing for Django projects.
DB_NAME Required - Used to represent the name of the database
ENVIRONMENT Optional - Used to load different settings according to the environment selected. Choices: production, development, common development
DB_USER Required - Used to represent username
DB_PASSWORD Required - database password
DB_HOST Required - Database host

Usage

  • Clone the repository:
    a. Using SSH:

    git clone git@github.com:EdwinAtieno/A2svHackathon.git
    

    b. Using Http:

    git clone https://github.com/EdwinAtieno/A2svHackathon.git
    
  • Navigate to the cloned folder:

    cd A2svHackathon
    
  • Pre-commit hook

    pre-commit install
    
  • Create a virtual environment.

python3 -m venv venv

Or Install virtualenv then
virtualenv venv

On Linux ~ source venv/bin/activate

On windows ~ venv\Scripts\Activate

Or run pipenv shell
  • Configuring postgres Ubuntu
Update: sudo apt update
Installing: sudo apt install python3-pip python3-dev libpq-dev postgresql postgresql-contrib
First login by running: sudo -u postgres psql
Create DB: CREATE DATABASE A2svHackathon;
Create USER: CREATE USER A2svHackathon WITH PASSWORD 'A2svHackathon@';
run: \q to exit server
  • Run migrations.
make migrations ~ python manage.py makemigrations

make migrate ~ python manage.py migrate
  • Create a super user.
python manage.py createsuperuser
  • Run the app.
make serve ~ python manage.py runserver
  • This opens the app at {{BASE_URL}}
localhost:8000

or

http://127.0.0.1:8000/

Endpoints Implemented

DEVELOPERS

  • Octatech