How moldytaint/cinephage-docs works
1. Repository role
- This repo is the documentation site for Cinephage, not the Cinephage application itself.
- It is a Docusaurus 3 site written in TypeScript/React, built as a static documentation frontend and deployed to Cloudflare Workers.
2. Primary content architecture
- The docs are organized with the Diataxis model: Getting Started, Guides, Reference, Explanation, plus Support/FAQ.
- The docs/ tree is the main knowledge base, with separate areas for installation/onboarding, operational how-tos, technical reference, and architecture/design writeups.
3. Documentation as technical interface
- The docs/reference/ section is the most “contract-like” part of the site: API endpoints, database schema, configuration variables, YAML definitions, and rate limiting.
- This section acts as the boundary between the docs and the Cinephage product surface it describes.
4. Custom site pages
- src/pages/index.tsx and src/pages/deploy.tsx define custom entry points outside the markdown docs.
- The deploy page is a special interactive experience rather than a static article, and is backed by custom React components under src/components/docker-configurator.
5. Interactive deployment/configuration subsystem
- src/components/docker-configurator/ and src/components/compose/ implement a client-side wizard that assembles Docker deployment artifacts.
- The component set includes phase-based UI, time zone selection, network/VPN choices, and review/validation logic.
- The compose utilities generate and validate outputs such as Docker Compose files, environment templates, proxy/Traefik configs, and WireGuard parsing.
6. Shared utility layer
- src/utils/ contains support code used by the interactive tooling, including time zone handling and secrets-related helpers.
- These utilities feed the configurator rather than acting as a general application backend.
7. Source synchronization boundary
- repos/cinephage and repos/cinephage-dev are git submodules tracking the upstream Cinephage codebases.
- This repo uses them to keep documentation aligned with the current application source and development variant.
- The .github/workflows/update-submodules.yml workflow automates this refresh on a schedule.
8. Build and deployment flow
- The site is built with Node 20+ using the standard Docusaurus build pipeline into static assets.
- wrangler.jsonc indicates the deployment target is Cloudflare Workers, so the output is packaged for edge hosting rather than a traditional server.
9. CI/CD
- GitHub Actions provides two main automation paths:
- build.yml validates the site on pushes and pull requests.
- update-submodules.yml keeps the upstream Cinephage references current.
- This means content changes and source-sync changes are both continuously checked before deployment.
10. Architecture of the rendered site
- At runtime, the site is mostly static documentation served from Cloudflare, with a small amount of interactive client-side React for configuration/deployment tooling.
- There is no evident backend application in this repo; all “logic” is either build-time documentation generation or browser-side configurator behavior.
11. Practical diagram boundaries
- A useful architecture diagram would show:
- Authoring/content: markdown docs, React pages, shared UI components
- Upstream source inputs: git submodules to Cinephage repos
- Build system: Docusaurus + Node + GitHub Actions
- Deployment target: Cloudflare Workers via Wrangler
- Interactive tools: deploy/configurator and compose generation on the client side
Main entry points: docs/index.md Docs home · reference/index.md Reference · cinephage Cinephage · docker-configurator Configurator
Components 21
Authoring & docs
Markdown knowledge base and custom site pages
- Docs home · Landing pages and doc navigation hub
docs/index.md - Getting Started · Installation and onboarding path
docs/getting-started/index.md - Guides · Operational how-tos for using and configuring Cinephage
docs/guides/index.md - Reference · API, configuration, database, and YAML reference material
docs/reference/index.md - Explanation · Architecture and design rationale
docs/explanation/index.md - Support · FAQ, releases, and roadmap
docs/support/faq/index.md - API docs · Authentication, endpoints, and rate limits
docs/reference/api/endpoints-overview.md - Config docs · Environment variables and settings explanations
docs/reference/configuration/settings-explained.md - DB docs · Database schema and table reference
docs/reference/database/schema-overview.md - YAML docs · Indexer definitions and naming tokens
docs/reference/yaml/indexer-definitions.md
Interactive tools
Client-side deployment and compose configurator
- Deploy page · Interactive deployment entry point
src/pages/deploy.tsx - Home page · Custom landing page for the documentation site
src/pages/index.tsx - Configurator · Client-side deployment and configuration flow
src/components/docker-configurator - Compose tools · Docker Compose, env, proxy, and validation helpers
src/components/compose - Utility layer · Shared helpers for timezone and secrets handling
src/utils
Build & deploy
Site generation, validation, and Cloudflare delivery
- Docusaurus build · TypeScript/React documentation site generation
package.json - Build CI · Validates pushes and pull requests
.github/workflows/build.yml - Submodule sync · Refreshes upstream Cinephage references on a schedule
.github/workflows/update-submodules.yml - Cloudflare Workers · Static site deployment via Wrangler
wrangler.jsonc
Upstream inputs
Synced Cinephage source repositories
- Cinephage · Upstream application source tracked for documentation alignment
repos/cinephage - Cinephage dev · Development variant tracked alongside the main source
repos/cinephage-dev
Connections 23
- Docs home → Getting Started: navigates to · Primary docs entry routes into onboarding
- Docs home → Guides: navigates to · Primary docs entry routes into usage guides
- Docs home → Reference: navigates to · Primary docs entry routes into technical reference
- Docs home → Explanation: navigates to · Primary docs entry routes into architecture explanations
- Docs home → Support: navigates to · Primary docs entry routes into support content
- Reference → API docs: includes · API contracts and endpoint boundaries
- Reference → Config docs: includes · Configuration and environment reference
- Reference → DB docs: includes · Schema and table reference
- Reference → YAML docs: includes · YAML definitions and naming rules
- Deploy page → Configurator: uses · Deploy page hosts the interactive wizard
- Configurator → Compose tools: generates · Wizard assembles deployment artifacts through compose utilities
- Configurator → Utility layer: depends on · Wizard uses shared utility helpers
- Compose tools → Utility layer: uses · Compose helpers share support code
- Home page → Docs home: links to · Landing page routes into the documentation experience
- Docusaurus build → Build CI: checked by · CI validates the site build
- Docusaurus build → Cloudflare Workers: packages for · Static output is prepared for Cloudflare deployment
- Build CI → Cloudflare Workers: guards · Successful validation precedes deployment
- Submodule sync → Cinephage: syncs · Scheduled workflow refreshes upstream source reference
- Submodule sync → Cinephage dev: syncs · Scheduled workflow refreshes development source reference
- Cinephage → API docs: informs · Upstream product surface informs reference docs
- Cinephage → Config docs: informs · Upstream settings shape documentation
- Cinephage → DB docs: informs · Upstream data model shapes schema docs
- Cinephage dev → YAML docs: informs · Development variant informs configuration examples