https://github.com/reljicd/flask-react-materialui
Example project using two flask backends and React + Material UI frontend
https://github.com/reljicd/flask-react-materialui
docker docker-compose flask flask-sqlalchemy material-ui postgres postgresql python python3 react reactjs sqlalchemy
Last synced: 3 months ago
JSON representation
Example project using two flask backends and React + Material UI frontend
- Host: GitHub
- URL: https://github.com/reljicd/flask-react-materialui
- Owner: reljicd
- Created: 2023-02-21T13:25:55.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-02-21T14:24:01.000Z (over 3 years ago)
- Last Synced: 2025-05-19T18:48:58.906Z (about 1 year ago)
- Topics: docker, docker-compose, flask, flask-sqlalchemy, material-ui, postgres, postgresql, python, python3, react, reactjs, sqlalchemy
- Language: Python
- Homepage:
- Size: 237 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Codebase Walkthrough
### Code organization
- **data** - raw data and sql scripts for making postgres tables and importing data from CSV into postgres.
- **flask-datastore** - backend for serving data from postgres. Depends on **postgres**.
- **flask-backend** - backend for serving data to frontend. Uses **flask-datastore** as data repository. Depends on **flask-datastore**.
- **react-app** - React app for displaying results. Depends on **flask-backend**
### Running the app
```bash
docker-compose build
docker-compose up react_app
```
Visit "http://localhost:8080"
### Running backend tests
Run tests only after running previous docker compose run command to have all the dependencies started.
Trying to run **flask-backend** tests without starting whole stack first, sometimes on the first run some tests that depend on **flask-datasore** will fail because of the race conditions. Just rerun command again.
#### flask-datastore
```bash
docker-compose -f docker-compose.yml run --rm --entrypoint "python -m pytest tests" flask_datastore
```
#### flask-backend
```bash
docker-compose -f docker-compose.yml run --rm --entrypoint "python -m pytest tests" flask_backend
```