all repos

onasty @ c0ab069

a one-time notes service

onasty/docs/CONTRIBUTING.md (view raw)

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
docs: add docs, readme, and license (#216)..., 8 months ago
1
# Getting started
2
First of, you need have [task](https://taskfile.dev), and [mise](https://mise.jdx.dev) installed.
3
4
```bash
5
git clone git@github.com:olexsmir/onasty.git
6
cd onasty
7
mise use  # installs required tools for development
8
task api:install # installs deps to work with openapi
9
task web:install # installs all node_modules for the frontend gods
10
task docker:up # starts all docker containers
11
task frontend:dev # starts dev server for elm app
12
task run # recompiled and restart core and mailer services
13
```
14
15
# Code Structure Guidelines
16
See [Architecture](./Architecture).
17
18
# Testing
19
```bash
20
task test # runs all tests in the project
21
  # > backend e2e and units
22
  # > frontend units
23
task test:unit # backend unit tests
24
task test:e2e  # backend e2e tests
25
task frontend:test # frontend unit tests
26
```
27
28
# Coding Style & Linting
29
- For general editor config [editorconfig](https://editorconfig.org/) is used
30
- Go
31
  - `gofumpt`, `goimports`, `golines` are used for formatting
32
  - `golangci-lint` is used for linting
33
- Elm
34
  - `elm-format` is used for formatting
35
  - `elm-review` is used for linting
36
37
# Adding Features
38
1. Make sure there’s no duplicate functionality.
39
1. Add new endpoints to `api/openapi.yml` if needed.
40
1. Add unit tests or e2e tests as appropriate.
41
1. For new mailer events: add event struct in `internal/events` and corresponding handler in `mailer/`.
42
43
# Branching & Workflow
44
- Use feature branches for any changes: `feat/<description>` or `fix/<escription>`.
45
- Follow [Conventional commit](https://www.conventionalcommits.org/en/v1.0.0) messages.
46
- Open PR against `main` branch.