dopplr is an analytical tool for creating beautiful dashboards using sql queries. It is built using react and nestjs.
- docker for containers
- react for development
- tailwindcss for styling
- nestjs for backend
If you are running the dockers for the first time (or anytime the Dockerfile
or docker-entrypoint.sh changes), make sure to build all the containers using
[sudo] docker-compose up --buildLater on, to start all the 3 dockers (database, server and client) use
[sudo] docker-compose upTo install any package in the client, start the docker shell
[sudo] docker-compose exec client shTo install any package in the server, start the docker shell
[sudo] docker-compose exec server shIt would open the shell and you can then install any dependency using npm or yarn
To test the application, a sample database can be used, such as northwind. To restore the data use,
-
First download the database dump from here.
-
Run the
dockercommand to startpqsl
docker exec -it dopplr_postgres_1 psql -U admin postgres- In the
psqlterminal, enter the follwing to create a database and exit out of it.
CREATE DATABASE northwind;
- Restore the database from the dump using
cat /path/to/downloaded/northwind.sql | docker exec -i dopplr_postgres_1 psql -U admin northwindTo run pgAdmin explicitly, run the following command
docker-compose up pgadminWe use gitflow workflow for managing git. It is recommended to use gitflow plugin.
The overall flow of Gitflow is:
- A develop branch is created from master
- A release branch is created from develop
- Feature branches are created from develop
- When a feature is complete it is merged into the develop branch
- When the release branch is done it is merged into develop and master
- If an issue in master is detected a hotfix branch is created from master
- Once the hotfix is complete it is merged to both develop and master
Create a feature branch when you are working on a feature such as implementation of a new UI component.
git flow feature start feature_branchMaintenance or “hotfix” branches are used to quickly patch production releases.
git flow hotfix start hotfix_branchWe're using conventional commits to ensure consistency of commit messages. We use commitizen to write commit messages. It is very simple to use. Just install commitizen globally using
npm install -g commitizenand use cz instead of git commit. It would ask you fill the some fields and your commit message would be ready. You can find more information about it here.
