Problem: Users need persistent navigation to all major sections of the app without cluttering the reading area. The navigation should show what's available, indicate which features require a paid tier, and highlight the current page.
Solution: A vertical sidebar with icon + label navigation items, tier badges, and active-page highlighting. Collapses to a hamburger menu on mobile.
Not included: Customizable navigation order, favorites, or recent pages. The sidebar is a fixed navigation structure.
A vertical sidebar on the left side of the app showing all main navigation destinations.
Navigation items (in order):
/read/search/themes/parables/teachings/parallel/crossrefs/43/3/16/notes/ask (badge: "Beta")/pricing/settings/activate/adminActive state: Current page is highlighted. Prefix matching for /read/* and /crossrefs/* routes.
Tier badge: Shown at the bottom of the sidebar, displaying the user's current plan (free/beta-low/beta-high/pro/premium/admin).
Edge cases:
Layout:
Active state: Left border accent + background highlight on current page item.
Mobile: Hidden by default, toggled via hamburger button (see Mobile Responsive Layout).
Component: Sidebar.svelte at apps/web/src/lib/components/layout/Sidebar.svelte
Nav items: Derived array, i18n-aware via t() function. Each item has href, label, icon.
Active detection: isActive(href) function with prefix matching for /read/ and /crossrefs/ routes.
Tier badge: Computed from betaTier prop passed from +layout.server.ts.
Conditional items: "Activate" shown when !betaTier || betaTier === 'free'. "Admin" shown when isAdmin flag.
Files:
apps/web/src/lib/components/layout/Sidebar.svelte — the componentapps/web/src/routes/(app)/+layout.svelte — mounts sidebar, passes betaTierapps/web/src/routes/(app)/+layout.server.ts — provides betaTier from sessionCurrent: DONE Milestone: Foundation (pre-v1) Priority: Core — primary navigation mechanism
History:
Dependencies: