/potionlab

This is a project to explain React-Redux in the Sysmana 2020 to support the presentation of "React for Muggles: Redux, Storybook and other tricks to do magic on the frontend" 🧙‍♀️

Primary LanguageJavaScriptMIT LicenseMIT

PotionLab 🧙‍♀️

This is a project to explain React-Redux in the Sysmana 2020 to support the presentation of "React for Muggles: Redux, Storybook and other tricks to do magic on the frontend"

You can see the slides here

Installation

Backend

The backend is built in Django and runs in Docker. We need to have docker (docker-engine) and docker-compose installed

docker-compose build

The first time we start the project locally it will be necessary to migrate the data and create a 'superuser' to manage the Database

docker-compose run --rm backend pipenv run python manage.py migrate
docker-compose run --rm backend pipenv run python manage.py createsuperuser

Frontend

The frontend is built in React and Redux, it runs in local out of the Docker container. First we need to install the necessary dependencies, so we'll need to have installed npm

npm install

Execute

Backend

Lift the container, it will run on port 8000

docker-compose up

Frontend

Executing the command, it will raise the frontend on port 8080

npm run start

Run tests

The tests are developed with jest in the frontend and Django for the backend, you can run them to check that everything is OK 👌

Backend

docker-compose run -e DJANGO_SETTINGS_MODULE=grimoire.settings_test --rm backend pipenv run python manage.py test

Frontend

npm run test

Acknowledgement

The design and graphic resources of the application have been made by Marta Reigal

Storybook 📖

You can see the Storybook of this app with some components running the following command

npm run storybook

And accesing on port 6006

License

See LICENSE