We only accept pull request that is assigned an accepted issue. By participating in this project, you agree to abide by the code of conduct.
- Fork this repo.
- Create a feature branch based of
develop
branch - Implement your feature or bug fix.
- Add, commit, and push your changes.
- Submit a pull request
- Add tests to cover the new feature to be accepted and make sure all test pass.
- If needed, update documentation or behaviors.
- If possible, avoid installing dependencies and if so use an exact
version
x.y.z
instead of using semantic versioning. - As much as possible, squash commits before filing a PR.
- Code should be formatted by rubocop
Aside from setting up this server, remember to start this server before info-server and all its dependencies since itit starts syncing from the blockchain and then making API calls to update this server.
Majority of the business logic is written in the /app/models
. So if
you need to explore, its good to start there.
The authentication used by governance-ui
comes from this server.
However, users aren't created by this server instead synced from
info-server
when it starts up. Although using standard JWT,
authentication is based on message signing instead of passwords. For the
User
model, it is managing the profile features such as changing email
and username.
The Comment
model is primarily responsible for posting, liking,
banning and deleting comments from proposals.
Proposals are primarily created by the info-server
and broadcasted for
this server to hold its key (proposal.proposal_id
). So the Proposal
model is simply responsible for managing its likes.
User transactions status are recorded which is again synced from
info-server
and display in the transaction history page. The updates
is mainly handled by the TransactionsController
.
This is straightforwardly encapsulated by the Kyc
model with its submission,
approval and rejection operations.
Coming from Elixir, the coding style is based on tagged tuples or a raw
form of monads from dry-rb. Though not
perfect, the architectural style is based of a service
so it is
preferable to add module functions instead of class functions to avoid
state.
For the coding style, like with prettier, we use
rubocop
as an easy arbiter. As long as it is formatted and have no
warnings or errors, it is pretty much correct. Code reviews should
address the more technical aspect of design and structure.