···11+# A guided tour of the millipds codebase
22+33+The source is in `src/millipds/`.
44+55+The entrypoint for the main `millipds` command is `__main__.py`. CLI arg parsing happens here.
66+77+If you choose to launch the server, it calls out to `service.py`, which sets up an `aiohttp` application.
88+99+General-purpose routes are implemented right there in `service.py`, but others are handled in:
1010+1111+- `auth_oauth.py` - oauth stuff
1212+- `atproto_repo.py` - `com.atproto.repo.*` endpoints
1313+- `atproto_sync.py` - `com.atproto.sync.*` endpoints
1414+1515+`repo_ops.py` implements core repo commit logic - it's quite complex, even though [atmst](https://github.com/DavidBuchanan314/atmst) takes care of the actual MST operations.
1616+1717+`database.py` handles Database Stuff™, using `apsw` as an SQLite driver. There are also SQL queries littered throughout the rest of the codebase (no ORM...) The application is quite tightly coupled to SQLite-specific features (I've lost track of which ones).
1818+1919+`crypto.py` depends on `pyca/cryptography` and provides utilities for basic crypto stuff, including generating "low-S" signatures.