Skip to content
maharshi878Public

About

Search any concept. Watch the knowledge universe unfold. BUILD UNDERWAY!

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

🌌 Synapse

An interactive knowledge graph explorer β€” where ideas connect.

License: MIT React TypeScript Vite Tailwind CSS Vercel

Search any concept. Watch the knowledge universe unfold.


✨ What is Synapse?

Synapse is an interactive knowledge graph explorer that visualises how concepts, people, events, and ideas are connected. Rather than reading siloed Wikipedia pages, users experience knowledge as a living, interconnected web β€” powered by 10K+ concepts sourced from Wikidata.

The graph is the interface. Every design decision removes friction so you can focus on discovery.


🎬 Demo

Screenshots / GIF coming in v0.1 launch β€” track progress in the Roadmap.


πŸš€ Features

Feature Description
πŸ” Smart Search Debounced search with instant dropdown suggestions (top 8 matches)
πŸ•ΈοΈ Force-Graph Canvas GPU-accelerated, full-viewport force-directed graph β€” pan, zoom, drag
πŸ–±οΈ Node Interactions Hover to highlight, click to focus, expand 1st-degree neighbours
πŸ“‹ Concept Panel Slide-in details panel with description, category, and related concepts
🎨 Dark + Neon Design Cyan / indigo / violet accents on a deep-black canvas
πŸ“± Mobile-first Touch-friendly interactions; panel adapts to bottom-sheet on mobile
β™Ώ Accessible Keyboard navigation, ARIA labels, high-contrast text

πŸ—οΈ Tech Stack

Layer Technology
Frontend React 18, TypeScript, Vite 5
Styling Tailwind CSS, custom design tokens
State Zustand (lightweight, no boilerplate)
Graph react-force-graph-3d (GPU-accelerated)
API Vercel Functions (serverless, auto-scaling)
Database Supabase Postgres (RLS, Auth, free tier)
Data Pipeline Python 3.10+, Wikidata API, NetworkX
Deployment Vercel (web + API), Supabase (database)

πŸ“ Project Structure

synapse/
β”œβ”€β”€ apps/web/                     # React + Vite frontend
β”‚   └── src/
β”‚       β”œβ”€β”€ components/
β”‚       β”‚   β”œβ”€β”€ layout/           # TopNavBar
β”‚       β”‚   β”œβ”€β”€ graph/            # GraphCanvas, EdgeLegend, GraphNode, GraphEdge
β”‚       β”‚   └── explore/          # SearchBar, ConceptPanel
β”‚       β”œβ”€β”€ pages/                # HomePage, GraphExplorer
β”‚       β”œβ”€β”€ store/                # Zustand stores (graphStore, searchStore)
β”‚       β”œβ”€β”€ hooks/                # useForceGraph, useGraphStore
β”‚       β”œβ”€β”€ lib/                  # API client, utilities
β”‚       └── types/                # graph.ts, concept.ts
β”œβ”€β”€ services/api/                 # Vercel serverless API
β”‚   └── api/
β”‚       β”œβ”€β”€ search.ts             # GET /api/search?q=
β”‚       β”œβ”€β”€ concepts.ts           # GET /api/concepts/:id
β”‚       └── relationships.ts      # GET /api/concepts/:id/relationships
β”œβ”€β”€ pipelines/ingestion/          # Python data ingestion
β”‚   └── scripts/
β”‚       β”œβ”€β”€ fetch_wikidata.py
β”‚       β”œβ”€β”€ parse_graph.py
β”‚       └── upload_to_db.py
└── datasets/schema/              # Postgres schema SQL
    β”œβ”€β”€ concepts.sql
    └── relationships.sql

⚑ Quick Start

Prerequisites

1 β€” Clone & install

git clone https://github.com/maharshi878/synapse.git
cd synapse

# Install web app dependencies
cd apps/web && npm install

# Install API dependencies
cd ../../services/api && npm install

# Install Python pipeline dependencies
cd ../../pipelines/ingestion && pip install -r requirements.txt

