How maheesh09/kapruka-flow works
1. Overall shape
- This is a Next.js App Router project written in plain JavaScript.
- The architecture is mostly a single-page UI experience with one backend endpoint, rather than a multi-service application.
2. Top-level app composition
- app/layout.js provides the global document shell and shared app wrapper.
- app/page.js is the main entry point for the experience and likely assembles the visible sections on the home route.
3. Presentation subsystem
- Most of the product logic appears to live in app/components/.
- The component set suggests a dashboard/flow visualization UI with distinct visual modules: FlowArea, FlowOrb, OpeningCanvas, PlanBoard, OrderStageCard, TrackingCard, and LockedCard.
4. UI structure and boundaries
- Header.js likely anchors the top-level navigation or brand area.
- The card components imply separate UI panels for different states or stages of a process, while LockedCard represents restricted or gated content.
- Icon.js is a shared visual primitive used across the UI.
5. Interactive/animated visual layer
- Components like FlowArea, FlowOrb, and OpeningCanvas indicate a highly visual, possibly animated front-end.
- These are probably used to render the “flow” metaphor and any motion-heavy hero or interaction area.
6. Backend/API boundary
- app/api/chat/route.js is the only explicit server-side endpoint in the tree.
- This is a clear boundary between the client-side interface and a chat-style backend interaction, likely used for assistant/help/conversational features.
7. Data flow
- User loads the page → Next.js renders layout + page → page composes the component tree.
- UI interactions can call /api/chat for server-backed responses.
- The API response then feeds back into the client UI, likely inside a chat or guided-flow surface.
8. Styling system
- app/globals.css provides application-wide styles.
- app/page.module.css suggests route-scoped styling for the main page, keeping page-specific layout isolated from shared styling.
9. Localization / text management
- app/i18n.js indicates a centralized internationalization or copy-management layer.
- If the app supports multiple languages or localized labels, this file is the likely coordination point for that content.
10. Static assets
- public/ is the static asset boundary for images, icons, and other files served directly by Next.js.
- These assets likely support the visual-heavy components and branding.
11. Project tooling and constraints
- next.config.mjs, eslint.config.mjs, and jsconfig.json show standard Next.js build/lint/editor support.
- There is no sign of a separate database layer, message queue, or external service wrapper in the repository structure.
12. Architecture summary
- In diagram form, this repo is best represented as:
- Browser UI
- Next.js app shell and page composition
- Shared visual components
- Single chat API route
- Static assets/styles
- The dominant architecture is frontend-first, with one small server boundary for chat interaction.
Main entry points: page.js Home page · Icon.js Icon · OpeningCanvas.js Opening canvas · layout.js App shell
Components 16
Next.js app
App Router shell, route entry, styles, and copy coordination.
- App shell · Global document wrapper and shared app chrome.
app/layout.js - Home page · Main entry point that assembles the visible experience.
app/page.js - Global styles · Application-wide styling boundary.
app/globals.css - Page styles · Route-scoped styles for the home page.
app/page.module.css - Copy layer · Centralized text and localization coordination.
app/i18n.js
UI components
Shared visual and staged interface pieces for the main experience.
- Header · Top-level brand or navigation area.
app/components/Header.js - Flow area · Primary flow-oriented content region.
app/components/FlowArea.js - Flow orb · Motion-heavy visual accent used in the flow experience.
app/components/FlowOrb.js - Opening canvas · Introductory animated or illustrated surface.
app/components/OpeningCanvas.js - Plan board · Board-like panel for organized process steps.
app/components/PlanBoard.js - Order card · Card representing an order or progression stage.
app/components/OrderStageCard.js - Tracking card · Card for tracking or progress status.
app/components/TrackingCard.js - Locked card · Restricted or unavailable content panel.
app/components/LockedCard.js - Icon · Reusable icon primitive shared across the UI.
app/components/Icon.js
Server boundary
Single backend route for chat-style interaction.
- Chat API · Single server endpoint for chat-style responses.
app/api/chat/route.js
Static assets
Public files served directly by Next.js.
- Public assets · Directly served images and brand assets.
public
Connections 22
- App shell → Home page: wraps · The app shell provides the shared document structure for the home route.
- App shell → Global styles: loads · Global styles are applied through the top-level shell.
- Home page → Header: renders · The home route includes the header surface.
- Home page → Flow area: renders · Main page composition centers on the flow experience.
- Home page → Opening canvas: renders · The entry route includes the introductory visual layer.
- Home page → Plan board: renders · The route assembles the planning or workflow board.
- Home page → Order card: renders · Stage card content is part of the main composition.
- Home page → Tracking card: renders · Progress tracking UI is composed on the home route.
- Home page → Locked card: renders · Gated content is surfaced as part of the experience.
- Flow area → Flow orb: uses · The flow stage likely includes animated orb elements.
- Opening canvas → Flow orb: uses · The hero canvas shares the same motion/visual primitive.
- Header → Icon: uses · Header presentation likely relies on shared icons.
- Plan board → Icon: uses · Board UI likely uses icons for status and actions.
- Order card → Icon: uses · Stage cards use the shared icon primitive.
- Tracking card → Icon: uses · Tracking UI uses the shared icon primitive.
- Locked card → Icon: uses · Locked state presentation uses the shared icon primitive.
- Home page → Copy layer: reads copy · The route likely pulls labels and text from the copy layer.
- Home page → Page styles: styles · Route-specific layout and presentation are scoped here.
- Home page → Chat API: calls · Client interactions can send requests to the chat endpoint.
- Chat API → Copy layer: may use · Server responses may align with centralized text or prompts.
- Home page → Public assets: serves assets · The UI can draw branding and imagery from static assets.
- Opening canvas → Public assets: uses assets · Visual-heavy components likely depend on static media.