API and Frontend UI
This is a SpeechAuthentication project built using Next.js, TypeScript, and Django Rest Framework as the backend. Users can say their information to create an account and login. Modularity and DRY principles are followed. It's easy to modify speech to text for other complex fields like Select and so much more.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
For installing the project, you will need to have
- Python
3.9
installed. - Must have PostgreSQL installed. You can use WSL2 to do this on Windows 10 and 11.
- NodeJS & NPM
A step by step series of examples that tell you how to get a development environment running.
Clone the project
Move into the cloned project root directory
Move into the api
directory
cd api
Install dependencies
-
Linux
python -m venv venv source venv/bin/activate pip install -r requirements.txt
-
Windows
python -m venv venv venv\Scripts\activate pip install -r requirements.txt
Setup the .env
file
-
Move into the
src
directorycd src
-
Create a new file
.env
-
Copy the contents of
env.example
file into the.env
. -
Make sure you create your database configurations and setup a strong random secret key.
Run app migrations
python manage.py migrate
To run the API on your local system.
python manage.py runserver
API server will run on
http://localhost:8000/
. Visit Swagger to read the Swagger API documentation. Make sure the API server is running on port8000
if changed you will have to change it in the frontend.
Move into the auth_web
directory from the root directory
Install Dependencies
npm install
Run the server
npm run dev
Running tests is essential for guided development
Move into the api
directory
Activate your virtual enviroment if not already activated
Move into the src directory
Run tests
pytest
This ensures coding style guidelines are followed
flake8
The following method describes how to deploy the application
- Install Ngrok on your machine.
- Run API server
- Open CMD / CLI, Run
ngrok http 8000
.8000
is used if that's the port the API server is listening to. Otherwise, use the listening port. - The rest is history!
Deploy the example using Vercel or preview live with StackBlitz
Notable Technologies include
- Django - Web Framework
- Django Rest Framework - Building Web APIs
- PostgreSQL - Database
- Python - Programming Language
- NextJS - Programming Language
- Typescript - Programming Language
- RecordRTC - Programming Language
- Dukka
- Inspiration
- References