2 β€” Configure environment variables

# apps/web/.env.local
VITE_API_URL=http://localhost:3001

# services/api/.env
SUPABASE_URL=your_supabase_url
SUPABASE_ANON_KEY=your_anon_key

3 β€” Set up the database

# Run schema migrations in your Supabase SQL editor:
#   datasets/schema/concepts.sql
#   datasets/schema/relationships.sql

4 β€” Ingest data

cd pipelines/ingestion
python scripts/fetch_wikidata.py
python scripts/parse_graph.py
python scripts/upload_to_db.py

5 β€” Run locally

# Terminal 1 β€” web app
cd apps/web && npm run dev

# Terminal 2 β€” API
cd services/api && npx vercel dev

Open http://localhost:5173 πŸŽ‰

For a detailed walkthrough, see SYNAPSE_SCAFFOLDING.md.


🎨 Design System

Synapse uses a purpose-built dark design system:

Backgrounds:   #050609 β†’ #0a0e13 β†’ #151d2a
Accents:       #00d9ff (cyan)  #6366f1 (indigo)  #a855f7 (violet)
Text:          #f1f5f9 (primary)  #cbd5e1 (secondary)

Fonts:         Bebas Neue (headers) Β· DM Sans (body) Β· JetBrains Mono (data)
Spacing:       4 px base grid
Animations:    150–300 ms ease-out

Full specifications are in SYNAPSE_DESIGN_SYSTEM.md and SYNAPSE_VISUAL_REFERENCE.md.


πŸ—ΊοΈ Roadmap

Phase 0 β€” Scaffolding βœ…

  • Design system finalised
  • Tech stack chosen
  • Monorepo structure designed
  • Database schema defined
  • Deploy skeleton app to Vercel

Phase 1 β€” Core (Weeks 2–4)

  • SearchBar + API integration
  • GraphCanvas with force-graph
  • ConceptPanel
  • Node click / hover / expand logic
  • Ingest 10K concepts from Wikidata
  • Deploy to Vercel

Phase 1.1 β€” Polish (Week 5)

  • Mobile responsive (bottom sheet)
  • Accessibility audit
  • Performance optimisation
  • Error handling
  • πŸš€ Launch!

Phase 2 β€” Enhancement (Month 2+)

  • Vector embeddings & semantic search
  • User authentication & bookmarking
  • Analytics dashboard
  • React Native mobile app

πŸ“Š Performance Targets

Metric Target
Homepage load < 1 s
Search latency < 300 ms
Node expansion < 500 ms
Graph render 60 fps (GPU)
Bundle size < 200 KB gzipped
Lighthouse score > 90
Accessibility > 95 axe score

πŸ“– Documentation

Document Description
SYNAPSE_EXECUTIVE_SUMMARY.md ⭐ Start here β€” 5-minute project overview
SYNAPSE_DESIGN_SYSTEM.md Complete visual design system
SYNAPSE_COMPONENTS.md Production-ready React component examples
SYNAPSE_VISUAL_REFERENCE.md Pixel-perfect specs, animations, responsive behaviour
SYNAPSE_SCAFFOLDING.md Step-by-step setup instructions
SYNAPSE_QUICK_START.md Copy-paste code snippets to get running fast
DOCS_OVERVIEW.md Guide to all documentation in this repo

🀝 Contributing

Contributions, bug reports, and feature requests are welcome!

  1. Fork the repo
  2. Create a feature branch: git checkout -b feat/amazing-feature
  3. Commit your changes: git commit -m "feat: add amazing feature"
  4. Push to your branch: git push origin feat/amazing-feature
  5. Open a Pull Request

Please make sure your PR:

  • Follows the existing code style
  • Passes all tests
  • Includes a clear description of the change

πŸ“„ License

Distributed under the MIT License.


The knowledge graph awaits. 🌌

Built with ❀️ by maharshi878

About

Search any concept. Watch the knowledge universe unfold. BUILD UNDERWAY!

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors