How jakub-studio/website works
Main components of the system
• Content Management: All markdown content and copy is located in src/content (blog posts, project pages, legal pages, etc.). This represents the dynamic/static content that is rendered.
• Markdoc Integration: Markdoc related modules under src/modules/markdown (both client and server) handle the conversion and rendering of markdown content.
• API Routes: The project features API endpoints under src/pages/api (e.g., the go-redirect-service) which handle backend operations such as routing shortcuts.
• Additional Modules: There are various modules such as:
• src/modules/fs – likely for file system handling,
• src/modules/images – organizing different image assets for projects,
• src/modules/mappings – mapping project categories and software links,
• src/modules/script-handler and src/modules/source-query-tracker which also encapsulate particular platform functionalities.
• Global Configuration: Next.js configuration (next.config.js, next-env.d.ts), tailwind configuration (tailwind.config.js), and various linting and formatting files that define project style.
Relationships and Interactions
• The Pages Layer (in src/pages) is responsible for handling routing. These pages use the layout (from src/components/Layout.tsx) to render common elements like Navbar and Footer.
• The Content Layer in src/content is the source of textual markdown content that is processed by Markdoc. Its processing logic is implemented in the markdown modules (in src/modules/markdown), which transform raw markdown into rendered React components.
• The API layer (under src/pages/api) provides auxiliary backend functionality, such as redirect services. These endpoints are invoked by certain components or client-side logic.
• The Frontend Components interact with utility modules (e.g., src/utils.ts) and configuration files to render interfaces that adapt to different screen sizes and support theming (e.g., via TailwindCSS and components like ThemePicker in the Footer).
• The image assets are managed through dedicated modules (src/modules/images) and reference actual images stored in src/content/_images.
Architectural Patterns and Key Technologies
• Next.js’s routing mechanism combined with its file-based pages structure.
• A component-driven architecture using React and modular design, which separates concerns (UI components, markdown processing, content management).
• Use of serverless/API routes to complement the static pages of a personal website.
• Use of specialized modules that encapsulate business logic (e.g., handling of storage consent, managing content queries, and handling source data mapping).
• Use of TailwindCSS for styling which affects the look and feel of grouped UI components and pages.
• Markdoc for markdown transformation, making use of both “server” and “client” modules to achieve proper rendering of markdown nodes and custom tags.