Tea shop is a simple solution to buy teas on web !
The system was developed with docker. Reason: to build something similar to the use of microservices. But why? To maintain isolated services that perform only their functions. In addition, this type of architecture generates less dependence between the diverse teams involved in the development and better infrastructure management.
Its operation is simple. The user navigates the SPA, this asks for recommendations to the recommendations API. Finally, the recommendations API search the data in an external api and returns all over the way to user. Everything can be seen in the figure below:
The api was developed in rails 5 api mode and the SPA was developed using Reactjs and React-Router.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
To help run in terminal:
make help
Before all, you need to have Docker and Docker compose installed in your computer. For more informations you can access Docker page.
After clone, run in terminal:
make setup
After install, run in terminal:
make run
After this, you can access the app in http://localhost:4000/.
To develop backend with TDD run:
make run-dev-env-api
Now, you are in api container. To run automated test env run:
make auto-test
To develop backend with TDD run:
make run-dev-env-client
Now, you are in client container. To run automated test env run:
npm test
TODO:
- MVP => Prod configs to deploy in Heroku
- Only have to fork the project and make a pull request.
We use something like Karma for commit messages. Besides this, for new branchs use names in this format:
type/description
For example: to create a new branch that is responsible for create user permissions you must use feat/create-user-permissions.
We use SemVer for versioning.
Not yet defined.
Future improvements (TODO):
- Fix POST 401 on client (CORs in server?);
- Client tests with Jest and Enzyme;
- Use Json Web Token on api;
- Create Authentication container;
- Create Monitor container;
- Improve UI;
Last worked branch: master
Doubts? Problems? send an email to magnunavf@gmail.com