Skip to content

Mavdii/JavaScript-Docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

JSphere Logo

JSphere

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.

React TypeScript Vite Tailwind CSS License


🌐 Live Site Β Β·Β  πŸ“š Content Pillars Β Β·Β  πŸš€ Getting Started Β Β·Β  πŸ› Report Bug Β Β·Β  ✨ Request Feature


"Built for builders. Engineered for clarity."


πŸ“– Table of Contents


πŸš€ Overview

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.


πŸ“š Content Pillars

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

✨ Features

πŸ” Smart Search

  • 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+K for instant access anywhere

πŸ“– Rich Content Renderer

  • 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

πŸ—ΊοΈ Smart Navigation

  • 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

πŸ‘€ Personalization & User Library

  • 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

🎨 Polished Design System

  • 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

⚑ Performance First

  • 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

πŸ”Ž SEO Ready

  • 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}

πŸ›  Tech Stack

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

πŸ—‚ Project Structure

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

🏁 Getting Started

Prerequisites

Make sure you have the following installed before you begin:

  • Node.js v18 or higher
  • Bun (recommended for speed) or npm / yarn / pnpm

Installation

# 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 dev

The app will be running at http://localhost:8080 πŸš€

Manual Content Generation

Content metadata is automatically generated before dev, build, and test commands. To run it manually:

bun run generate:content
# or: npm run generate:content

πŸ“œ Available Scripts

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 run commands can be replaced with npm run if you prefer npm.


πŸ§ͺ Testing

JSphere has a comprehensive three-layer testing strategy to ensure correctness and reliability.

Unit & Integration Tests β€” Vitest

bun run test

Covers:

  • βœ… 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

Watch Mode

bun run test:watch

Ideal for active development β€” tests re-run automatically on every file change.

End-to-End Tests β€” Playwright

bun run test:e2e

Smoke 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

🀝 Contributing

Contributions are welcome and appreciated! Here's how to get involved:

  1. Fork this repository
  2. Create a feature branch:
    git checkout -b feat/your-feature-name
  3. Make your changes and ensure tests pass:
    bun run test && bun run lint
  4. Commit using conventional commit format:
    git commit -m "feat: add your feature description"
  5. Push to your branch:
    git push origin feat/your-feature-name
  6. Open a Pull Request and describe what you've changed

Guidelines

  • 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/ or src/hooks/

πŸ‘¨β€πŸ’» Author

Built with passion and precision by Umar β€” a developer who believes that great documentation and clean code are the foundation of great software.

Platform Handle
πŸ“± Telegram @Winnr0
πŸ“Έ Instagram @winnr.9

JSphere β€” Engineered for clarity. Built for builders.


⭐ If JSphere helps you, please consider giving it a star β€” it means a lot!


React TypeScript Vite

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages