Copilot is the workspace for Finance Ops, OperOps/CRM, Voice, and Miniapp surfaces. Deprecated code is archived in old_code/.
- FX rates are managed in
app/src/store/fxStore.tsand recalculate RUB values in analytics, KPIs, and plan-fact tables. - The Employees directory supports a chat-driven form fill that prompts for missing fields.
- Plan-fact months can be pinned (up to 3), and the totals row stays visible under pinned months.
- The Expenses tab combines payroll and other costs, with category-level operations and sticky totals.
- Expense attachments are uploaded via
/api/uploads/expense-attachmentsand served from/uploads/expenses. - Guide directories fall back to mock data when the automation API is unavailable, and the Guide header includes a global Log sidebar.
- CRM components migrated from
automation/appkanbanlive inapp/src/components/crm/. - CRM pages: CRMPage, PerformersPage, FinancesPerformersPage, ProjectsTree, TaskPage in
app/src/pages/operops/. - CRM stores:
kanbanStore.ts(tickets, epics, performers),crmStore.ts(UI state),projectsStore.ts(project tree),requestStore.ts(API). - Socket.IO events: TICKET_CREATED, TICKET_UPDATED, TICKET_DELETED, EPIC_UPDATED, COMMENT_ADDED, WORK_HOURS_UPDATED.
- Routes accessible at
/operops/*with OperOpsNav horizontal navigation.
- Voice UI is native in
app/under/voice/*(no iframe embed).
- Miniapp frontend sources live in
miniapp/src/and build tominiapp/dist. - Miniapp backend is served by the Copilot backend runtime (
npm run dev:miniapp/npm run start:miniapp). - PM2 mode scripts start both backend APIs (
copilot-backend-*andcopilot-miniapp-backend-*) together.
app/React + Vite frontend for Finance Ops and OperOps/CRM.miniapp/React + Vite miniapp frontend.backend/Node/Express API for FinOps, CRM, VoiceBot, and miniapp backend routes.agents/Python-based agents service and PM2 helper scripts.scripts/deployment helpers (pm2-backend.sh,check-envs.sh).docs/,specs/,projects/for product documentation and specs.deploy/Host-level Nginx config and notes.
For shared dev on p2, use PM2 scripts and serve static builds to avoid Vite port conflicts.
./scripts/check-envs.sh
./scripts/pm2-backend.sh dev- Dev URL: https://copilot-dev.stratospace.fun
- Backend health: http://127.0.0.1:3002/api/health
- Manual frontend builds:
cd app && npm install && npm run build-devcd miniapp && npm install && npm run build-dev
- Backend proxies Voicebot auth via
/api/try_loginand/api/auth/me; setVOICEBOT_API_URLin the backend environment. - Frontend auth checks call
https://voice.stratospace.fun/auth/meby default; override withVITE_VOICEBOT_BASE_URLif needed. - Login relies on the shared
auth_tokenhttp-only cookie for.stratospace.fun.
The Finance Ops SPA is served by Nginx, and /api is proxied to the backend. For the public domain, see deploy/nginx-host.conf and deploy/README.md.
- Unit tests:
npm run test(Jest) inapp/andbackend/. - E2E tests:
npm run test:e2e(Playwright) inapp/— runs against local dev server. - E2E tests require a running dev server or use
PLAYWRIGHT_BASE_URLenv var. - Run E2E with UI:
npm run test:e2e:ui - Run E2E headed:
npm run test:e2e:headed
To run authenticated tests:
- Copy
app/.env.test.exampletoapp/.env.test - Fill in
TEST_USER_EMAILandTEST_USER_PASSWORD - Run tests:
npm run test:e2e
Projects:
chromium-unauth: Tests without authentication (login page, redirects)chromium: Authenticated tests (require valid credentials in.env.test)