4.5 KiB
4.5 KiB
AGENTS.md
Project
Quran website at https://quran.diyaa.de plus a public developer API. Private owner (Diya), free to use, donations possible.
- Type: website / web app (Next.js) with its own API server (NestJS + PostgreSQL), deployed with Docker Compose behind Traefik on the owner's server.
- The website is the base of the project. The public API is served by the same server and is given to other developers with an API key.
- Languages of the site: German, English, Spanish, Arabic, Turkish. More later, including non-Latin scripts.
- Readers do not log in. Favorites, bookmarks and notes stay in the reader's own browser.
Read docs/README.md for the full index, docs/brief.md for what the site does, COMMANDS_AGENT.md for the commands, and docs/tasks/README.md for the task list.
Repository map
AGENTS.md rules for every agent (this file)
COMMANDS_AGENT.md make build / dev / test contract
Makefile root commands
clean_rebuild.sh clean production build
dev_rebuild.sh incremental development build
scripts/ shared build flow, invariants, tests
web/ Next.js website (created in T-006)
api/ NestJS API server (created in T-006)
deploy/ docker-compose.yml, Traefik labels, .env.example (created in T-007)
docs/ brief, architecture, decisions, risks, legal, tasks
Working rules
- Quran text integrity. Never alter, normalize in storage, reorder, translate by machine, or "fix" the Arabic text. Normalization is allowed only in a separate search column. The displayed text is exactly what the source delivers.
- No AI translations or tafsir. Every translation and tafsir comes from a named source with a named author. Always show the author and source in the UI and in API responses.
- Two data zones, never mixed.
qf_*tables hold content from Quran Foundation (internal, used only by the website's own server-side pages).open_*tables hold content from openly licensed sources. The public API reads onlyopen_*. Code underapi/src/public/must never import or queryqf_*.scripts/check-invariants.shenforces this. - Quran Foundation rules. Offline data comes only from Content Sync, refreshed at least every 7 days. Credentials (
QF_CLIENT_ID,QF_CLIENT_SECRET) live only in the server.env, never in git, never in browser code, never in logs. Use the prelive and production environments separately; never mix tokens or caches. - Secrets.
.envis git-ignored. Commit only.env.examplewith empty values. Never print secret values in output. - Source licensing. A source enters the public API only after its license is recorded in
docs/decisions.md(name, license, link, date checked, whether redistribution and attribution are allowed). - Privacy by default. No analytics, no tracking scripts, no third-party fonts or CDNs loaded from the browser. Store only what is needed: API key hash, key owner email, request counts. Do not log reader activity.
- Verify, do not trust. Check server facts (
docs/architecture.mdsection Server) and API behaviour before relying on them. Record what was verified and when. - No deploy without being asked.
make buildandmake devnever deploy. Deploy only when the owner says so. - Legal topics. The owner decided legal work is out of scope for now (see
docs/legal.md). Do not start legal work. The data-source and secret rules above are engineering rules and still apply. - Report real results. Never claim success from compilation alone. Report the commands run and their actual outcomes, including errors.
Tasks
docs/tasks/ has one file per task (T-001-short-slug.md) and an index in docs/tasks/README.md. Keep the task file and the index row in sync. Status values: todo, in progress, done. Mark done only when verified. IDs are never renumbered.
Commit rules
Format:
TYPE - Short summary
- First concrete change
- Second concrete change
- Third concrete change
Allowed types: ADDED, IMPROVED, FIXED, CHANGED, REFACTORED, OPTIMIZED, REMOVED, UPDATED, SECURED, TESTED, DOCUMENTED, STYLED, CONFIGURED, RENAMED, MOVED, CLEANED, REVERTED.
Rules:
- Write commit messages in English.
- Use uppercase type names.
- Keep the title concise.
- Add a blank line before the bullet list.
- Describe only the actual changes.
- Inspect
git diff --cachedbefore writing the message. - Do not add AI attribution or
Co-Authored-By. - Commit automatically as soon as a piece of work is finished, no need to ask first.