How pravshi/pravshi-os works
PRAVSHI OS is an internal operations platform for HR, corporate records, projects, and sales, with database-enforced authorization and no public signup. The principal workflow is an authenticated employee using the application to manage CRM or work records; API handlers authorize the request, domain services perform the operation through the authorized database path, and selected changes can trigger workflows or integrations. The README also documents analytics, search, notifications, AI, and administration. Some links reflect only documented capabilities or source-index references; unsampled implementation details are not assumed.
Main entry points: authorized.ts Authorized database access · engine.ts Workflow execution · connections.ts Integrations · pipelines.ts CRM and pipelines
Components 18
Access and security
- Application UI
src/app/(app)/layout.tsx - Authentication
src/lib/auth/server.ts - Permission checks
src/lib/authz/require-permission.ts - Invitations
src/lib/invitations/service.ts
Business records
- CRM and pipelines
src/lib/crm/pipelines.ts - Projects and tasks
src/lib/work/tasks.ts - Administration
src/lib/admin/permissions.ts
Automation and integrations
- Workflow events
src/lib/workflows/events.ts - Workflow execution
src/lib/workflows/engine.ts - Background jobs
src/lib/jobs/handlers.ts - Integrations
src/lib/integrations/connections.ts
Insights and assistance
- Analytics
src/lib/analytics/sales.ts - Global search
src/lib/search/query.ts - AI assistance
src/lib/ai/orchestrator.ts
Platform services
- Authorized database access
src/lib/db/authorized.ts - Credential database access
src/lib/db/auth-client.ts - Notifications
src/lib/notifications/service.ts
Other components
- Employee
Connections 23
- Employee → Application UI: uses
README.md - Application UI → Authentication: signs in
- Authentication → Credential database access: reads credentials
src/lib/auth/server.ts - Permission checks → Authentication: resolves session
src/lib/authz/require-permission.ts - Permission checks → Authorized database access: checks access
src/lib/authz/require-permission.ts - CRM and pipelines → Authorized database access: reads and writes
src/lib/crm/pipelines.ts - CRM and pipelines → Workflow events: emits events
src/lib/crm/pipelines.ts - CRM and pipelines → Integrations: fans out events
src/lib/crm/pipelines.ts - Projects and tasks → Authorized database access: reads and writes
src/lib/work/tasks.ts - Projects and tasks → Workflow events: emits events
src/lib/work/tasks.ts - Projects and tasks → Integrations: fans out events
src/lib/work/tasks.ts - Workflow events → Workflow execution: dispatches events
src/lib/workflows/events.ts - Workflow execution → Authorized database access: records execution
src/lib/workflows/engine.ts - Workflow execution → CRM and pipelines: loads deals
src/lib/workflows/engine.ts - Workflow execution → Projects and tasks: loads work records
src/lib/workflows/engine.ts - Workflow execution → Integrations: emits outcomes
src/lib/workflows/engine.ts - Background jobs → Authorized database access: runs handlers
src/lib/jobs/handlers.ts - Integrations → Authorized database access: stores connections
src/lib/integrations/connections.ts - Integrations → Background jobs: queues fanout
- Global search → Authorized database access: queries records
src/lib/search/query.ts - Analytics → Authorized database access: queries metrics
src/app/api/analytics/overview/route.ts - AI assistance → Permission checks: authorizes requests
- Invitations → Permission checks: requires permission