Expand description
Application routing and navigation.
Defines all routes for the Logicaffeine web application using the Dioxus
router. Each route maps to a page component in crate::ui::pages.
§Routes
| Path | Component | Description |
|---|---|---|
/ | Landing | Marketing homepage |
/learn | Learn | Main learning interface with curriculum |
/studio?:file | Studio | Playground for experimentation |
/profile | Profile | User settings and progress |
/pricing | Pricing | Subscription plans |
/guide | Guide | Documentation and tutorials |
/registry?:token&:login&:error&:q | Registry | Package browser |
/workspace/:subject | Workspace | Subject-specific workspace |
§Navigation
Use the Dioxus Link component with Route variants:
use logicaffeine_web::ui::router::Route;
rsx! {
Link { to: Route::Learn {}, "Start Learning" }
Link { to: Route::Studio { file: None }, "Open Studio" }
}§Query parameters are part of the route type
On startup the router parses the browser URL into Route, serializes it
back, and replaces the browser URL with the serialization whenever the two
differ. Any URL state the route type does not model is silently destroyed
before page components can read it. Pages therefore MUST receive query
parameters as route props (declared with ?:name in the #[route]
attribute) — never by scraping the browser location’s search string; the
query_scraping_is_forbidden lock enforces this.
Enums§
- Route
- Application routes.
Functions§
- studio_
file_ url - The canonical shareable URL for a studio file.