Note
This repository is no longer actively maintained and is provided as-is for reference under the MIT License.
Browser frontend for CorpoPay — Next.js 16 (pages router) + React 19. Four
surfaces: merchant dashboard, admin backoffice, hosted checkout, and the paywall
relay page. Talks to corpopay-api through a generated openapi-fetch client.
flowchart TB
subgraph Surfaces["CorpoPay Web (Next.js)"]
Dashboard["Merchant dashboard"]
Admin["Admin backoffice"]
Checkout["Hosted checkout"]
Paywall["Paywall relay"]
end
Dashboard --> API["corpopay-api"]
Admin --> API
Checkout --> API
Paywall --> API
API --> Stripe["Stripe"]
API --> VPS["VPS / Payzone"]
API --> NAPS["NAPS"]
- Merchant dashboard (
/dashboard/*) — tenants manage payment links, intents, transactions, subscriptions, installments, and provider configs. - Admin backoffice (
/admin/*) — super-admins manage tenants, search payments, monitor webhooks and provider health. - Hosted checkout (
/checkout/:slug) — customer-facing payment page. - Paywall relay (
/pay/:correlationId) — redirects to the provider's paywall.
The API's OpenAPI spec (corpopay-api/src/openapi.ts) is the single source of
truth, published as the @corpopay/contract npm package. The web installs it:
npm install @corpopay/contractNever hand-edit the generated types, or hand-write domain types, statuses, or money literals.
npm install
npm run dev # :3000 — expects the API at NEXT_PUBLIC_API_URL (default http://localhost:4000)npm run typecheck
npm run lint
npm run test- Next.js 16 (pages router), React 19, TypeScript
- Tailwind CSS + shadcn/ui (Radix)
- TanStack Query, react-hook-form + Zod
- Vitest
- Money — requests are centimes; coerce with
toMoney()(lib/money.ts) and format withformatAmount()(lib/utils.ts). - Statuses —
lib/status.tsmirrors the Prisma enums; usestatusVariant()/statusLabel().
MIT — see LICENSE.
Pull requests are welcome. The domain conventions (money, statuses, the contract)
are shared with the API — see the API repo's CONTRIBUTING.md for the rules.
