Tech stack
Runtime & language
- TypeScript ~5.9 across all packages, strict mode via
packages/config/tsconfig.base.json. - Node 22 (see
.nvmrc). - pnpm 9.15 workspaces + Turborepo 2.9.
API — apps/api
- Hono 4.12 on Cloudflare Workers (
wranglerfor local dev + deploy). - Drizzle ORM against Neon Postgres. Two connection factories in
src/db/index.ts:createHyperdriveDb()— production, via Cloudflare Hyperdrive (node-postgres over Hyperdrive binding).createDb()— dev & tests, via Neon HTTP driver.
- Zod for request validation (schemas shared from
@gringo-pay/shared). - Vitest + @cloudflare/vitest-pool-workers for tests.
- Key SDKs:
@privy-io/node— JWT verification via JWKS.viem— on-chain reads (Base) for USDC transfer verification.
- Bindings (see
apps/api/wrangler.toml):HYPERDRIVE— Neon Postgres connection.- Secrets (via
wrangler secret putor env):PRIVY_APP_SECRET,BRIDGE_API_KEY,BRIDGE_WEBHOOK_SECRET,NEON_DB_URL,TEST_NEON_DB_URL,BASE_RPC_URL.
Mobile — apps/mobile
- Expo SDK ~54 with React Native 0.81 and React 19.
- Expo Router 6 (file-based routing under
app/). - NativeWind 4 (Tailwind on React Native).
- @privy-io/expo with SmartWallets for embedded non-custodial signing.
- expo-camera for PIX QR scanning.
- Jest + jest-expo + @testing-library/react-native for tests.
- EAS Build for iOS/Android binaries.
Web — apps/web
- Astro 6 deployed to Cloudflare Pages via
@astrojs/cloudflare. - Currently a single marketing page.
Docs — apps/docs
- Docusaurus 3.9 with the classic preset (TypeScript).
- Deployed to Cloudflare Pages at
https://gringo-pay-docs.pages.devvia.github/workflows/docs.yml.
Shared — packages/shared
- Zod schemas for every API endpoint (request + response) and shared domain types.
- PIX QR parser (
parsePixPayload) and PIX key validators. - Pricing math (
applyGringoSpread,DEFAULT_GRINGO_SPREAD_BPS = 200). - Vitest.
Config — packages/config
- ESLint 10 flat config (
eslint.config.js) withtypescript-eslintandeslint-plugin-import-x. - tsconfig base (
tsconfig.base.json) — strict mode, ES2022, bundler resolution. - Prettier 3.8 defaults.
- Vitest base config.
Third-party services
| Service | Role |
|---|---|
| Privy | Auth (email magic-code + OAuth), embedded wallet, paymaster |
| Bridge | KYC, virtual accounts, USDC↔fiat conversion, PIX off-ramp |
| Neon | Postgres — production + branch DB per PR |
| Cloudflare | Workers (API), Pages (web), Hyperdrive (Postgres pooling) |
| Expo (EAS) | Mobile builds & OTA updates |
| GitHub | Source, CI, Pages hosting for docs |