Canonical guide:
docs/ai/README.md— read that file for full architecture, templates, data-model, and file-location details.
Stack: Python 3.12 / web.py (Infogami) + FastAPI · Templetor templates · jQuery, Vue 3, Lit · webpack · Solr 9.9
Dev setup: make git && docker compose up → http://localhost:8080
pre-commit run --all-files checks for various issues including type checking and linting. Run it directly on the host machine.
The following commands should always be run inside docker like this: docker compose run --rm home <command>
make test-py # Python tests
npm run test:js # JS tests
make lint # Python lint (ruff)
npm run lint # JS + CSS lint
npm run lint-fix # Auto-fix JS/CSS
npm run watch # Dev mode with hot reload- Python: Ruff + Black, line length 162
- JS: ESLint, single quotes, no jQuery in new code
- CSS: Stylelint — no hex/named colors, use variables
- Branches:
{issue-number}/{type}/{slug}
| What | Where |
|---|---|
| App entry | openlibrary/code.py |
| FastAPI | openlibrary/asgi_app.py |
| Route handlers | openlibrary/plugins/*/code.py |
| Templates | openlibrary/templates/ |
| JS source | openlibrary/plugins/openlibrary/js/ |
| CSS source | static/css/ |