This is the react application implementing the Olist Challenge.
Also, take a look at this repository:
It implements a very simple server in python 3, Django with Django rest framework and postgres. I gave access to the users @amiltonpaglia, @osantana and @dvainsencher to this repo as well.
# Install dependencies
$ yarn
# Run devserver with hot reload
$ yarn start
# Run tests on jest
$ yarn test
# Type checks js code with flow
$ yarn flow
# Keeps type checking js code with flow on watch mode
$ yarn flow:watch
# Generate flow types for css modules
$ yarn css-types
# Keeps generating flow types for css modules
$ yarn css-types:watch
# Keeps generating flow types for css modules and type checking js code
$ yarn flow:css-types:watch
# Build for deploy
$ yarn build
# Run devserver with hot reload
$ docker-compose up
# Run tests on jest
$ docker-compose -f docker-compose.test.yml run olist-react-app
- Nginx
- React App
- Django rest server
- Postgres DB
# Build for deploy
$ docker-compose -f docker-compose.prod.yml up
OBS: you need to create a postgres-data directory on your $HOME. postgres will put dabase there through a volume. You can also set $PG_DATA environment variable to change db volume to a custom location.
OBS2: Once all containers are up, you can access the ui challenge through localhost:3000 submit the form and check the json result through a GET request to localhost:8000/api/new_account/