How prince-chhirolya/dsa_platform works
1. This repository is a static, client-rendered study guide site built with Vite + React. It does not appear to have a backend or database; the whole product is assembled from Markdown content plus client-side navigation and search.
2. The core domain boundary is the DSA content library. Topic-level Markdown files live under content/ and mirror the major interview-prep areas in the README: arrays, binary search, DP, graphs, greedy, heaps, range queries, stacks/queues, tries, and two-pointers/sliding-window. These files are the primary source of truth for the learning material.
3. There is a second content copy under public/content/ and a generated output under dist/content/. That suggests a publish/build flow where authored Markdown is prepared for static serving, then emitted into the production bundle. The app is therefore content-driven rather than code-driven.
4. The app shell lives in src/App.jsx, with global styling in src/App.css and src/index.css, and the entrypoint in src/main.jsx. The UI is organized around a home page, a markdown-reading page, sidebar navigation, a topbar search trigger, and a search palette. This implies a single-page app with route-like view switching handled on the client.
5. Markdown rendering is a distinct subsystem. src/lib/markdownParse.js likely converts the topic files into renderable page structure, while src/components/MarkdownPage.jsx is the presentation layer for article pages. The architecture separates content parsing from the UI components that display it.
6. Search is a major feature and has its own boundary. scripts/buildSearchIndex.mjs likely precomputes a search corpus from the Markdown content, while src/search/useSearchIndex.js, parseQuery.js, highlight.jsx, and useRecentSearches.js implement the client-side search experience. That means search is built mostly at compile time, then consumed interactively in the browser.
7. There is a content-metadata/indexing layer at build time. vite-plugins/content-index.js and scripts/addFrontmatter.mjs indicate the repository generates or enriches frontmatter/index data from the Markdown files, so the app can list topics, subtopics, and searchable metadata without manual duplication.
8. The src/conceptMaps.js file and src/concepts_maps/ directory form another data subsystem. These files likely encode structured relationships between patterns, such as topic maps or cross-topic concept graphs, which support the “pattern-first” organization described in the README.
9. src/topics.js is the topic registry layer. It likely defines the canonical ordering and display names for the ten main sections, acting as the bridge between the content files and the navigation/sidebar UI.
10. The repository has a clear authoring-to-runtime pipeline:
- source Markdown in content/
- build-time augmentation/indexing via scripts and the Vite plugin
- generated static assets in dist/
- client app in src/ rendering pages and search from prebuilt content/index data.
11. The README.md is not just documentation; it is effectively the product manifest. It defines the repository’s information architecture: topic taxonomy, study phases, cross-topic reuse, and the intended learning flow. That structure is reflected in the content organization and likely in the sidebar and search UI.
12. For an architecture diagram, the key boundaries are: content authoring, build-time content processing, client-side rendering, and client-side search. The only external dependency that materially matters is the static build toolchain itself; everything else is local file-based data flow.
Main entry points: App.jsx App shell · arrays.md Topic markdown · useSearchIndex.js Search index · MarkdownPage.jsx Article page
Components 20
Content authoring
Source Markdown and reusable study material.
- README · Defines the study guide taxonomy, learning flow, and content organization.
README.md - Topic markdown · Primary DSA lessons authored as Markdown topic files.
content/arrays.md - Snippet notes · Topic-specific supporting notes and code snippets.
content/arrays_snippets.md
Build pipeline
Static generation and indexing steps that prepare content for the browser.
- Published content · Publicly served Markdown copy used by the built site.
public/content/README.md - Build output · Production Markdown assets emitted into the static bundle.
dist/content/arrays.md - Frontmatter pass · Enriches Markdown with metadata for listing and navigation.
scripts/addFrontmatter.mjs - Content index · Build-time indexing layer that exposes content metadata to the app.
vite-plugins/content-index.js - Search build · Precomputes the searchable corpus from Markdown content.
scripts/buildSearchIndex.mjs
Client app
React SPA shell and reading/navigation UI.
- App shell · Top-level React application that coordinates views and layout.
src/App.jsx - Bootstrap · Client entry module that mounts the React app.
src/main.jsx - Home page · Landing view for browsing the study guide.
src/components/HomePage.jsx - Article page · Renders topic Markdown as the main reading experience.
src/components/MarkdownPage.jsx - Sidebar · Primary topic navigation across the content library.
src/components/Sidebar.jsx - Search trigger · Topbar affordance that opens the search palette.
src/components/TopbarSearchTrigger.jsx - Topic registry · Canonical topic order and display names for the study guide.
src/topics.js
Search
Client-side search experience backed by a prebuilt index.
- Search palette · Overlay for interactive topic search and quick navigation.
src/components/SearchPalette.jsx - Search index · Loads and queries the prebuilt search index in the browser.
src/search/useSearchIndex.js - Query tools · Query parsing, highlighting, and recent-search utilities.
src/search/parseQuery.js
Concept maps
Structured cross-topic knowledge maps.
- Concept maps · Cross-topic pattern maps and conceptual links.
src/conceptMaps.js - DP map · Dynamic programming relationship map and pattern organization.
src/concepts_maps/dynamicProgramming.js
Connections 22
- README → Topic markdown: defines · The README establishes the topic taxonomy reflected by the authored Markdown files.
- Topic markdown → Snippet notes: augmented by · Main lessons are paired with supporting snippet pages.
- Topic markdown → Frontmatter pass: processed by · Source Markdown is enriched with metadata during build preparation.
- Frontmatter pass → Content index: feeds · Generated metadata is exposed through the content index plugin.
- Content index → Published content: publishes · Indexed content is prepared for static serving under public assets.
- Published content → Build output: bundled into · Public content is emitted into the final static build output.
- Topic markdown → Search build: indexed by · The search build scans authored Markdown to create the corpus.
- Search build → Search index: consumed by · The browser search hook queries the prebuilt search index.
- App shell → Bootstrap: mounted by · The app shell is started from the React entry module.
- App shell → Home page: shows · The shell can render the landing view.
- App shell → Article page: shows · The shell can render the reader view.
- App shell → Sidebar: navigates · The shell coordinates topic navigation through the sidebar.
- App shell → Search trigger: opens · The shell exposes search from the top bar.
- Search trigger → Search palette: launches · The trigger opens the search overlay.
- Search palette → Search index: queries · The palette uses the client search index for results.
- Search index → Query tools: uses · Search execution relies on query parsing, highlighting, and recents.
- Sidebar → Topic registry: driven by · Navigation order and labels come from the topic registry.
- Article page → Topic markdown: renders · Reader views are generated from the authored Markdown content.
- Article page → Search index: cross-links · Reading experience can surface search-driven discovery.
- Concept maps → DP map: specializes · Topic-specific concept maps define structured relationships within the library.
- Sidebar → Concept maps: references · Navigation can surface cross-topic conceptual organization.
- Home page → Topic registry: summarizes · The landing page presents the main topic structure.