How vikassri/lifeos works
lifeOS is a private, single-user personal management application. The main workflow is sign-in to the protected vault, where users manage personal records—projects, documents, notes, journal entries, links, investments, and liabilities—and can use AI agents and chat. Server actions and API routes mediate feature operations; SQLite stores application data, with session, CSRF, and API-guard controls protecting access. The README describes local encryption and encrypted cookies. Some feature and integration relationships are supported by the source index rather than full excerpts, so unsampled internals are represented conservatively.
Main entry points: route.ts Login endpoint · client.ts SQLite database · api-guard.ts API guard · page.tsx Dashboard
Components 28
Access and security
- Login page
app/(auth)/login/page.tsx - Login endpoint
app/api/auth/login/route.ts - Session management
lib/auth/session.ts - Local authentication
lib/auth/local-auth.ts - API guard
lib/middleware/api-guard.ts - CSRF protection
lib/security/csrf.ts
Personal workspace
- Dashboard
app/(vault)/dashboard/page.tsx - Notes
components/notes/NotesClient.tsx - Journal
components/journal/JournalClient.tsx - Personal links
components/links/LinksClient.tsx - Markdown editor
components/markdown/MarkdownEditor.tsx
Finance tracking
- Investments
components/investments/InvestmentsClient.tsx - Net worth
components/net-worth/NetWorthClient.tsx - Finance actions
app/(vault)/vault/finance/actions.ts
Projects and files
- Documents
components/documents/DocumentsClient.tsx - Project workspace
components/projects/ProjectsClient.tsx - Project file storage
lib/storage/project-files.ts - Google Drive integration
lib/storage/google-drive.ts
AI assistance
- Agent workspace
components/agents/AgentsClient.tsx - Agent API
app/api/v1/agents/route.ts - Agent logic
lib/ai/agents.ts - Chat interface
components/chat/ChatWindow.tsx - Chat API
app/api/v1/chat/route.ts - Chat service
lib/ai/chat.ts
Storage and platform
- SQLite database
lib/db/client.ts - Vault encryption
lib/crypto/vault.ts - Audit logging
lib/audit/log.ts
Other components
- Single user
Connections 29
- Single user → Login page: signs in
README.md - Login page → Login endpoint: submits credentials
app/api/auth/login/route.ts - Login endpoint → Local authentication: verifies credentials
app/api/auth/login/route.ts - Login endpoint → Session management: creates session
app/api/auth/login/route.ts - Login endpoint → SQLite database: upserts user
app/api/auth/login/route.ts - Login endpoint → Audit logging: records sign-in
app/api/auth/login/route.ts - Login endpoint → CSRF protection: generates token
app/api/auth/login/route.ts - Single user → Dashboard: opens vault
README.md - Dashboard → Session management: checks session
app/(vault)/dashboard/page.tsx - Dashboard → SQLite database: reads dashboard data
app/(vault)/dashboard/page.tsx - Notes → Markdown editor: edits text
components/notes/NotesClient.tsx - Journal → Markdown editor: edits entries
components/journal/JournalClient.tsx - Documents → Google Drive integration: uploads files
- Documents → SQLite database: manages document records
- Project workspace → Project file storage: manages project files
- Project workspace → SQLite database: saves projects
- Investments → Finance actions: records snapshots
components/investments/InvestmentsClient.tsx - Net worth → SQLite database: loads net worth data
app/(vault)/net-worth/page.tsx - Agent workspace → Agent API: uses agent API
- Agent API → API guard: guards requests
app/api/v1/agents/route.ts - Agent API → Agent logic: dispatches agent operations
app/api/v1/agents/route.ts - Agent logic → SQLite database: reads agent data
lib/ai/agents.ts - Chat interface → Chat API: sends messages
- Chat API → API guard: guards requests
app/api/v1/chat/route.ts - Chat API → Chat service: dispatches chat
app/api/v1/chat/route.ts - API guard → Session management: validates session
lib/middleware/api-guard.ts - API guard → CSRF protection: checks tokens
lib/middleware/api-guard.ts - API guard → Audit logging: logs access blocks
lib/middleware/api-guard.ts - Vault encryption → Single user: protects vault data