# Website and documentation architecture ## From editor to reader 1. **Website Back.** A Filament editor saves one record per `locale` and `slug` with its title, section, navigation path, summary, Markdown, sort order and publication flag. A shared slug connects translations. Editors can work on drafts while public reads include published records only. [Documentation editor](/en/docs/website-documentation-pages) · [Media library](/en/docs/website-media-library). 2. **Laravel API.** The list for a language is sorted by configured order, then ID. The article endpoint returns Markdown, update time, available translations, HTML and contents. Rendering strips embedded HTML and prevents unsafe links. Level 1–3 headings receive unique anchors. 3. **Website Front.** The Next.js server page requests the navigation list and selected article concurrently. The list drives the left tree and the article supplies the main text and right-hand contents. Search runs against the server. A separate process of the same application serves `docs.kamoorj.com` in `DOCUMENTATION_ONLY` mode. Localized documentation URLs are independent of storefront design. [Using the portal](/en/docs/website-documentation-guide). ## Updates, caching and addresses The standard Website JSON helper normally requests 60-second revalidation. Documentation index, article, search and plain-text requests use `no-store`. Reopen or reload an article when checking an edit. An open tab does not subscribe to text updates. Page metadata use the article title and summary, canonical address and links to published translations. Open Graph metadata describe the shared link. In documentation mode, the sitemap is built from the published indexes for all three languages. After unpublishing, a new read of the index, export or sitemap excludes that record. Renaming a slug changes the canonical URL. ## What ships in a release Repository articles live in `docs/manual/{locale}/*.md` in Website Back. Entries in `manifest.json` connect files to their slug, language and metadata. Backend deployment runs migrations and seeders including `DocumentationSeeder`. A missing locale/slug pair is created as published. An existing published article is updated only when the manifest supplies a `previous_seed_hash` matching the current fingerprint of fields and body. Drafts and manually edited versions are preserved. Removing an entry from the manifest alone does not unpublish an existing database record. Website Back GitLab CI validates Composer configuration and PHP syntax on merge requests and pushes to configured branches. A push to `master` starts production deployment after the check. The frontend has a separate pipeline. Relevant changes pushed to `master` install dependencies, build Next.js and update the main website and documentation service. Routine CMS edits to a published article do not require a frontend release. If a Git change is missing on the site, check its manifest entry, backend release, locale, publication flag and any editorial changes. ## Data available to a future AI assistant | Representation | Address and content | | --- | --- | | Laravel index | `GET /api/documentation?locale=en` returns slug, language, title, menu section and path, summary and update time. | | Laravel article | `GET /api/documentation/introduction?locale=en` returns article fields, Markdown, HTML, table of contents and published languages. | | Plain article on the portal | `https://docs.kamoorj.com/api/documentation/en/introduction` returns a heading and source Markdown using backend route `/api/documentation/introduction/markdown?locale=en`. | | Language export | `https://docs.kamoorj.com/api/documentation/en/export` returns published articles in menu order with the source address preceding each body. Request `ru` and `hy` separately. | A knowledge index can retain the `locale + slug` pair, `updated_at` and the canonical link. For example, reread a revised English article and remove records missing from the published index when reconciling a full snapshot. These interfaces provide content for a future MCP integration. Reading an export does not build an index or start a chat. For the education platform itself, see [EduSystems frontend architecture](/en/docs/edusystems-frontend-architecture) and [EduSystems API architecture](/en/docs/edusystems-api-architecture). ## Implementation references - [website_backend · .gitlab-ci.yml](https://gitlab.kamoorj.com/development/website_backend/-/blob/4eaf1ae057b0fb32b9293f737d5e52bf4e4f7655/.gitlab-ci.yml) - [website_backend · composer.json L61-74](https://gitlab.kamoorj.com/development/website_backend/-/blob/4eaf1ae057b0fb32b9293f737d5e52bf4e4f7655/composer.json#L61-74) - [website_backend · seeders/DocumentationSeeder.php](https://gitlab.kamoorj.com/development/website_backend/-/blob/4eaf1ae057b0fb32b9293f737d5e52bf4e4f7655/database/seeders/DocumentationSeeder.php) - [website_backend · routes/api.php L20-27](https://gitlab.kamoorj.com/development/website_backend/-/blob/4eaf1ae057b0fb32b9293f737d5e52bf4e4f7655/routes/api.php#L20-27) - [website_backend · Api/DocumentationController.php](https://gitlab.kamoorj.com/development/website_backend/-/blob/4eaf1ae057b0fb32b9293f737d5e52bf4e4f7655/app/Http/Controllers/Api/DocumentationController.php) - [website_backend · Services/DocumentationRenderer.php](https://gitlab.kamoorj.com/development/website_backend/-/blob/4eaf1ae057b0fb32b9293f737d5e52bf4e4f7655/app/Services/DocumentationRenderer.php) - [website · .gitlab-ci.yml](https://gitlab.kamoorj.com/development/website/-/blob/24260dbb63eec62158083508db51fb6d7358f258/.gitlab-ci.yml) - [website · deploy/website-docs.service](https://gitlab.kamoorj.com/development/website/-/blob/24260dbb63eec62158083508db51fb6d7358f258/deploy/website-docs.service) - [website · lib/api.ts](https://gitlab.kamoorj.com/development/website/-/blob/24260dbb63eec62158083508db51fb6d7358f258/lib/api.ts) - [website · server/documentation.ts](https://gitlab.kamoorj.com/development/website/-/blob/24260dbb63eec62158083508db51fb6d7358f258/lib/server/documentation.ts) - [website · ...slug/page.tsx](https://gitlab.kamoorj.com/development/website/-/blob/24260dbb63eec62158083508db51fb6d7358f258/app/%5Blocale%5D/%28documentation%29/docs/%5B%5B...slug%5D%5D/page.tsx) - [website · slug/route.ts](https://gitlab.kamoorj.com/development/website/-/blob/24260dbb63eec62158083508db51fb6d7358f258/app/api/documentation/%5Blocale%5D/%5Bslug%5D/route.ts) - [website · app/sitemap.ts](https://gitlab.kamoorj.com/development/website/-/blob/24260dbb63eec62158083508db51fb6d7358f258/app/sitemap.ts)