Please raise an issue to request a feature/modification or for reporting a bug, if it has not already been raised.
- Client: React.js (Create React App)
- Server: Flask,
scikit-learn
-
Fork this repo. (Top right corner.)
-
Clone the forked repo using the
git clone
command. -
Navigate (
cd
) to the cloned repo directory (usuallyipl-app
). -
Client
-
Navigate (
cd
) to theclient
directory. -
Execute
npm install
to install all dependencies. -
To make requests to the server, it will have to be run locally (setup instructions below) and the URL of the Fetch API requests will have to be changed to
http://127.0.0.1:<port>/<path>
.- Do not forget to revert this change back to the original before committing and pushing.
Example Fetch API URL:
http://127.0.0.1:5000/predict
-
Execute
npm run start
to start the development server.
-
-
Server
-
Navigate (
cd
) to theserver
directory. -
Execute
virtualenv venv
to create a virtual environment with the namevenv
.- A directory
venv
will be created and it will be ignored by Git.
- A directory
-
Execute
pip install -r requirements.txt
to install all dependencies. -
Replace the value of the
Access-Control-Allow-Origin
header with*
at all places inmain.py
to allow the browser to make cross origin requests from any domain to the development server (CORS).- Do not forget to revert these changes back to the original before committing and pushing.
Example:
response.headers.add("Access-Control-Allow-Origin", "*")
-
Execute
py main.py
to start the development server.- Set
debug = True
at the end of the file for a hot reloading development server, otherwise the development server will have to be re-started manually after every change for it to reflect in development.- Do not forget to revert this change back to the original (
debug = False
) before committing and pushing.
- Do not forget to revert this change back to the original (
- Set
-
-
Make contribution(s).
-
Write meaningful commit messages and include the number (#) of the issue being resolved (if any) at the end of the commit message.
Example:
:bug: fix: Resolve 'isCorrect' function error (#0)
-
Open a Pull Request (PR).
- Learn how to open a PR.
- Solve one issue per PR, without any extra changes.
- Include extra changes in a separate PR.
If any further help is needed, do not hesitate to contact the author (Harsh Kapadia) via Twitter @harshgkapadia, LinkedIn or e-mail (contact@harshkapadia.me). An issue can be raised as well.