How jvsleal-dev/puma-bot works
Puma Bot is a Telegram-and-PIX subscription SaaS: operators configure bots, VIP groups, payment gateways and sales flows; buyers interact with a bot, pay by PIX, and receive VIP access. The main domain stages are bot-led plan selection and charge creation, payment confirmation and access fulfillment, then subscription expiry and renewal. The dashboard, finance, customer and remarketing areas provide operational oversight. Service and persistence layers sit behind the routes. The README describes the product at a high level; several route and integration implementations are listed in the tree but were not sampled, so their connections are not inferred.
Main entry points: prisma.ts Prisma Store · pix-service.ts PIX Fulfillment · telegram-service.ts Bot Funnel · repositories.ts Domain Repositories
Components 21
Operator Console
- Landing and Auth
src/routes/+page.svelte - Dashboard Metrics
src/routes/dashboard/+page.server.ts - Financial Ledger
src/routes/financeiro/+page.server.ts - Platform Admin
src/routes/admin/+page.server.ts - Customer Management
src/routes/clientes - Bot Management
src/routes/robos - VIP Groups
src/routes/grupos/+page.server.ts - Sales Flows
src/routes/fluxos - Gateway Settings
src/routes/gateways - Remarketing
src/routes/remarketing/+page.server.ts
Routes and Webhooks
- Telegram Webhook
src/routes/api/webhook/telegram/[botId]/+server.ts - PIX Webhook
src/routes/api/webhook/pix/+server.ts - Auth Endpoints
src/routes/api/auth
Subscription Services
- PIX Fulfillment
src/lib/services/pix-service.ts - Bot Funnel
src/lib/services/telegram-service.ts - Subscription Lifecycle
src/lib/services/subscription-service.ts
Persistence and Integrations
- Domain Repositories
src/lib/domain/repositories.ts - Prisma Store
src/lib/server/prisma.ts - PIX Providers
src/lib/server/pix-gateway.ts - Telegram API
src/lib/server/telegram.ts
Other components
- Operator
Connections 16
- Operator → Landing and Auth: visits
README.md - Operator → Dashboard Metrics: views metrics
README.md - Dashboard Metrics → Prisma Store: queries sales and bots
src/routes/dashboard/+page.server.ts - Financial Ledger → Prisma Store: queries ledger
src/routes/financeiro/+page.server.ts - Platform Admin → Prisma Store: queries and updates
src/routes/admin/+page.server.ts - VIP Groups → Prisma Store: queries groups
src/routes/grupos/+page.server.ts - Remarketing → Prisma Store: queries leads
src/routes/remarketing/+page.server.ts - Telegram Webhook → Bot Funnel: dispatches updates
- PIX Webhook → Telegram API: sends access messages
src/routes/api/webhook/pix/+server.ts - Bot Funnel → PIX Fulfillment: creates charges
src/lib/services/telegram-service.ts - Bot Funnel → Domain Repositories: uses contracts
src/lib/services/telegram-service.ts - PIX Fulfillment → Domain Repositories: uses contracts
src/lib/services/pix-service.ts - PIX Fulfillment → PIX Providers: creates PIX charge
src/lib/services/pix-service.ts - PIX Fulfillment → Telegram API: delivers VIP access
src/lib/services/pix-service.ts - Subscription Lifecycle → Bot Funnel: evicts and renews
src/lib/services/subscription-service.ts - Subscription Lifecycle → Domain Repositories: uses contracts
src/lib/services/subscription-service.ts