We would love for you to contribute to AliceO2 Bookkeeping and help make it even better than it is today! As a contributor, here are the guidelines we would like you to follow:
- Coding conventions
- Endpoint conventions
- Commit Message Guidelines
- Trunk based development guidelines
To ensure consistency throughout the source code, keep these rules in mind as you are working:
- All features or bug fixes must be tested by one or more specs (unit-tests).
- All endpoints must be tested by one or more specs (e2e-tests).
- All code must be formatted. An automated formatter is available (
npm run lint:fix
).
A resource can be a singleton or a collection. For example, "customers
" is a collection resource and "customer
" is a singleton resource (in a banking domain). We can identify "customers
" collection resource using the URI "customers
". We can identify a single "customer
" resource using the URI "/customers/{customerId}
".
A resource may contain sub-collection resources also. For example, sub-collection resource "accounts
" of a particular "customer
" can be identified using the URI "/customers/{customerId}/accounts
" (in a banking domain). Similarly, a singleton resource "account
" inside the sub-collection resource "accounts"
can be identified as follows: "/customers/{customerId}/accounts/{accountId}
".
GET /orders <---> orders
POST /orders <---> orders.push(data)
GET /orders/1 <---> orders[1]
PUT /orders/1 <---> orders[1] = data
PATCH /orders/1 <---> orders[1] = { ...orders[1], ...data }
GET /orders/1/lines <---> orders[1].lines
POST /orders/1/lines <---> orders[1].lines.push(data)
We have very precise rules over how our git commit messages can be formatted. This leads to more readable messages that are easy to follow when looking through the project history.
Each commit message consists of a header and a body. The header has a special format that includes the jira ticket number and a quick description of it
[<tiket-number>] <description>
[optional body]
docs(changelog): update changelog to beta.5
fix(release): need to depend on latest rxjs and zone.js
The version in our package.json gets copied to the one we publish, and users need the latest of these.
For this project we generally use trunk based development. Before you start coding, make sure you are somewhat familiar with this concept. You can read more about that here and here