Status: β Successfully deployed as the first pure P2P plugin for Tribelike!
A pure peer-to-peer event management plugin for Tribelike. Create, join, and manage events without any backend server - just Gun.js and the community.
- Production: https://tribelike.shniq.dev/plugins/event-plugin/
- Branch:
event-plugin-p2p - Deployed: July 3, 2025
- π Event Creation: Schedule events with date/time picker
- π Recurring Events: Support for weekly, bi-weekly, monthly events
- π₯ RSVP System: Join/leave events with real-time attendee updates
- π― Interest-based: Tag events with relevant interests
- π Location-aware: Associate events with locations
- π« Participant Limits: Set maximum attendees
- β‘ Real-time Updates: Live sync via Gun.js
- π Offline-first: Works without internet connection
Browser β Gun.js β P2P Network
β
Gun Relay (26 lines)
// Events stored in Gun
gun.get('plugins').get('events').get(sphereId).get('list').get(eventId)
// Event structure
{
id: 'random-id',
title: 'Tribelike Meetup Munich',
description: 'Let\'s discuss P2P social networks',
date: '2025-07-15T18:00:00Z',
recurring: 1, // 1=once, 2=weekly, 3=bi-weekly, 4=monthly
limit: 50,
interests: ['tribelike', 'p2p', 'decentralized'],
locations: ['munich'],
creator: 'user-public-key',
created: 1234567890,
attendees: {
'user-id-1': { profile, joinedAt, status },
'user-id-2': { profile, joinedAt, status }
}
}pnpm installpnpm devpnpm buildOutput will be in dist/ directory.
For deployment under a subpath:
PLUGIN_BASE_PATH="/plugins/event-plugin/" pnpm build./EventListView- List of upcoming events./EventDetailView- Event details and RSVP./EventCreateView- Create new event form./Main- Plugin router/entry point
The plugin expects these to be injected from the main app:
profile- Current user profileinterest- Current interest context (optional)location- Current location context (optional)sphereId- Current sphere IDtab- For navigation state
The plugin will use the main app's Gun instance if available (window.__tribelike_gun), otherwise creates its own connection to the Tribelike relay.
const eventData = {
title: 'P2P Developers Meetup',
description: 'Monthly gathering for P2P enthusiasts',
date: new Date('2025-08-01T19:00'),
recurring: 2, // Weekly
limit: 30,
interests: ['programming', 'p2p', 'gun.js'],
locations: ['berlin']
}
const eventId = await createEvent(eventData)await joinEvent(eventId, userProfile)// Subscribe to event list
const unsubscribe = subscribeToEvents({ interest: 'p2p' })
// Subscribe to specific event attendees
const unsubAttendees = subscribeToAttendees(eventId, (attendees) => {
console.log(`${attendees.length} people attending`)
})The plugin is automatically built and deployed with Tribelike:
- Plugin is cloned to isolated environment
- Dependencies installed with npm
- Built with correct base path
- Deployed to
/plugins/event-plugin/
If not auto-registered, add to Gun:
gun.get('plugins').set({
id: 'event-plugin',
name: 'Events (P2P)',
url: '/plugins/event-plugin/plugin.js',
version: '1.0.0',
enabled: true
})- No Backend: Pure P2P with Gun.js
- No axios: All data operations via Gun
- Real-time by default: Live updates built-in
- Offline-first: Works without server
- User-owned data: Events stored in Gun graph
- Calendar view
- Event reminders
- Private events (encrypted)
- Event comments/discussion
- Photo sharing
- Location map integration
- iCal export
- First Pure P2P Plugin: Pioneering true decentralized plugins
- No Backend Required: 100% client-side with Gun.js
- GitHub Actions Deployment: Automated build & deploy pipeline
- Module Federation: Dynamic loading in main app
- TypeScript + Vue 3: Modern tech stack
- Real Production Deployment: Live at tribelike.shniq.dev
This plugin started as a confused repository that went through multiple identity changes (wiki β event β chat). In July 2025, we cleaned it up and created the event-plugin-p2p branch, making it the first plugin to achieve Tribelike's vision of pure P2P functionality.
Same as Tribelike main project