Project structure
Payofy is a TypeScript monorepo managed with pnpm workspaces and Turborepo. It contains dedicated deployable services, React web applications, and published npm packages under the @payofy/* scope.
Repository layout
The repository separates deployable applications and shared packages into top-level directories:
apps/: Deployable services and applicationsapi/:payofy-apiFastify REST API service (/v1) and Kurv webhook receiverworker/:payofy-workerBullMQ processor for recurring tasks and background jobsadmin/: React operations console for internal staffportal/: React partner portal and hosted merchant dashboard (phase 2)docs/: Public developer documentation site (phase 2)
packages/: Reusable libraries and SDKscore/: Shared backend modules, services, guards, and middlewarecontracts/: Zod request, response, and event schemas with OpenAPI generationdb/: Drizzle schemas, migrations, PostgreSQL RLS policies, and seed scriptskurv/: Isolated payment rail adapter for Kurv API and Collect.jstesting/: Fake Kurv server fixtures and domain test factoriesnode/: Published server SDK for Node.js backendsjs/: Published browser SDK for hosted card fields and tokensreact/: Published React components for embedded paymentsreact-native/: Tap to Pay mobile bridgeui/: Design tokens with Spicyfy orange and UI primitivesconfig/: Shared presets for TypeScript, ESLint, and Vitest
infra/: AWS CDK definitions for VPC, ECS, RDS, Redis, and CloudFrontexamples/: Reference applicationsbudofy-integration/backend/: Node server demonstrating@payofy/nodecallsbudofy-integration/frontend/: React client embedding@payofy/reactwidgets
scripts/: Operational, database, and setup shell automationdocs/: System documentation and architectural decisions
External consumer boundaries
Budofy and Voiceyfy live in separate repositories. They interact with Payofy through @payofy/node on the backend and @payofy/react on the frontend. They do not import server internals or database models directly.