| Section | Description |
|---|---|
| 🎯 Objectives and context | Project introduction and context |
| 🚧 Dependencies | Technical dependencies and how to install them |
| 🏎 Kickstart | Details on how to kickstart development on the project |
| 🏗 Code & architecture | Details on the application modules and technical specifications |
| 🔭 Possible improvements | Possible code refactors, improvements and ideas |
| 🚑 Troubleshooting | Recurring problems and proven solutions |
| 🚀 Deploy | Deployment details for various enviroments |
…
| Browser | OS | Constraint |
|---|---|---|
| … | … | … |
- Node.js (
~> 10.14) - NPM (
~> 6.4) - Elixir (
~> 1.8) - Erlang (
~> 21.3) - PostgreSQL (
~> 10.0)
All required environment variables are documented in .env.dev.
When running mix or make commands, it is important that these variables are present in the environment. You can use source, nv or any custom script to achieve this.
- Create both
.env.dev.localand.env.test.localfrom empty values in.env.devand.env.test - Install Mix and NPM dependencies with
make dependencies - Generate values for mandatory secrets in
.env.devwithmix phx.gen.secret - Create and migrate the database with
mix ecto.setup - Start the Phoenix server with
iex -S mix phx.serverwith environment variables from.env.devand.env.dev.local
A Makefile is present at the root and expose common tasks. The list of these commands is available with make help.
To avoid running PostgreSQL locally on your machine, a docker-compose.yml file is included to be able start a PostgreSQL server in a Docker container with make dev-start-postgresql.
Tests can be ran with make test and test coverage can be calculated with make test-coverage.
Several linting and formatting tools can be ran to ensure coding style consistency:
make lint-formatensures Elixir code is properly formattedmake lint-credoensures Elixir code follows our best practicesmake lint-compileensures Elixir code compilation does not raise any warningmake lint-eslintensures JavaScript code follows our best practicesmake lint-stylelintensures SCSS code follows our best practicesmake lint-prettierensures JavaScript, SCSS and GraphQL code is properly formatted
All of these commands can be executed at the same time with the helpful make lint command.
The priv/scripts/ci-check.sh script runs a set of commands (tests, linting, etc.) to make sure the project and its code are in a good state.
…
| Description | Priority | Complexity | Ideas |
|---|---|---|---|
| … | … | … | … |
…
Each deployment is made from a Git tag. The codebase version is managed with incr.
A Docker image running an OTP release can be created with make build, tested with make dev-start and pushed to a registry with make push.