Live Application: synapse.vercel.app
Developer: Syed Muhammad Hashir Ali (hashir.dev)
Synapse is a high-precision, web-based cognitive training suite designed to measure, train, and benchmark fundamental spatial perception, color discrimination, and visual reaction speed. Built with a dark glassmorphic design system, Synapse provides instant performance feedback and global leaderboard tracking across three core cognitive modules.
-
Concept: Estimate the real-world scale of objects across multi-order logarithmic dimensions—from sub-micron molecular structures (
$\text{nm}/\mu\text{m}$ ) to planetary scales ($\text{km}$ ). - Engine: SVG vector rendering with unpadded scale transformations to ensure 100% geometric accuracy.
- Scoring: Precision-based scoring curve using logarithmic deviation from real-world metric attributes.
- Concept: Train fine-grained color perception and working visual memory under strict time constraints.
- Engine: Dynamic HSB (Hue, Saturation, Brightness) color manipulation algorithms.
- Gameplay: Memorize a target swatch within 5 seconds, then reconstruct the exact shade using 3-axis interactive sliders.
- Concept: Benchmark millisecond-level neural reaction latency.
- Engine: High-frequency event loop tracking with anti-anticipation logic (false start detection).
-
Analytics: 5-round average reaction time tracking (
$\text{ms}$ ) with latency distribution breakdowns.
Synapse is engineered as a Vercel Multi-Service project, separating client-side rendering from serverless REST API microservices:
- Framework: React 19 + Vite
- Styling: Tailwind CSS v4 (Glassmorphism, custom design tokens, dark theme)
- Icons: Lucide React
- Type Safety: TypeScript (Strict mode)
- Runtime: Node.js + Express.js
- Database: PostgreSQL (Supabase) with zero-config in-memory fallback for local development
- Authentication: JWT (JSON Web Tokens) with Google & GitHub OAuth integration
- Deployment: Vercel Multi-Service (
vercel.jsonrouting architecture)
- Node.js (v18 or higher)
- npm or pnpm
git clone https://github.com/pikacoder44/Synapse.git
cd SynapseInstall root and server dependencies:
npm install
npm install --prefix serverCreate a .env file in the root directory for the client:
VITE_SUPABASE_URL=https://your-supabase-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-supabase-anon-key
VITE_API_BASE_URL=http://localhost:3001Create a server/.env file for the backend server:
PORT=3001
DATABASE_URL=postgresql://postgres:password@localhost:5432/postgres
JWT_SECRET=your-32-byte-random-jwt-secret
JWT_EXPIRES_IN=7d
CORS_ORIGIN=http://localhost:5173Start the backend server and Vite frontend concurrently:
# Terminal 1: Start Express API Server
npm run dev --prefix server
# Terminal 2: Start Vite Client
npm run devOpen http://localhost:5173 in your browser.
The codebase strictly enforces 0 lint, type, or runtime warnings:
# Run client and server linter + typechecks
npm run lint && npx tsc -b && npx tsc --noEmit --project server/tsconfig.json
# Test production builds
npm run build && npm run build --prefix serverSyed Muhammad Hashir Ali
Backend & Full-Stack Software Engineer
- Portfolio: hashir.dev
- GitHub: @pikacoder44
- LinkedIn: syedmhashirali
- Email: hashiralibusiness@gmail.com
This project is licensed under the MIT License.