The JavaScript Engineering Knowledge System
A premium, structured knowledge platform built for real-world JavaScript engineers.
Learn, reference, build, integrate, and debug β all in one place.
π Live Site Β Β·Β π Content Pillars Β Β·Β π Getting Started Β Β·Β π Report Bug Β Β·Β β¨ Request Feature
"Built for builders. Engineered for clarity."
- Overview
- Content Pillars
- Features
- Tech Stack
- Project Structure
- Getting Started
- Available Scripts
- Testing
- Contributing
- Author
JSphere is a modern, full-featured JavaScript engineering knowledge platform designed for developers who want more than just documentation. It's a curated ecosystem of:
- π Structured learning paths β from beginner fundamentals to advanced patterns
- π API references β instantly searchable method signatures with examples
- π³ Production-ready recipes β real code patterns you can drop into any project
- π Integration guides β connect JavaScript with real-world services
- π Project walkthroughs β build complete apps from scratch
- π§ Discovery tools β explore libraries, glossaries, and comparisons
- π Debugging playbooks β break down errors and fix them fast
All wrapped in a beautiful, fast, accessible, and fully responsive UI β with dark mode, smart search, bookmarks, and reading progress tracking built in.
Whether you're a beginner learning closures or a senior engineer wiring up OAuth flows, JSphere meets you exactly where you are.
JSphere organizes all knowledge into 7 focused pillars, each designed for a specific engineering need:
| Pillar | Description | Topics Covered |
|---|---|---|
| π Learn | Structured lessons from basics to advanced | Fundamentals, Async, Advanced Patterns, Browser APIs |
| π Reference | Fast, searchable method-level documentation | Array, String & Object methods with signatures & examples |
| π³ Recipes | Production-ready implementation patterns | Debouncing, Pagination, File Upload, Infinite Scroll & more |
| π Integrations | Guides for external services & APIs | REST APIs, OAuth, Payments, Telegram, YouTube & more |
| π Projects | Full app walkthroughs from idea to code | CRUD App, Chat App, Notes, Analytics Dashboard & more |
| π§ Explore | Curated directories and discovery tools | Libraries, Tooling, Glossary, Comparisons |
| π Errors | Debugging guides and error breakdowns | Common Errors, API Errors, Async Bugs, DOM Issues |
- Full-text search with fuzzy matching and token-based relevance ranking
- Weighted scoring across titles, aliases, keywords, tags, and descriptions
- Results intelligently grouped by content type and ordered by relevance
- Keyboard shortcut:
βK/Ctrl+Kfor instant access anywhere
- Block-based content system: paragraphs, headings, code, lists, callouts, and tables
- Syntax-highlighted code blocks with language detection and line-level highlights
- Function signature tables, parameter docs, and return type info for Reference pages
- Prerequisites, learning goals, and practice exercises for Learn pages
- Breadcrumb trails for full context awareness at every level
- Previous / Next navigation to move through pillar content sequentially
- Auto-generated Table of Contents from page headings
- Responsive collapsible sidebar with section grouping
- Bookmarks β save any piece of content for later
- Recently Viewed β instantly revisit your reading history
- Continue Reading β resume exactly where you left off
- Search History β bring back any past search with one click
- HSL-based design tokens with unique accent colors per pillar
- Fully responsive layout optimized for mobile, tablet, and desktop
- Dark / Light mode with automatic system preference detection
- Custom typography: Inter for UI + JetBrains Mono / Fira Code for code
- Vite + SWC for sub-second builds and instant Hot Module Replacement
- Route-based code splitting via React Router lazy loading
- Metadata-driven content with auto-generated loaders for lean bundles
- Skeleton loading states for a smooth perceived performance experience
- Dynamic
<meta>tags per page via React Helmet Async - Structured content metadata: difficulty level, reading time, and related topics
- Clean, semantic URL structure:
/{pillar}/{category}/{slug}
JSphere is built on a modern, production-grade stack chosen for speed, scalability, and developer experience:
| Layer | Technology | Purpose |
|---|---|---|
| Framework | React 18 + TypeScript 5 | UI & type safety |
| Build Tool | Vite 5 + SWC | Ultra-fast builds & HMR |
| Styling | Tailwind CSS 3 | Utility-first styling with custom tokens |
| UI Components | shadcn/ui + Radix UI | Accessible, composable primitives |
| Routing | React Router v6 | Client-side routing with lazy loading |
| Data Fetching | TanStack Query v5 | Async state management |
| Forms | React Hook Form + Zod | Form handling & schema validation |
| Code Highlighting | Prism React Renderer | Syntax-highlighted code blocks |
| Charts | Recharts | Data visualization |
| Icons | Lucide React | Consistent icon system |
| Theming | next-themes | Dark/light mode |
| Unit Testing | Vitest + Testing Library | Fast unit & integration tests |
| E2E Testing | Playwright | End-to-end browser testing |
| Linting | ESLint 9 | Code quality enforcement |
jsphere/
βββ public/ # Static assets (favicon, robots.txt)
βββ scripts/
β βββ generate-content.mjs # Auto-generates content loaders & metadata
βββ src/
β βββ components/
β β βββ cards/ # Category & content card components
β β βββ code/ # Syntax-highlighted code block
β β βββ content/ # Content renderers, callouts, meta, skeletons
β β βββ layout/ # DocsLayout β the main page shell
β β βββ navigation/ # Navbar, Sidebar, Breadcrumbs, TOC, Prev/Next
β β βββ search/ # Search modal with fuzzy matching
β β βββ seo/ # SEO & Open Graph meta tag components
β β βββ shared/ # ThemeToggle, NavLink & shared utilities
β β βββ ui/ # shadcn/ui component primitives
β βββ config/
β β βββ categories.ts # Pillar definitions & accent colors
β β βββ navigation.ts # Sidebar navigation tree
β β βββ site.ts # Global site metadata
β βββ content/
β β βββ learn/ # Lesson content (fundamentals, async, advanced, browser)
β β βββ reference/ # API reference docs (array, string, object)
β β βββ recipes/ # Code recipes & production patterns
β β βββ integrations/ # External service integration guides
β β βββ projects/ # Full project walkthroughs
β β βββ explore/ # Libraries, glossary, tooling, comparisons
β β βββ errors/ # Debugging guides & error breakdowns
β β βββ generated/ # Auto-generated loaders & metadata (do not edit)
β β βββ registry.ts # Central content registry
β βββ features/ # Feature-level page components per pillar
β βββ hooks/ # Custom React hooks (search, reading progress, library)
β βββ lib/ # Core utilities (content, search, navigation)
β βββ pages/ # Route-level page entry points
β βββ tests/ # Unit tests (Vitest + Testing Library)
β βββ types/ # Shared TypeScript type definitions
β βββ main.tsx # Application entry point
βββ tests/ # Playwright E2E test specs
βββ vite.config.ts
βββ tailwind.config.ts
βββ playwright.config.ts
βββ vitest.config.ts
Make sure you have the following installed before you begin:
# 1. Clone the repository
git clone https://github.com/your-username/jsphere.git
cd jsphere
# 2. Install dependencies
bun install
# or: npm install
# 3. Start the development server
# (content metadata is auto-generated before dev starts)
bun run dev
# or: npm run devThe app will be running at http://localhost:8080 π
Content metadata is automatically generated before dev, build, and test commands. To run it manually:
bun run generate:content
# or: npm run generate:content| Command | Description |
|---|---|
bun run dev |
Start the local dev server on port 8080 with HMR |
bun run build |
Build the app for production |
bun run build:dev |
Build in development mode (unminified) |
bun run preview |
Preview the production build locally |
bun run generate:content |
Generate content metadata & dynamic loaders |
bun run lint |
Run ESLint across the entire codebase |
bun run test |
Run all unit tests with Vitest |
bun run test:watch |
Run unit tests in watch mode (great for TDD) |
bun run test:e2e |
Run end-to-end tests with Playwright |
All
bun runcommands can be replaced withnpm runif you prefer npm.
JSphere has a comprehensive three-layer testing strategy to ensure correctness and reliability.
bun run testCovers:
- β Content integrity β validates all content entries are well-formed
- β Search logic β fuzzy matching, ranking, and filtering correctness
- β SEO β ensures meta tags render correctly per page
- β User library β bookmarks, history, and reading state management
bun run test:watchIdeal for active development β tests re-run automatically on every file change.
bun run test:e2eSmoke tests for critical user journeys:
- App loads and renders correctly
- Navigation between pillars works
- Search modal opens and returns results
- Content pages render without errors
Contributions are welcome and appreciated! Here's how to get involved:
- Fork this repository
- Create a feature branch:
git checkout -b feat/your-feature-name
- Make your changes and ensure tests pass:
bun run test && bun run lint
- Commit using conventional commit format:
git commit -m "feat: add your feature description" - Push to your branch:
git push origin feat/your-feature-name
- Open a Pull Request and describe what you've changed
- Follow the existing code style (TypeScript, ESLint rules enforced)
- All new content entries must be registered in
src/content/registry.ts - Keep components small, focused, and well-typed
- Write tests for any new logic in
src/lib/orsrc/hooks/
Built with passion and precision by Umar β a developer who believes that great documentation and clean code are the foundation of great software.