How karl-cta/onyka works
Onyka is a self-hosted notes product: users authenticate, capture and organize encrypted notes, then edit and share them, with collaboration and supporting account tools. The graph traces the documented client-to-server boundary and sampled server ownership, while retaining major README capabilities such as Sparks, search, uploads, and administration. Several route, service, and store implementations were not sampled, so links between those layers are shown only where supported by the excerpts or product documentation.
Main entry points: HomePage.tsx Notes workspace · api.ts HTTP API client · notes.ts Client state · App.tsx App and routes
Components 24
Web application
- App and routes
apps/web/src/App.tsx - Notes workspace
apps/web/src/pages/HomePage.tsx - Rich editor
apps/web/src/components/editor/NoteEditor.tsx - Client state
apps/web/src/stores/notes.ts - HTTP API client
apps/web/src/services/api.ts
Notes and organization
- Note routes
apps/server/src/routes/notes.routes.ts - Notes service
apps/server/src/services/notes.service.ts - Encrypted note storage
apps/server/src/repositories/note.repository.ts - SQLite database
apps/server/src/db/index.ts - Full-text search
apps/server/src/services/search.service.ts - Folders and tags
apps/server/src/services - Sparks capture
apps/server/src/services/sparks.service.ts - Encrypted uploads
apps/server/src/services/uploads.service.ts - Upload routes
apps/server/src/routes/uploads.routes.ts
Identity and security
- Authentication routes
apps/server/src/routes/auth.routes.ts - Authentication service
apps/server/src/services/auth.service.ts - Account and token repositories
apps/server/src/repositories/user.repository.ts
Collaboration
- Collaboration client
apps/web/src/hooks/useCollaboration.ts - Collaboration server
apps/server/src/websocket/collaboration.ts
Product services
- Admin console API
apps/server/src/routes/admin.routes.ts - Administration service
apps/server/src/services/admin.service.ts - Product features
apps/server/src/services - Shared API types
packages/shared/src/types
Other components
- User
Connections 23
- User → App and routes: uses
- App and routes → Notes workspace: routes to
- Notes workspace → Rich editor: edits notes
- Notes workspace → Client state: updates state
- Client state → HTTP API client: requests data
- HTTP API client → Note routes: calls API
- HTTP API client → Authentication routes: calls API
- Authentication routes → Authentication service: calls
- Authentication service → Account and token repositories: reads and writes
- Note routes → Notes service: calls
- Notes service → Encrypted note storage: reads and writes
- Encrypted note storage → SQLite database: stores encrypted notes
- Full-text search → SQLite database: queries index
- Upload routes → Encrypted uploads: validates and processes
- HTTP API client → Upload routes: uploads files
- Collaboration client → Collaboration server: syncs edits and presence
- HTTP API client → Admin console API: calls API
- Admin console API → Administration service: calls
- Administration service → Full-text search: rebuilds index
- Notes workspace → Folders and tags: organizes notes
- Notes workspace → Sparks capture: captures thoughts
- Notes workspace → Product features: opens product tools
- Client state → Shared API types: uses contracts