This repository is a static-site source workspace. The build pipeline assembles source content into deployable runtime files under public/.
- Site root:
/ - Roadmap hub:
/roadmap/ - Projects:
/projects/ - Community:
/community/
/assets # Shared CSS, JS, fonts, images
/roadmap # Roadmap source pages and topic content
/projects # Standalone project source pages
/community # Community source pages and assets
/layouts # Shared HTML wrappers/fragments
/public # Generated deploy/runtime output
/manual # Developer docs and generated reports
/database # Supabase SQL setup scripts
/scripts # Local tooling (Node, Python)
build.js # Main build orchestrator
run.sh # Project maintenance CLI wrapper
vercel.json # Hosting config
The run.sh script provides a unified command-line interface for managing the local environment, build process, and git workflows.
./run.sh [command] [options]clean: Cleans build artifacts (npm run clean).build: Builds the static website (npm run build).test: Runs local validation tests (npm run test:local).commit: Stages all changes and commits. Usage:run commit "your message"(or userunalias if configured).-h, --help: Displays usage documentation.
Note: For convenience, an alias run is configured in ~/.bashrc pointing to ./run.sh.
- Shared authoring templates live only in
assets/. - Canonical shared templates are
assets/roadmap_template.htmlandassets/topic_template.html. - Do not keep
template.htmlfiles inside individualroadmap/<track>/folders. - Roadmap track pages should use concrete source pages (
index.html, topic pages, and optionaltopic.html) instead of per-track template files.
npm run build runs node build.js and performs the following:
- Generates roadmap index metadata via
roadmap.py. - Recreates
public/from scratch. - Copies
assets/topublic/assets/. - Writes runtime Supabase config to
public/assets/js/supabase-config.jsfrom env vars when available (otherwise copies the source config file). - Copies root runtime files (
robots.txt,sitemap.xml) topublic/. - Copies source content into publish namespaces:
projects/**->public/projects/**community/**->public/community/**roadmap/**(including top-level auth pages and track folders) ->public/roadmap/**
- Builds top-level root pages (
*.html) intopublic/*.html. - Optimizes all published HTML files:
- injects shared header/footer from
layouts/ - injects static sidebar structures for roadmap topics
- injects roadmap runtime scripts for progress/auth where needed
- rewrites legacy route prefixes to current canonical routes
- rewrites and normalizes asset paths
- externalizes executable inline scripts to
public/assets/js/inline/*.js
- injects shared header/footer from
- Writes build metadata to
manual/build-manifest.json.
- Root pages:
public/*.htmlfrom repository-root*.html. - Roadmap landing:
public/roadmap/index.htmlfromroadmap/index.html. - Roadmap auth/profile pages:
public/roadmap/login.html,public/roadmap/register.html,public/roadmap/profile.html,public/roadmap/reset-password.html,public/roadmap/unregister.html. - Roadmap tracks/topics:
public/roadmap/<track>/**. - Project pages:
public/projects/**. - Community pages:
public/community/**.
- Topic links in roadmap index tables must use absolute static routes:
/roadmap/<track>/<topic>.html. - Track roots should use trailing slash canonical routes:
/roadmap/<track>/. - Do not author legacy top-level route prefixes (
/cse/,/csp/,/pro/); the build has compatibility rewrites, but source should stay canonical.
- Shared runtime scripts live in
assets/js/. - Topic/runtime script injection is handled by
build.js; source pages should not duplicate injected stacks unless required. - Executable inline scripts in authored HTML are extracted at build time into
public/assets/js/inline/.
- Browser config source:
assets/js/supabase-config.js. - Runtime client stack:
assets/js/supabase-client.js,assets/js/roadmap-state.js,assets/js/roadmap-progress-sync.js. - SQL scripts:
database/001_user_profiles.sqldatabase/002_roadmap_progress.sqldatabase/003_delete_own_roadmap_account.sqldatabase/004_roadmap_favorites.sql
Build-time env support:
NEXT_PUBLIC_SUPABASE_URLorSUPABASE_URLNEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEYorNEXT_PUBLIC_SUPABASE_ANON_KEYorSUPABASE_ANON_KEYSUPABASE_SCHEMA(optional, defaultpublic)
- Use
run cleanandrun build(or via./run.sh). - Run
run test(wrapsnpm run test:local). - Verify generated output under
public/.
manual/ARCHITECTURE.mdis the canonical architecture reference.manual/PROJECTS-ARCHITECTURE.mddefines the shared topic-page contract for/projects/*namespaces.
We utilize a Dynamic Language Loading strategy for syntax highlighting to ensure optimal performance as our roadmap expands.
- Core Assets: The core Prism engine (
assets/prism.js) and base styles (assets/prism.css) are loaded globally. - Dynamic Language Loading:
- Language-specific components are stored in
assets/js/prism/(e.g.,prism-dart.min.js). - Pages specify the primary language via a
data-langattribute on the<body>element. - The
assets/js/prism-loader.jsscript detects this attribute and asynchronously loads the required language component on page load.
- Language-specific components are stored in
- Adding New Languages:
- Download the required Prism component file (e.g.,
prism-zig.min.js) from the official Prism repository or CDN. - Place the file in
assets/js/prism/. - Add
data-lang="<lang>"to the body of the roadmap pages using that language.
- Download the required Prism component file (e.g.,
- Benefits:
- Performance: Minimizes initial page weight by only loading necessary language syntax.
- Scalability: Decouples language support from the global core, allowing unlimited expansion without performance degradation.
Every roadmap track should include a standard "Demo Example" page (demo_examples.html) to facilitate hands-on learning.
-
Standard Lab Template: The page must utilize the canonical lab topic layout, which includes the shared header/footer, study sidebar (
#study-sidebar), and a main content area. -
window.TOPIC_CONFIG: Each demo page must define theTOPIC_CONFIGobject, setting thetopicIdtodemo_examplesandlabIdto the appropriate track ID (e.g.,dart). -
Integration:
- The page serves as a lab topic.
- Sidebar topics are populated via the standard
topic-loader.js.
-
Code Viewer Reference:
- Use the unified
roadmap/code-viewer.htmlfor viewing source code. - Link structure:
/roadmap/code-viewer.html?file=/roadmap/<track>/demo/<filename>.ext
- Use the unified
-
Formatting:
- Use standard tables to list examples by category.
- Ensure all examples are runnable, documented with comments, and follow the consistent code structure defined in the lab topic.
-
Language Support:
- Verify that the global
prism.jsincludes the necessary language highlighting for the roadmap track. If not, the globalprism.js(and CSS) will be updated centrally.
- Verify that the global
-
manual/build-manifest.jsonandmanual/migration-status.jsonare generated reports.