How anderrodsan/andr works
Main Components Identification
• Frontend Application: Represented by the NextJS framework, utilizing the new app router (see src/app) to handle different site routes (Home, About, Blog, Projects, and Bookmarks).
• MDX Content Layer: The content directory holds Markdown (MDX) files for the blog and project posts. This layer is processed via next-mdx-remote, enabling dynamic rendering of static MDX content.
• UI and Component Library: The src/components folder is full of sub-directories that group functionality (e.g., shared styling, UI components, animations using framer-motion, themed components, and more). This encapsulates design elements and interactive components.
• API Routes: Although the site is static, there is an API folder (src/app/api) that provides server-side functionalities (for example, generating OG images for social sharing).
• Database (Local Content): Instead of an external backend, "db" files in src/db (e.g., blog.ts, projects.ts) are likely used as in-memory or static JSON-like data sources for various parts of the site.
• Public Assets: The public folder contains static assets like images, SVGs, logos, and other static files that are loaded by the client.
Relationships and Interactions
• The NextJS App layer (routes under src/app) controls page rendering. Each page imports and composes various components from src/components to render content.
• The MDX files in the content directory are parsed and rendered into React components via next-mdx-remote, interfacing with custom MDX components (located in src/components/mdx).
• API routes (e.g., for OG images) interact with client requests and serve dynamically generated content.
• The UI component system (shared components, custom UI elements, animations) provides a consistent look and feel across the website, often interacting with theming and state management (e.g., using next-themes for dark mode toggling).
Architectural Patterns & Design Principles
• File-based Routing & Modular Component Design: The project leverages NextJS’s file-based routing (each page or API route is a file) and a modular design where components are reused in multiple areas.
• Responsive & Interactive Design: Use of RadixUI, ShadcnUI, and framer-motion components indicate a design that is not only functional but also interactive and responsive.
• Static Site Generation & MDX-based Content: By placing markdown content in the /content folder and using MDX, the project embraces a content-focused, development-friendly strategy.
Technologies, Frameworks, and Libraries (to include
• NextJS (React framework with app directory structure and file-based routing).
• TypeScript.
• TailwindCSS (for styling and responsive design).
• MDX / next-mdx-remote for processing markdown to React components.
• RadixUI & ShadcnUI for UI components.
• Framer-motion for animations.
• next-themes for dark/light mode support.