Skip to content

Latest commit

 

History

41 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CorpoPay Web

CorpoPay

CI CodeQL release License Website Next.js 16 React 19

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.

Architecture

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"]
Loading

Surfaces

  • 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 contract

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/contract

Never hand-edit the generated types, or hand-write domain types, statuses, or money literals.

Quick start

npm install
npm run dev   # :3000 — expects the API at NEXT_PUBLIC_API_URL (default http://localhost:4000)

Verify

npm run typecheck
npm run lint
npm run test

Tech stack

  • Next.js 16 (pages router), React 19, TypeScript
  • Tailwind CSS + shadcn/ui (Radix)
  • TanStack Query, react-hook-form + Zod
  • Vitest

Money & statuses

  • Money — requests are centimes; coerce with toMoney() (lib/money.ts) and format with formatAmount() (lib/utils.ts).
  • Statuses — lib/status.ts mirrors the Prisma enums; use statusVariant() / statusLabel().

License

MIT — see LICENSE.

Contributing

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.

About

Merchant dashboard & admin backoffice for CorpoPay — Next.js 16, React 19, TypeScript, Tailwind. Hosted checkout, paywall relay, and full settlement tooling.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages