This document is intended to help you get started with contributing to ssasy
.
The goal of this project is to create a usable and secure user authentication system. In order to acheive this, the source code needs to be maintainable and easy to understand. To acheive this, the following principles are followed:
- secure - it is easier said than done, but security should be a top priority. You should be able to explain why your code is secure or why it is not. Feel free to ask for help if you are unsure about something.
- simple > complex - the source code should be simple and easy to understand. This means no one-letter variable names, no clever tricks and no over-engineering. If you are unsure if your code is simple enough, ask yourself if you could explain it to a
5 year oldbachelor student. - dont repeat yourself - don't repeat yourself. If you find yourself copy-pasting code, you are probably doing something wrong. Instead, try to find a way to abstract the common functionality into a function or class. This will make the code easier to understand, test and maintain.
- test code - at the very least, changes should be tested so that they a) produce the intended result and b) don't break existing functionality. If you are unsure how to test your code, feel free to ask for help.
At a high level, the project is structured as follows:
tests/
- contains the tests for the projectsrc/
- project source codeconfig/
- project configurationinterfaces/
- typescript interfacesmodules/
- the modules that make up the projectchallenge-mod.ts
- creating and verifying challengescrypto-mod.ts
- cryptographic operationsserializer-mod.ts
- (de)serializes SSASy resourceskey-mod.ts
- key operationsindext.ts
- entry point for the module
utils/
- contains utility or plugins that are used by the projectwallet.ts
- contains the wallet class for the projectindex.ts
- contains the entry point for the project
Jumping into brand new source code can be daunting so feel free to read the architecture document to get a better understanding of the project structure.
Also, this project uses pnpm
as its package manager. To get started, run the following commands:
# install pnpm
npm install -g pnpm
# install project dependencies
pnpm install
If you want to propose a change, you can do so by creating a pull request or by creating an issue. If you are unsure about something, feel free to ask for help.