ageeknamedslickback / onboardingService

Onboarding API POC using Django

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Onboarding POC

Simple Django application proof of concept for a minimal, reusable user onboarding service using phone number and email as the primary identifers.

How To Run The Project

This assumes that you are running on any *nix environment and have Python 3.10+ and git installed in your local machine.

  1. Clone the repository
$ git clone git@github.com:ageeknamedslickback/onboardingServicePOC.git
$ cd onboardingServicePOC
  1. Create and activate a virtual environment to run your code
$ python3 -m venv <name of your venv>
$ source <name of your venv>/bin/activate
  1. Install dependancies
$ pip3 install -r requirements.txt
  1. Create an env.sh file and add the following
export SECRET_KEY="<your secret key>"
export DEBUG="true"
export ENVIRONMENT="local"
export PORT=8000
export SENTRY_DSN=""
  1. Remember to source your environment variables
$ source env.sh
  1. Run migrations (code uses SQLite thus no further configs), collectstatic and the runserver
$ python3 manage.py migrate
$ python3 manage.py collectstatic
$ python3 manage.py runserver

Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
May 18, 2023 - 21:47:51
Django version 4.2.1, using settings 'config.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

How To Test The Project

$ tox -r

How To Run the Project Using Docker

This assumes that you have Docker Desktop installed locally in your *nix local machine

  1. Build the image
$ make build
  1. Run the docker container
$ make run

About

Onboarding API POC using Django

License:MIT License


Languages

Language:Python 92.4%Language:Dockerfile 4.8%Language:Makefile 1.9%Language:Shell 1.0%