2021-02-19 11:43:55 +00:00
# 2.0 Development Notes
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.
2020-07-26 15:28:32 +00:00
2021-02-19 11:50:16 +00:00
## Supported databases
We intend to officially support and test these databases:
- SQLite (for development and smaller instances)
- PostgreSQL
- MariaDB
2021-02-27 13:16:29 +00:00
## Special Groups
The software provides two special groups which have no explicit users:
- `everyone` (Describing that everyone who wants to access a note can do if it is enabled in the config.)
- `loggedIn` (Describing all users which are logged in)
2021-02-19 11:50:16 +00:00
2021-03-15 10:53:44 +00:00
## Deleting notes and revisions
- The owner of a note may delete it.
- By default, this also removes all revisions and all files that were uploaded to that note.
- The owner may choose to skip deleting associated uploads, leaving them without a note.
- The frontend should show a list of all uploads that will be affected
and provide a method of skipping deletion.
- The owner of a note may delete all revisions. This effectively purges the edit
history of a note.
2020-07-26 15:28:32 +00:00
## Dev Setup
- Clone backend and frontend in two folders.
- Run `yarn install` in both projects
- Start the backend server in watch mode using `yarn start:dev` . The backend is then accessible on port 3000.
- Start the frontend dev server using `yarn start` . The frontend is now accessible on port 3001.
2021-11-11 21:07:00 +00:00
## Entity `create` methods
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:
- 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