TopLocs Tribelike Documentation
đ Centralized Documentation Hubâ
All comprehensive TopLocs documentation is now centralized in the workspace repository:
đ Complete Documentation Hub
đ Documentation Structureâ
The centralized docs are organized as:
- đ Getting Started - Complete setup guide
- đī¸ Architecture - P2P platform technical details
- đ Ecosystem - Repository relationships
- đ Plugin Development - Create and maintain plugins
- đ Debug Guide - Troubleshooting and tools
đ¤ AI Development Contextâ
For AI-assisted development, use the comprehensive context in the workspace:
đ CLAUDE.md
đ Live Documentation Siteâ
Browse the complete documentation at:
đ https://toplocs.github.io/toplocs-workspace/
đī¸ Architecture Quick Referenceâ
TopLocs is built on a peer-to-peer architecture using Gun.js:
âââââââââââââââââââ âââââââââââââââââââ âââââââââââââââââââ
â Browser â â Browser â â Browser â
â (Vue.js App) âââââēâ (Vue.js App) âââââēâ (Vue.js App) â
âââââââââââââââââââ âââââââââââââââââââ âââââââââââââââââââ
ⲠⲠâ˛
â â â
âââââââââââââââââââââââââŧââââââââââââââââââââââââ
âŧ
âââââââââââââââââââ
â Gun.js Relay â
â (Minimal Server)â
âââââââââââââââââââ
Key Principlesâ
- No Central Authority: No single server controls the data
- User-Owned Data: Users control their data through cryptographic keys
- Offline-First: Works without internet connectivity
- Real-Time Sync: Changes propagate instantly between connected peers
đ Plugin Systemâ
Plugins extend functionality using Module Federation:
// Plugin configuration
federation({
name: 'your-plugin',
filename: 'plugin.js',
exposes: {
'./Main': './src/components/Main.vue',
'./Settings': './src/components/Settings.vue'
},
shared: ['vue', 'tailwindcss']
})
Available Pluginsâ
- event-plugin - Real-time chat & event management
- wiki-plugin - Knowledge sharing & documentation
- location-plugin - Location management & mapping
- link-plugin - Link sharing & bookmarking
Plugin Developmentâ
Use the demo-plugin repository as a template for creating new plugins.
đ ī¸ Development Workflowâ
Quick Startâ
# Clone and setup
git clone https://github.com/toplocs/tribelike.git
cd tribelike
pnpm install
# Start development
pnpm dev
Common Commandsâ
pnpm dev # Start development environment
pnpm build # Build all workspaces
pnpm test # Run tests
pnpm lint # Lint code
pnpm check # Type checking
đī¸ Data Structureâ
Gun.js Namespacesâ
gun.get('credentials').get(email) // Authentication
gun.get('profile/{id}') // User profiles
gun.get('location/{id}') // Geographic locations
gun.get('topic/{id}/{space}') // Topics (local/global)
gun.get('sphere/{id}/{space}') // Community spheres
gun.get('relations/{from}/{type}/{to}') // Universal relations
gun.get('plugins') // Plugin registry
Relationship Typesâ
- Profile-Interest:
favorite
,doing
,expert
,learning
,curious
- Profile-Location:
living
,working
,traveling
,visiting
,current
- Profile-Profile:
following
,friend
,family
,partner
đ Debuggingâ
Browser Console Commandsâ
gunDebug.graph() // Show complete local graph
gunDebug.peers() // Show connected peers
gunDebug.user() // Show current user
gunDebug.watch('path') // Monitor specific path
gunDebug.storage() // Show Gun data in localStorage
gunDebug.clear() // Clear all Gun data
Debug Toolsâ
- Vue DevTools - Component state inspection
- Eruda - Mobile-style console and network inspection
- Gun Logger - Custom Gun.js event logging
- Performance Monitor - Graph size and memory usage
đ Additional Resourcesâ
External Documentationâ
- Gun.js Documentation - Core P2P database
- Vue.js Guide - Frontend framework
- WebAuthn Guide - Modern authentication
- Module Federation - Plugin system
âšī¸ Why Centralized?â
The documentation is centralized in the toplocs-workspace for:
- đ Single Source of Truth: No duplicate or conflicting information
- đ Automatic Updates: AI-powered synchronization with all repositories
- đ Better Discoverability: Organized structure with clear navigation
- đĨ Team Consistency: Everyone accesses the same current information
- đ¤ AI Integration: Comprehensive context for intelligent development assistance
đĄ Tribelike-Specific Documentationâ
This repository contains tribelike-specific information:
- CLAUDE.md with development context for this repository
- README.md with repository overview and setup
- Implementation-specific guides and technical details
đ¤ Contributing to Tribelikeâ
- Read the centralized documentation first in toplocs-workspace
- Understand P2P principles and Gun.js architecture
- Follow existing patterns in the codebase
- Test with multiple browser tabs for P2P features
- Maintain offline-first functionality
Development Tipsâ
- Use Gun.js for all data persistence
- Follow the universal relations system
- Check the centralized debug guide for troubleshooting
- Use the workspace CLAUDE.md for AI development assistance
đ Getting Helpâ
- General Questions: See toplocs-workspace documentation
- Tribelike Issues: Check GitHub issues
- Development Help: Use the centralized AI context
For all general TopLocs documentation, visit the centralized hub! đ