- Add Stripe and Mercado Pago providers for handling subscriptions. - Create billing repository and access services for managing billing records. - Implement webhook handlers for processing events from Stripe and Mercado Pago. - Add routes for checkout, canceling subscriptions, and retrieving billing status. - Introduce billing status management with appropriate state transitions. - Create tests for billing functionalities including webhook idempotency and provider resolution. - Document the billing module architecture, environment variables, and API endpoints.
43 lines
1.2 KiB
JSON
43 lines
1.2 KiB
JSON
{
|
|
"name": "backend",
|
|
"scripts": {
|
|
"dev": "bun run --hot src/server.ts",
|
|
"start": "bun src/server.ts",
|
|
"build": "tsc -b",
|
|
"test": "bun test --preload ./test/support/prisma.mock.ts ./test",
|
|
"lint": "biome check .",
|
|
"lint:fix": "biome check --write .",
|
|
"format": "biome format --write .",
|
|
"prisma:generate": "prisma generate",
|
|
"prisma:migrate": "prisma migrate dev",
|
|
"prisma:migrate:deploy": "prisma migrate deploy",
|
|
"prisma:seed": "prisma db seed",
|
|
"prisma:seed:reset:plans": "bun prisma/reset-plans.ts"
|
|
},
|
|
"dependencies": {
|
|
"@better-auth/infra": "^0.2.4",
|
|
"@hono/zod-validator": "^0.7.6",
|
|
"@prisma/adapter-pg": "^7.6.0",
|
|
"@prisma/client": "^7",
|
|
"@repo/api-contract": "workspace:*",
|
|
"better-auth": "^1.6.4",
|
|
"dotenv": "^17.4.1",
|
|
"hono": "4.12.10",
|
|
"mailtrap": "^4.5.1",
|
|
"mercadopago": "^3.1.0",
|
|
"nodemailer": "^8.0.5",
|
|
"pg": "^8.20.0",
|
|
"pino": "10.3.1",
|
|
"pino-pretty": "13.1.3",
|
|
"pino-std-serializers": "7.1.0",
|
|
"prisma": "^7",
|
|
"stripe": "^22.2.2",
|
|
"uuid": "^13.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bun": "latest",
|
|
"@types/nodemailer": "^8.0.0",
|
|
"bun-mock-prisma": "^1.2.1"
|
|
}
|
|
}
|