Skip to content

Explore component-owned page routes and request/response integration #143

Open

Description

@JuroOravec

(GPT Astra 5.6 medium)

Citry components currently render content; the host web framework owns page routes and Request/Response objects. A private streaming experiment used a custom Django ASGI route to send rendered HTML before Citry finished preparing Vue data. This raises an API question, not a decision to make Citry a router.

Explore whether an optional Component.View or Component.Page could declare a request handler and register a page route. These names are illustrative; no API is selected. Domain URLs such as /account/me must remain possible, rather than forcing user-facing pages beneath /citry/. A declaration such as @route('/account/me') is one possible shape, but risks duplicating the host framework's routing system.

Compare these options:

  1. Keep routes and responses application-owned; expose framework-neutral buffered output or an iterator of streaming output chunks.
  2. Offer optional Django/ASGI adapters that build responses while applications register URLs.
  3. Allow component-declared handlers/routes with explicit host-framework registration.

Questions to resolve:

  • URL naming/reversing, path/query arguments, registration and route conflicts.
  • Middleware, authentication, CSRF and dependency injection.
  • Redirects, status, headers, cookies and errors before or after the first streamed bytes.
  • Disconnect cancellation, async execution and buffering fallback.
  • Integration with existing Events endpoints without imposing their URL namespace on pages.
  • Whether the convenience justifies expanding Citry's responsibilities beyond rendering and Events.

Desired outcome: document the tradeoffs and choose an integration boundary, including the option to keep route ownership entirely outside Citry. No implementation commitment. Streaming output is a separate capability and should not require component-owned routing; see #19.

Activity

  1. added
    next-sprint
    on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    next-sprint

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions