Skip to content

Conversation

@serafim-san
Copy link
Contributor

@serafim-san serafim-san commented Dec 22, 2025

Description

This PR introduces a major architectural refactor to improve project scalability, developer experience (DX), and type safety.

Key Changes

1. Dynamic Sidebar & Navigation

  • Removed hardcoded navigation logic. The sidebar is now auto-generated based on the folder hierarchy in src/content/docs.
  • Source: Nested folders (e.g., docs/getting-started/intro.md) provide logical grouping for the sidebar.
  • Output: Flat URLs (e.g., /intro) are preserved to maintain SEO and backward compatibility.

2. Routing Safety Mechanism

  • Implemented Build-Time Validation to prevent slug collisions.
  • Since the routing flattens the directory structure, the build will now fail explicitly if two files from different folders claim the same URL, ensuring production safety.

**3. Modular Architecture Restructured the codebase to ensure better separation of concerns and modularity:

src/modules/ - encapsulated domain logic (Navigation engine, Docs processing).

src/components/features/ - feature-specific components (e.g., Search).

src/components/layout/, ui/ & shared/ - reusable UI and structural components.

src/config/ - centralized project configuration (Navigation, SEO, Products).

4. TypeScript Coverage

5. Content Configuration (Frontmatter)

Introduced new schema to control sidebar

sidebar: z.object({
  label: z.string().optional(),
  order: z.number().default(999),
  hidden: z.boolean().default(false),
}).default({}),

Example of usage:

---
title: "Introduction to Santiment"
description: "Brief overview"
sidebar:
  label: "Intro"
  order: 1
---

Consistency check

❌ /404/ -- astro has a different page
❌ /email_login/ -- no longer supported
❌ /login/email/ -- no longer supported
❌ /login/email_login/ -- no longer supported
❌ /login/ -- no longer supported
➕ /education-and-use-cases/understanding-daily-active-addresses/ -- fixed mistype, added redirect for version with typo (understaning instead of understanDing)

@serafim-san serafim-san force-pushed the refactor/file-structure branch from db05f79 to d29482c Compare December 22, 2025 10:48
@serafim-san serafim-san changed the title Refactor/file structure refactor(core): Migrate to FSD structure & implement dynamic navigation Dec 22, 2025
@serafim-san serafim-san force-pushed the refactor/file-structure branch from d9e6a47 to 7dbc6a2 Compare December 23, 2025 00:32
@serafim-san serafim-san force-pushed the refactor/file-structure branch from 7dbc6a2 to 83d2b53 Compare December 23, 2025 00:48
@serafim-san serafim-san changed the title refactor(core): Migrate to FSD structure & implement dynamic navigation refactor(core): Implement dynamic navigation Dec 23, 2025
@serafim-san serafim-san force-pushed the refactor/file-structure branch from 479b80d to b3f6095 Compare December 25, 2025 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants