How anhsirk0/landslides works
Main Components
• Entry Point & Build Tools:
• Index.html that loads the app.
• Vite configuration (vite.config.js) alongside build integrations such as tailwind.config.cjs and postcss.config.cjs. These indicate how the styling (Tailwind CSS/DaisyUI) is applied.
• Application Core:
• Primary application within the src directory, notably App.res and Main.res, which form the core of the application.
• Pages & Routing:
• “src/pages” folder which contains individual landing pages (e.g., Home, Bluesky, Google, Linkedin, Netflix, Reddit, Spotify, Twitter, Youtube, and a specific ErrorPage). Each page (with a corresponding .res file) should be shown as a separate component, reflecting a routing-based design.
• Reusable Components & Shared Logic:
• Under “src/components” and “src/shared”, show the encapsulated reusable UI components (ThemeCard.res, ThemeList.res, OptionsFab.res) and shared utilities, type definitions, hooks, and routing (Route.res) that are used across the application.
• Assets:
Relationships & Interactions
• That components under “src/components” and utilities in “src/shared” are imported and used within different pages.
• That the build tools (Vite, Tailwind, DaisyUI) are globally affecting the application through processing and bundling.
Architectural Patterns & Design Principles
• Modular Structure: Illustrate the modular decomposition where each “page” is a self-contained view.
• Reusability: Show how “shared” modules and “components” are designed for reusability and maintainability.
• Configuration-Driven Styling: Include how Tailwind and DaisyUI (indicated via tailwind.config.cjs and resources in the README) impact the UI.
• Separation of Concerns: Separate the presentation (React/ReScript pages, components) from the static assets and configuration.
Technologies & Tools
• ReScript is used for writing the application logic and UI components.
• Vite acts as the build and development server, while Node (and pnpm) manage dependencies.
• Tailwind CSS (and DaisyUI) is used for styling.
• The project structure supports a clear routing mechanism and modular design, making it ideal for a single-page application with multiple landing pages.