Boilerplate project for Flask, React & MongoDB based projects. This README documents the steps necessary to get your application up and running.
Quickstart:
docker compose
.docker compose -f docker-compose.dev.yml up
(Add --build
to force rebuild when new dependencies have been
added).http://localhost:3000
.Bonus:
serve
, the frontend server is at http://localhost:3000
.serve
, the backend server is at http://localhost:8080
.mongodb://localhost:27017
.Pre Requirements:
Scripts:
npm install
npm build
npm start
npm run serve
WEBPACK_DEV_DISABLE_OPEN
to true
.npm run lint
npm run fmt
In the src/apps/backend/settings/
directory:
We are keeping config as a schema environment specific.
Example:
development.py
and so for other environments.Based on the environment which will be passed during spawning the server as an argument
with APP_ENV=<environment_name>
, this will further load the schema accordingly.
Note:
default.py
- This file will be used to keep all our constant values.development
..env File
Application also supports loading environment variables from .env
file. Just add the file to src/apps/backend
and it
should be picked up by the server.
UI Config:
In case of need of config values at client-side, this will make an internal request to the backend server to get the desired config schema in the form of JSON.
This application also supports running one off scripts. Helpful during development or running cron jobs.
Steps:
src/apps/backend/scripts
(ex - my-script.py
)npm run script --file=example_worker_script
This project deploys on Kubernetes via GitHub actions using workflows defined in GitHub CI.