Skip to content

Dopplr is an analytical tool for creating beautiful dashboards from sql queries

Notifications You must be signed in to change notification settings

dopplr-labs/dopplr

Repository files navigation

Dopplr

dopplr is an analytical tool for creating beautiful dashboards using sql queries. It is built using react and nestjs.

Development Information

Requirements

Technologies Used

Starting with development

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 --build

Later on, to start all the 3 dockers (database, server and client) use

[sudo] docker-compose up

To install any package in the client, start the docker shell

[sudo] docker-compose exec client sh

To install any package in the server, start the docker shell

[sudo] docker-compose exec server sh

It would open the shell and you can then install any dependency using npm or yarn

Creating sample database

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 docker command to start pqsl

docker exec -it dopplr_postgres_1 psql -U admin postgres
  • In the psql terminal, 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 northwind

pgAdmin

To run pgAdmin explicitly, run the following command

docker-compose up pgadmin

Git Workflow

We 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

Feature branch

Create a feature branch when you are working on a feature such as implementation of a new UI component.

git flow feature start feature_branch

Hotfix branch

Maintenance or “hotfix” branches are used to quickly patch production releases.

git flow hotfix start hotfix_branch

Commits

Commit Message

We'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 commitizen

and 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.