Skip to content

puneetdixit200/Multi-Currency-Payment-Processing-API

Repository files navigation

PayFlow

PayFlow is a Next.js and Supabase payment workflow sandbox for merchant transfers, payment requests, approvals, FX conversion, settlements, and compliance-grade audit trails, designed for Vercel deployment with Supabase Auth, Postgres, RLS, and a mock provider adapter.

The previous multi-app structure has been removed from the active app shape. Current development happens from the repository root.

Runtime

  • Node.js >=20.19.0
  • npm

The Node requirement matches the Next.js 16 baseline used by this project.

Stack

  • Next.js App Router with TypeScript
  • Supabase Auth, Postgres, and RLS
  • Vercel hosting and cron jobs
  • Mock provider adapter for local payment workflow development
  • React and Tailwind CSS
  • Vitest for unit tests
  • Playwright for e2e smoke tests

Getting Started

Install dependencies:

npm install

Create local environment variables:

cp .env.example .env.local

For local Supabase development, start Supabase with the configuration in supabase/config.toml, then replace the publishable and secret key placeholders in .env.local with values from your local Supabase project.

Start the development server:

npm run dev

Open http://localhost:3000.

Deployment Notes

The required Vercel cron contract keeps /api/cron/fx-refresh on the hourly schedule 0 * * * *. Hourly cron requires Vercel Pro or Enterprise; Hobby users must change that schedule to daily or disable hourly FX refresh before deploying. Vercel Cron invokes route handlers with HTTP GET, so future cron routes should implement GET handlers and validate CRON_SECRET before running scheduled work.

Scripts

npm run dev        # Start Next.js locally
npm run build      # Build the app
npm run start      # Start a production build
npm run lint       # Run ESLint
npm run typecheck  # Run TypeScript checks
npm run test       # Run Vitest unit tests
npm run test:e2e   # Run Playwright e2e tests
npm run verify     # Typecheck, lint, unit test, and build

Project Shape

  • src/app/ contains the root Next.js App Router entry points.
  • src/test/setup.ts configures unit test setup.
  • tests/unit/ contains Vitest tests.
  • tests/e2e/ contains Playwright tests.

Supabase schema, authentication, and payment workflows will be added in later migration tasks.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors