How gayatriagarwal19/lumyst-assignment works
Project type and purpose
• There is no separate “backend” or API route folder, so the project is purely a frontend SPA/SSR application that loads and visualizes graph-style data.
File structure
• Top-level:
· app/ – Next.js 13 “app router” directory holding server and client components (layout.tsx, page.tsx)
· components/ – React UI pieces: custom React-Flow nodes, shared UI primitives (buttons, etc.)
· core/ – Business-logic layer: JSON data, converters, graph-format and react-flow services, TypeScript types
· lib/ – Utility functions (utils.ts)
· config files (.eslintrc, tsconfig, postcss.config, next.config)
• Directory patterns indicate a clear separation of:
· Presentation (components + app pages)
· Domain logic (core/services + data)
· Utilities (lib)
(empty) README for insights
a. Main components:
• Next.js Application (app/) – routes, server + client components
• UI Layer (components/) – React-Flow nodes, UI primitives
• Core Services (core/) –
– Data Converter (data-converter.ts)
– Graph Format Service (graph-format.service.ts)
– React Flow Service (react-flow.service.ts)
• Data Sources (core/data/) – JSON files (analysis.json, analysis-with-code.json)
• Utility Library (lib/utils.ts)
• External Frameworks – React, Next.js, Tailwind/PostCSS
b. Relationships & interactions:
• The Next.js pages under app/ import components/ to build the UI.
• UI components invoke core/services to load/convert JSON data into graph structures.
• Utilities in lib/ are used by both components and core services for helper routines (e.g., formatting).
c. Architectural patterns/design principles:
• Separation of concerns: UI vs. domain logic vs. data vs. utilities
• Layered architecture: Presentation → Services → Data
• Component-based React design with service abstraction
d. Technologies/frameworks:
• Next.js 13 (app router)
• React + React Flow (visual graph rendering)
• TypeScript for typings under core/types/index.ts
• PostCSS/Tailwind CSS (globals.css, postcss.config.mjs)
• ESLint, pnpm