- CRM: configurable pipeline (default: New → Contact → Meeting → Negotiation → Connected / Lost), drag-and-drop board, lead card with call/meeting/note history, photos and files, tasks with Telegram reminders at the due time, map of venues (OpenStreetMap via Leaflet), lost reason. Sales reps see only their own leads. - "Connected" in one click: a venue becomes a club card partner with a one-time owner link to the work bot; an agency gets a code and a client link. The sales rep is recorded on the partner for the bonus. - Sales bonus formula in settings (per venue, per agency, % of revenue from the rep's agency clients for N months); defaults are 0 until the owner sets them. - Agencies (superadmin): clients, gift subscriptions, reward by month, payouts, client link, edit. Venues: offers by membership level (5 languages), staff, card checks, 8-week activity, owner link, map point. - Schema: SalesStage/SalesLead/SalesActivity/SalesTask; salesId on Agency and Partner; lat/lng/phone/note on Partner; agencyId on Payout. - Tests for stage rules, conversion, task reminders and bonus; dev:crm-demo. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
43 lines
1.2 KiB
JSON
43 lines
1.2 KiB
JSON
{
|
|
"name": "@barev/api",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"exports": {
|
|
".": "./src/router.ts",
|
|
"./telegram": "./src/auth/telegram.ts"
|
|
},
|
|
"scripts": {
|
|
"dev": "tsx watch --clear-screen=false src/server.ts",
|
|
"start": "tsx src/server.ts",
|
|
"test": "vitest run",
|
|
"typecheck": "tsc --noEmit",
|
|
"dev:initdata": "tsx scripts/dev-initdata.ts",
|
|
"dev:demo": "tsx scripts/dev-demo.ts",
|
|
"dev:bo-demo": "tsx scripts/dev-backoffice-demo.ts",
|
|
"dev:chats-demo": "tsx scripts/dev-chats-demo.ts",
|
|
"dev:crm-demo": "tsx scripts/dev-crm-demo.ts"
|
|
},
|
|
"dependencies": {
|
|
"@aws-sdk/client-s3": "^3.1152.0",
|
|
"@aws-sdk/s3-request-presigner": "^3.1152.0",
|
|
"@barev/core": "workspace:*",
|
|
"@barev/db": "workspace:*",
|
|
"@barev/services": "workspace:*",
|
|
"@fastify/cookie": "^11.0.0",
|
|
"@fastify/cors": "^11.1.0",
|
|
"@fastify/multipart": "^10.0.0",
|
|
"@node-rs/argon2": "^2.0.2",
|
|
"@sentry/node": "^10.0.0",
|
|
"@trpc/server": "^11.19.0",
|
|
"dotenv": "^17.0.0",
|
|
"fastify": "^5.12.0",
|
|
"superjson": "^2.2.6",
|
|
"zod": "^4.3.0"
|
|
},
|
|
"devDependencies": {
|
|
"tsx": "^4.20.0",
|
|
"vitest": "^4.1.0"
|
|
}
|
|
}
|