How karlokuzle/kinora works
1. Repository shape
- This is a single-page frontend application built with React + TypeScript and bundled by Vite.
- The repo is organized around a small set of route-level pages, a shared application context, mock domain data, and a large reusable component library.
2. Runtime boundary
- The application runs entirely in the browser; there is no visible backend, API client, database layer, or server-side rendering path in this repo.
- That means the main architecture boundary is between:
- UI state and navigation inside the SPA
- static/mock data and local interactions
- Any “business behavior” is currently represented in client-side state and reusable presentation components.
3. Bootstrap and app shell
- src/main.tsx is the entry point that mounts the app.
- src/app/App.tsx and src/app/components/RootLayout.tsx/Layout.tsx define the top-level shell around the routed pages.
- ScrollToTop.tsx suggests the app manages navigation transitions in-browser and resets scroll on route changes.
4. Routing structure
- src/app/routes.tsx is the central route map.
- The route-level pages are:
- DiscoverPage
- ScreeningsPage
- ScreeningDetailPage
- PrivateBookingPage
- VotingPage
- MyTicketsPage
- CinemaDashboardPage
- This indicates the app is organized around a cinema/browsing/voting flow, with separate screens for discovery, detail, booking, ticket viewing, and a dashboard.
5. Application state boundary
- src/app/context/AppContext.tsx is the main shared state layer.
- It likely coordinates cross-page state such as selected screening/movie, ticket/booking state, or voting/campaign interactions.
- Because there is no external state management library visible, this context is the main boundary for global UI/business state.
6. Domain data model
- src/app/data/types.ts defines the domain entities used across the app.
- src/app/data/mockData.ts provides the initial or demo dataset.
- This suggests the app is currently driven by static/mock cinema data, which feeds the pages and cards rather than live API responses.
7. Core page/data flows
- The main user flow appears to be:
- browse content in Discover
- inspect options in Screenings or ScreeningDetail
- perform a PrivateBooking
- view owned items in MyTickets
- A second flow centers on Voting and perhaps “campaign” creation/management via the dashboard.
- CinemaDashboardPage likely aggregates key status widgets, while VotingPage handles participation and animated feedback.
8. Reusable feature components
- CampaignCard, MovieCard, StateBadge, ProgressBar, CountdownTimer, and VoteAnimation are domain-specific presentation components reused across pages.
- CreateCampaignModal and CampaignCreatedSuccessModal indicate a modal-driven create/confirm interaction flow.
- These components are the main building blocks that encode the app’s cinema/voting domain UI.
9. Modal and interaction subsystem
- Modal.tsx and Modals.tsx provide a centralized modal pattern.
- The specific modal components suggest the app uses dialogs for creating campaigns and confirming success rather than navigating to dedicated pages for those actions.
- This is an important architectural boundary: some interactions are overlay workflows, not route transitions.
10. Shared UI kit
- src/app/components/ui/* is a large reusable UI layer, very likely generated from or inspired by shadcn/ui + Radix primitives.
- It includes standard controls like button, dialog, sheet, tabs, select, tooltip, table, etc.
- These components form the app’s design system boundary: feature components compose these primitives rather than styling everything ad hoc.
11. Styling and visual system
- src/styles/fonts.css, index.css, tailwind.css, and theme.css define the visual foundation.
- postcss.config.mjs and the tailwind files show the app is styled with Tailwind CSS, with custom theme/font layering.
- Logo.tsx and LogoIcon.tsx are part of the branded shell rather than business logic.
12. Hooks and small utilities
- useCountdown.ts encapsulates timer behavior for time-sensitive UI such as screenings, campaigns, or voting deadlines.
- utils/prefetch.ts indicates some navigation/resource preloading optimization, but still within the client-only architecture.
- ui/use-mobile.ts suggests responsive behavior is abstracted into a small reusable hook.
13. Figma-to-code provenance
- The presence of src/imports/pasted_text/kinora-product-brief.md and src/app/components/figma/ImageWithFallback.tsx suggests this repo was produced from a design-to-code workflow based on a Figma source.
- That helps explain the strong separation between generic UI primitives and higher-level feature components.
14. How to diagram it
- Draw the app as a browser SPA with one top-level shell.
- From the shell, branch into route pages.
- Show a shared AppContext feeding those pages.
- Show mockData/types feeding the context and pages.
- Show feature components and UI primitives beneath the pages.
- Keep external systems minimal: there is no visible backend, only the browser runtime and local UI state.
Main entry points: routes.tsx Routes · CinemaDashboardPage.tsx Cinema Dashboard · AppContext.tsx App Context · mockData.ts Mock Data
Components 34
App Shell
Bootstrap, layout, and route orchestration
- App · Top-level application composition
src/app/App.tsx - Routes · Central route map for the SPA
src/app/routes.tsx - Root Layout · Application chrome around routed content
src/app/components/RootLayout.tsx - Layout · Shared page layout wrapper
src/app/components/Layout.tsx - Scroll Top · Resets scroll on route changes
src/app/components/ScrollToTop.tsx
State & Data
Shared context and static domain data
- App Context · Shared client-side application state
src/app/context/AppContext.tsx - Domain Types · Core cinema domain entities
src/app/data/types.ts - Mock Data · Static demo dataset used by the app
src/app/data/mockData.ts
Route Pages
Primary screens exposed by routing
- Discover · Browse and explore content
src/app/pages/DiscoverPage.tsx - Screenings · Listing of available screenings
src/app/pages/ScreeningsPage.tsx - Screening Detail · Single screening detail view
src/app/pages/ScreeningDetailPage.tsx - Private Booking · Booking workflow for private sessions
src/app/pages/PrivateBookingPage.tsx - Voting · Participation and voting flow
src/app/pages/VotingPage.tsx - My Tickets · Owned tickets and saved items
src/app/pages/MyTicketsPage.tsx - Cinema Dashboard · Aggregated status and management view
src/app/pages/CinemaDashboardPage.tsx
Feature Components
Domain-specific reusable UI
- Campaign Card · Campaign summary presentation
src/app/components/CampaignCard.tsx - Movie Card · Movie summary presentation
src/app/components/MovieCard.tsx - State Badge · Compact status indicator
src/app/components/StateBadge.tsx - Countdown Timer · Time-based display for deadlines
src/app/components/CountdownTimer.tsx - Progress Bar · Progress and completion visualization
src/app/components/ProgressBar.tsx - Vote Animation · Animated voting feedback
src/app/components/VoteAnimation.tsx - Modal · Shared dialog wrapper
src/app/components/Modal.tsx - Modals · Centralized modal composition
src/app/components/Modals.tsx - Create Campaign · Campaign creation dialog
src/app/components/CreateCampaignModal.tsx - Success Modal · Campaign creation confirmation dialog
src/app/components/CampaignCreatedSuccessModal.tsx
UI Kit
Reusable primitive component layer
- Button · Core action control
src/app/components/ui/button.tsx - Dialog · Base dialog primitive
src/app/components/ui/dialog.tsx - Card · Content container primitive
src/app/components/ui/card.tsx - Tabs · Tab navigation primitive
src/app/components/ui/tabs.tsx - Table · Tabular data presentation
src/app/components/ui/table.tsx - Select · Dropdown selection primitive
src/app/components/ui/select.tsx - Progress · Generic progress indicator
src/app/components/ui/progress.tsx - Tooltip · Hover help primitive
src/app/components/ui/tooltip.tsx
Connections 47
- Main → App: mounts · Browser entry point mounts the application shell
- App → Routes: uses · App delegates screen selection to router
- App → Root Layout: wraps · Top-level layout chrome surrounds routed content
- Root Layout → Layout: composes · Root layout is built from shared layout wrapper
- Routes → Discover: routes to · Route map exposes discover screen
- Routes → Screenings: routes to · Route map exposes screenings screen
- Routes → Screening Detail: routes to · Route map exposes screening detail screen
- Routes → Private Booking: routes to · Route map exposes private booking screen
- Routes → Voting: routes to · Route map exposes voting screen
- Routes → My Tickets: routes to · Route map exposes tickets screen
- Routes → Cinema Dashboard: routes to · Route map exposes dashboard screen
- Routes → Scroll Top: includes · Route transitions reset scroll position
- App Context → Discover: feeds · Shared state informs discovery interactions
- App Context → Screenings: feeds · Shared state informs screening listings
- App Context → Screening Detail: feeds · Shared state informs detail view
- App Context → Private Booking: feeds · Shared state drives booking workflow
- App Context → Voting: feeds · Shared state drives voting flow
- App Context → My Tickets: feeds · Shared state informs owned tickets view
- App Context → Cinema Dashboard: feeds · Shared state informs dashboard aggregates
- Domain Types → Mock Data: shapes · Domain types define the mock dataset structure
- Mock Data → App Context: seeds · Static dataset initializes shared app state
- Mock Data → Discover: provides · Discovery screen renders mock content
- Mock Data → Screenings: provides · Screening listings are populated from mock data
- Mock Data → Screening Detail: provides · Detail page reads from mock data
- Movie Card → Discover: used by · Movie presentation appears in browse flows
- Movie Card → Screenings: used by · Movie presentation appears in screening listings
- Campaign Card → Cinema Dashboard: used by · Campaign summaries appear in dashboard views
- State Badge → Cinema Dashboard: used by · Dashboard uses compact status indicators
- State Badge → My Tickets: used by · Tickets view uses status badges
- Countdown Timer → Voting: used by · Voting page shows time-sensitive countdowns
- Countdown Timer → Cinema Dashboard: used by · Dashboard shows deadline timing
- Progress Bar → Cinema Dashboard: used by · Dashboard visualizes progress metrics
- Vote Animation → Voting: used by · Voting page displays animated feedback
- Modals → Modal: orchestrates · Modal subsystem centralizes overlay composition
- Create Campaign → Modals: included in · Campaign creation dialog is managed by modal layer
- Success Modal → Modals: included in · Success confirmation dialog is managed by modal layer
- Create Campaign → Cinema Dashboard: used by · Dashboard can open campaign creation flow
- Success Modal → Cinema Dashboard: used by · Dashboard can confirm creation success
- Button → Modal: supports · Shared UI primitives underpin dialog actions
- Dialog → Modal: supports · Shared dialog primitive underlies modal wrapper
- Card → Campaign Card: supports · Feature cards are built on base card primitive
- Card → Movie Card: supports · Movie cards are built on base card primitive
- Tabs → Screenings: supports · Screenings page uses tabbed navigation
- Table → Cinema Dashboard: supports · Dashboard may render tabular summaries
- Select → Private Booking: supports · Booking flow uses selection controls
- Progress → Progress Bar: supports · Feature progress uses base progress primitive
- Tooltip → Cinema Dashboard: supports · Dashboard uses hover help and hints