You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Портал Литературного музея Пермского края — первый tenant на платформе PK Business OS.
Multi-tenant платформа для управления бизнес-объектами, AI-ассистентами, плагинами и контентом.
# 1. Запустить инфраструктуру (PostgreSQL + MinIO)
docker compose up -d postgres minio
# 2. Запустить core APIcd packages/core
npm install
npx prisma generate
npx prisma db push
npm run start:dev
# 3. Запустить portal (в другом терминале)cd packages/portal
npm install
npm run dev
# 4. Создать tenant
curl -X POST http://localhost:4000/api/v1/admin/tenants \
-H "Content-Type: application/json" \
-d '{"key":"lit_house","name":"Литературный дом","schema":"lit_house_data","domain":"litdom.ru"}'# 5. Открыть портал
open http://localhost:3000
Через Docker Compose (полный стек)
docker compose up -d
API Endpoints
Health
Method
Path
Description
GET
/api/v1/health
Health check (includes DB status)
Multi-tenant Admin
Method
Path
Description
GET
/api/v1/admin/tenants
List tenants
POST
/api/v1/admin/tenants
Create tenant
GET
/api/v1/admin/tenants/:key
Get tenant by key
Plugins
Method
Path
Description
GET
/api/v1/admin/plugins
List plugins
POST
/api/v1/admin/plugins/register
Register plugins from filesystem
POST
/api/v1/admin/plugins/activate
Activate plugins for tenant
Business Objects
Method
Path
Description
POST
/api/v1/objects/types
Create object type
GET
/api/v1/objects/types
List object types
POST
/api/v1/objects
Create business object
GET
/api/v1/objects
List objects (filter by ?type=)
GET
/api/v1/objects/:id
Get object
PATCH
/api/v1/objects/:id
Update object attributes
Members
Method
Path
Description
POST
/api/v1/members
Join club (creates member object)
GET
/api/v1/members
List members
GET
/api/v1/members/:id
Get member
PATCH
/api/v1/members/:id/tier
Upgrade member tier
AI
Method
Path
Description
POST
/api/v1/ai/chat
Chat with LLM
POST
/api/v1/ai/chat/stream
Streaming chat (SSE)
POST
/api/v1/ai/rag/ask
RAG question answering
GET
/api/v1/ai/wiki/pages
List wiki pages
POST
/api/v1/ai/wiki/ingest
Ingest document into wiki
POST
/api/v1/ai/wiki/lint
Lint wiki for issues
POST
/api/v1/ai/agents/run
Run AI agent for a goal
Production Deployment
Сервер (Ubuntu 22.04+)
# На свежем сервере:
sudo bash infra/deploy/setup.sh
# После настройки — скопировать код и запустить:
docker compose -f infra/deploy/docker-compose.prod.yml up -d
CI/CD
Проект использует GitHub Actions:
deploy.yml — тесты → сборка Docker → push в GHCR → деплой на VPS
vercel-deploy.yml — тесты → сборка → деплой на Vercel (для portal)