# Standard Notes

Summarizing my attempts to understand StandardNotes codebase.

* How does it sync?
* How does it encrypt?
* How does it deal with conflicts?
* Overall front-end code structure?
* How does it store on user disk?
* How does it store on the server?

## Code

* Web client (also core for desktop): <https://github.com/standardnotes/web>
* Desktop client: <https://github.com/standardnotes/desktop>
  * JS/TS: <https://github.com/standardnotes/web/tree/develop/app/assets/javascripts>
  * Angular.
* Syncing server: <https://github.com/standardnotes/syncing-server-js>
* Core js logic: <https://github.com/standardnotes/snjs>

## Thoughts & Observations

* Web
  * I love how easy it is to start it locally. `yarn install && yarn start`. Done.
  * What is the rails server doing inside the client app?
  * Are there any tests?
* Sync server
  * DI with inversify.
  * Specs are located right next to the code under test.&#x20;
  * Bindings are helpful to understand where everything is <https://github.com/standardnotes/syncing-server-js/blob/develop/src/Bootstrap/Container.ts>
  * What is extensions server?
    * I thought all extensions were client-side? If so, why do anything about them when syncing items?
  * Are notes just rows in MySQL?
    * <https://github.com/standardnotes/syncing-server-js/blob/5114b03c273ca99aacc40f1c2f6b29a0c998d48c/src/Domain/Item/Item.ts>
    * I expected them to be blobs in some blobstore or something.
    * Is there a limit on the item size then?
  * S3, SNS, SQS - what are they doing here?
  * ItemService - seems to actually handle persistence <https://github.com/standardnotes/syncing-server-js/blob/5114b03c273ca99aacc40f1c2f6b29a0c998d48c/src/Domain/Item/ItemService.ts>
  * What exactly does "projection" mean?
    * Conversion between persistent-data and some transfer format?
  * S3 backup
    * <https://github.com/standardnotes/syncing-server-js/blob/develop/src/Infra/S3/S3ItemBackupService.ts>
