2023-03-12 16:42:39 -04:00
|
|
|
# Development Notes
|
2023-03-19 12:01:11 -04:00
|
|
|
|
2023-03-12 16:42:39 -04:00
|
|
|
This document collects notes and decisions taken during the development of HedgeDoc 2.0.
|
|
|
|
It should be converted to a properly structured documentation, but having unstructured docs
|
|
|
|
is better than having no docs.
|
|
|
|
|
|
|
|
## Supported databases
|
2023-03-19 12:01:11 -04:00
|
|
|
|
2023-03-12 16:42:39 -04:00
|
|
|
We intend to officially support and test these databases:
|
|
|
|
|
|
|
|
- SQLite (for development and smaller instances)
|
|
|
|
- PostgreSQL
|
|
|
|
- MariaDB
|
|
|
|
|
|
|
|
## Special Groups
|
2023-03-19 12:01:11 -04:00
|
|
|
|
2023-03-12 16:42:39 -04:00
|
|
|
The software provides two special groups which have no explicit users:
|
|
|
|
|
2023-07-05 20:45:32 -04:00
|
|
|
- `everyone` (Describing that everyone who wants to access a note can do if it is
|
|
|
|
enabled in the config.)
|
2023-03-12 16:42:39 -04:00
|
|
|
- `loggedIn` (Describing all users which are logged in)
|
|
|
|
|
|
|
|
## Entity `create` methods
|
|
|
|
|
2023-07-05 20:45:32 -04:00
|
|
|
Because we need to have empty constructors in our entity classes for TypeORM to work, the actual
|
|
|
|
constructor is a separate `create` method. These methods should adhere to these guidelines:
|
2023-03-12 16:42:39 -04:00
|
|
|
|
|
|
|
- Only require the non-optional properties of the corresponding entity
|
|
|
|
- Have no optional parameters
|
|
|
|
- Have no lists which can be empty (so probably most of them)
|
|
|
|
- Should either return a complete and fully useable instance or return a Pick/Omit type.
|
|
|
|
- Exceptions to these rules are allowed, if they are mentioned in the method documentation
|