How hazammm/synk works
Synk is a team workspace combining chat, issue tracking, project work, time tracking, search, and an AI agent constrained by the signed-in user’s permissions. The principal path is browser request → Next.js route → feature service → shared authorization and PostgreSQL; chat also supports live delivery. The Python agent receives scoped context and calls back through Synk’s tool endpoints. The README documents additional workspace, people, reporting, docs, and code-host capabilities; docs implementation is not present in the supplied tree. Relationships are shown only where the README or provided source index/excerpts support them.
Main entry points: db.ts PostgreSQL via Prisma · route.ts Next.js app and routes · permissions.ts Shared permissions · service.ts Chat and channels
Components 24
Workspace features
- Workspace onboarding
src/features/workspaces/onboarding.ts - Chat and channels
src/features/chat/service.ts - Tickets and boards
src/features/tickets/service.ts - Projects and access
src/features/projects/service.ts - Time tracking
src/features/time/service.ts - Workspace search
src/features/search/service.ts - Reports and exports
src/features/reports/service.ts - Account services
src/features/account/service.ts - Notifications
src/features/notifications/service.ts
Request and access platform
- Next.js app and routes
src/app/api/tickets/route.ts - Session identity
src/lib/session.ts - Shared permissions
src/lib/permissions.ts - Input validation
src/lib/validation.ts - PostgreSQL via Prisma
src/lib/db.ts
AI agent
- Agent orchestration
src/features/agent/service.ts - Python agent service
agent/synk_agent/api.py - Agent tool endpoints
src/app/api/agent-tools/[name]/route.ts - SQLite checkpointer
- Google Gemini
Live and external services
- Code-host integrations
src/features/integrations/service.ts - Live delivery
src/lib/realtime.ts - Socket.IO server
src/server/socket.ts - GitHub and Bitbucket
Other components
- Browser
Connections 34
- Browser → Next.js app and routes: HTTP requests
README.md - Next.js app and routes → Workspace onboarding: routes onboarding
- Next.js app and routes → Session identity: requires user
src/app/api/tickets/route.ts - Next.js app and routes → Agent orchestration: manages conversations
- Next.js app and routes → Tickets and boards: routes ticket requests
src/app/api/tickets/route.ts - Chat and channels → Shared permissions: checks access
src/features/chat/service.ts - Tickets and boards → Shared permissions: checks access
src/features/tickets/service.ts - Projects and access → Shared permissions: checks access
src/features/projects/service.ts - Time tracking → Shared permissions: checks access
src/features/time/service.ts - Workspace search → Shared permissions: filters access
README.md - Chat and channels → PostgreSQL via Prisma: reads and writes
src/features/chat/service.ts - Tickets and boards → PostgreSQL via Prisma: reads and writes
src/features/tickets/service.ts - Projects and access → PostgreSQL via Prisma: reads and writes
src/features/projects/service.ts - Time tracking → PostgreSQL via Prisma: reads and writes
src/features/time/service.ts - Workspace onboarding → PostgreSQL via Prisma: reads and writes
- Chat and channels → Live delivery: publishes updates
src/features/chat/service.ts - Chat and channels → Notifications: creates alerts
src/features/chat/service.ts - Tickets and boards → Notifications: announces alerts
src/features/tickets/service.ts - Notifications → Live delivery: notifies users
src/features/notifications/service.ts - Socket.IO server → Shared permissions: rechecks recipients
README.md - Socket.IO server → Chat and channels: serves live chat
README.md - Next.js app and routes → Python agent service: posts chat context
README.md - Python agent service → Agent tool endpoints: calls tools
README.md - Agent tool endpoints → Tickets and boards: uses feature services
README.md - Agent tool endpoints → Shared permissions: shares access rules
README.md - Python agent service → SQLite checkpointer: stores memory
README.md - Python agent service → Google Gemini: queries model
README.md - Agent orchestration → PostgreSQL via Prisma: stores transcript
README.md - Code-host integrations → GitHub and Bitbucket: connects providers
README.md - Code-host integrations → PostgreSQL via Prisma: stores links
src/features/integrations/service.ts - Reports and exports → PostgreSQL via Prisma: queries metrics
- Account services → Shared permissions: checks access
src/features/account/service.ts - Account services → PostgreSQL via Prisma: reads and writes
src/features/account/service.ts - Next.js app and routes → Input validation: validates input