A Relativistic Relationship Visualizer
Map your social universe with AI-powered analysis
π Live Demo β’ Features β’ Quick Start β’ Security
Social Orbit plots your friends on a 2D coordinate system where you stand at the center (0,0). Using AI (LLM), it analyzes your text descriptions of relationships and calculates:
| Axis | Metric | Scale |
|---|---|---|
| X-Axis | Emotional Distance | 0 (Soulmate) β 100 (Stranger) |
| Y-Axis | Interaction Gap | 0 (Daily) β 100 (No Contact) |
The result is a beautiful, ethereal gradient map of your social life.
- π€ AI-Powered Analysis β Uses OpenRouter (Claude/Gemini) to convert natural descriptions into coordinates
- π Interactive Graph β Pan, zoom, and drag friends on a 2D coordinate plane
- π€ Persona Calibration β Define your personality to help the AI understand your perspective
- π¨ Customizable β Change icons and colors for each friend
- π¦ Bulk Import β Add multiple friends at once
- π Encrypted Vault β All data encrypted with AES-256-GCM using your passphrase
- π Secure API Key Storage β API key encrypted with 24-hour auto-expiry
- π« No Backend Required β Everything runs locally in your browser
- π No Account Needed β Your data never leaves your device
- β»οΈ Recalculate Positions β Re-analyze selected friends with improved AI
- π― Bias-Reduced Prompts β Gender-neutral, objective scoring criteria
- π§ͺ Mock Mode β Test without an API key
- Node.js (v18 or higher)
- Yarn (v1.22+)
# Clone the repository
git clone https://github.com/coder-jkb/Social-Orbit.git
cd Social-Orbit
# Install dependencies
cd social-orbit
yarn install
# Start development server
yarn devOpen http://localhost:5173 in your browser.
- Create a Passphrase β This encrypts all your data locally
- Define Your Persona β Help the AI understand your perspective
- Add API Key (optional) β Get one from openrouter.ai
- Start Adding Friends!
| Data | Storage | Encryption | Expiry |
|---|---|---|---|
| Friends & Profile | IndexedDB | AES-256-GCM | Never (until you delete) |
| API Key | IndexedDB | AES-256-GCM | 24 hours |
| Passphrase | Never stored | N/A | N/A |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Your Browser β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β βββββββββββββββ βββββββββββββββββββββββββββββββββββ β
β β Passphrase βββββΆβ PBKDF2 Key Derivation β β
β β (you enter) β β (100,000 iterations + salt) β β
β βββββββββββββββ βββββββββββββββββ¬ββββββββββββββββββ β
β β β
β βΌ β
β βββββββββββββββββββββββββββββββββ β
β β AES-256-GCM Encryption β β
β βββββββββββββββββ¬ββββββββββββββββ β
β β β
β βΌ β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β IndexedDB (Encrypted Blobs) ββ
β β β’ Friends data β’ Persona β’ API Key (24h) ββ
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Go to openrouter.ai
- Sign up and create a free API key
- In Social Orbit, click Settings (βοΈ)
- Paste your key and click Save
Models Used:
- Single analysis:
anthropic/claude-3.5-haiku - Bulk analysis:
google/gemini-2.0-flash-exp:free
Your API key is:
- β Encrypted with your passphrase
- β Auto-expires after 24 hours
- β Can be cleared anytime in Settings
social-orbit/
βββ src/
β βββ components/
β β βββ Graph/ # Graph viewport components
β β β βββ GraphCanvas.jsx
β β β βββ FriendNode.jsx
β β β βββ ClusterMenu.jsx
β β β βββ GraphControls.jsx
β β β βββ GraphBackground.jsx
β β βββ Panel/ # Control panel components
β β β βββ PanelHeader.jsx
β β β βββ FriendDetail.jsx
β β β βββ AddFriendForm.jsx
β β β βββ BulkImportForm.jsx
β β βββ Modals/ # Modal dialogs
β β β βββ SettingsModal.jsx
β β β βββ OnboardingModal.jsx
β β β βββ RecalculateModal.jsx
β β βββ VaultGate.jsx # Secure unlock screen
β βββ services/
β β βββ llmService.js # AI/LLM integration
β βββ hooks/
β β βββ useGraphInteraction.js
β βββ utils/
β β βββ secureStorage.js # Encrypted storage
β β βββ jsonParser.js # Robust JSON extraction
β βββ constants/
β β βββ icons.js
β β βββ colors.js
β β βββ prompts.js # AI system prompts
β βββ App.jsx # Main application
βββ public/
βββ social-orbit-logo.png
βββ social-orbit-logo-with-text.png
The AI uses carefully crafted prompts to minimize bias:
- β Gender-neutral scoring β Same description = same scores regardless of gender
- β Ignore writing style β Slang, emojis, casual language don't affect scores
- β
Objective criteria β Scoring based on concrete factors only:
- Communication frequency
- Trust level
- Emotional depth
- Practical support
Emotional Distance (X-Axis):
| Score | Meaning |
|---|---|
| 0-15 | Share deepest secrets, complete trust, like family |
| 16-30 | High trust, emotional support, discuss personal issues |
| 31-50 | Good friends, some personal sharing |
| 51-70 | Casual/situational friends (work, school) |
| 71-85 | Acquaintances |
| 86-100 | Barely know each other |
Interaction Gap (Y-Axis):
| Score | Meaning |
|---|---|
| 0-10 | Daily contact |
| 11-25 | Multiple times per week |
| 26-40 | Weekly |
| 41-55 | Few times per month |
| 56-70 | Monthly or less |
| 71-85 | Few times per year |
| 86-100 | Rarely/lost contact |
Windows:
deploy.bat "Your commit message"Linux/Mac:
chmod +x deploy.sh
./deploy.sh "Your commit message"Manual deployment:
cd social-orbit
yarn build
npx gh-pages -d dist -r git@github.com:YOUR_USERNAME/Social-Orbit.gityarn dev # Start development server
yarn build # Build for production
yarn preview # Preview production build
yarn lint # Run ESLint- Framework: React 19 + Vite
- Styling: Tailwind CSS
- Animations: Framer Motion
- Icons: Lucide React
- Storage: IndexedDB + Web Crypto API
- AI: OpenRouter API
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is open source. Modify it. Remix it. Use it to understand your universe of people.
Your orbit is yours π
Made with β€οΈ by coder-jkb
