How mandipadk/evoloke works
Project Type and Purpose
• Evoloke is a full-stack, interactive web application that leverages the Next.js framework for both server-side rendering and client-side interactivity.
• It focuses on delivering immersive storytelling experiences featuring branching narratives, visual story flows, and responsive design with dark/light mode support.
• The project contains both a user-facing interface (for reading and interacting with stories) and an admin interface (for managing stories).
Main Components & Their Roles
a. User-Facing Frontend (Story Display):
• Represented by the files in the src/app/story and src/app/stories directories.
• Includes pages (page.tsx for landing and individual story display) that manage the interactive display of story content.
• Leverages reusable UI components (in src/components and src/components/ui) e.g., for navigation, theming, and story flow visualization.
b. Administrative Frontend (Story Management):
• Located under src/app/admin and its subdirectories, such as the stories folder with [id] pages.
• Supports story management tasks like creation, editing, or previewing of interactive stories.
c. Data Layer (Story Content Storage):
• Found under src/data/stories, where story-specific data (JSON or script files) is stored.
• Although Evoloke currently uses static files for story data, this layer is crucial for feeding content into the application.
d. Shared Library and Utility Functions:
• The src/lib directory contains utilities (e.g., stories.ts, utils.ts) that likely handle data transformations or business logic around story flow and navigation.
• The src/types directory adds static type definitions which improve code robustness and clarity.
e. UI Components and Themes:
• The src/components directory includes common elements such as the navbar, story flow indicator, theme provider, and toggle.
• These components help maintain a consistent look, feel, and responsive behavior across the application.
f. Configuration and Static Assets:
• Next.js configurations (next.config.ts), ESLint, Tailwind, and PostCSS files which orchestrate the project build and styling setup.
• The public folder serves static assets like images (e.g., the screenshot for the digital whispers story).
Relationships and Interactions
• There is a clear separation of concerns: the presentation layer (Next.js pages and React components) interacts with the data layer (static story data) through shared libraries and utility functions.
• The administrative interface (admin pages) is segregated from the user-facing story pages, implying a design that controls based on user roles or access levels.
• The theme provider and UI components are injected across both aspects for a consistent user experience.
• Next.js internals manage the routing by file system, so pages under [id] directories imply dynamic content based on URL parameters.
Architectural Patterns and Design Principles
• Next.js File-Based Routing: Emphasize the convention of mapping directories (like app/story or app/admin) directly to URL routes.
• Component Reusability: Identify how UI components (like navbar, theme toggles, and story-flow components) are used across pages.
• Separation between Content and Presentation: Data stored in src/data/ is decoupled from UI rendering logic, following modular design principles.
• Responsive and Themed UI: Incorporate the theme provider and custom styling via Tailwind CSS as part of the presentation layer.