Roadflow Api
This is the backend api for RoadFlow. It uses DRF for api development and MindsDB NLP Models for user reviews classification and sentiment. The API follows REST API requirements. It can be tested from the Swagger documentation or any client.
Figma Design
Here is a link to the figma.
Github Project
Here is a link to the Github Project.
DB Diagram Design
Here is a db diagram for the project database - Diagram
Prerequisites
- Python 3
- MindsDB Python SDK
- Redis
Installing
A step by step series of examples that tell you how to get a development environment running.
First you have to clone the project on your machine
-
Setup virtual enviroment
Debian
python -m venv venv source venv/bin/activate
Windows
python -m venv venv venv\Scripts\activate
-
Install dependencies in the project root dir
pip install -r requirements.txt cd src mkdir logs
-
Setup the env file
cp env.example .env
For the email config:
This is not required, for it is used to send OTP for account registration. Email sending is disabled by default in development.
For MINDSDB config:
Create a MindsDB account. If you don't have one, sign up for a free account at cloud.mindsdb.com.
Set
MINDSDB_SERVER_USERNAME
to your email, andMINDSDB_SERVER_PASSWORD
to your password.Redis config:
If you don't have redis installed you can configure
settings/base.py
to use Django Memcache. Cache is used for OTP verification. -
Run migrations
python manage.py migrate
The site is configured to run with SQLite but you can configure it to use postgress in production.
Running the API
To run the API on your machine. Make sure you are in the src
directory before you run the command below.
python manage.py runserver
API server will run on http://localhost:8000/
. Visit Swagger to read the Swagger API documentation.
⛏️ Built Using
- Django - Web Framework
- Django Rest Framework - Building Web APIs
- Redis - In-memory data store
- Python - Programming Language