Welcome to Roja Developer Docs
Roja is a Nigerian peer-to-peer (P2P) lending platform connecting borrowers with lenders through tickets—structured, transparent loan requests and offers—supported by multi-tier KYC verification, direct-debit repayment mandates, and the proprietary Roja Score.
Whether you are an engineer contributing to the Roja monorepo or a partner integrating with the Roja API, this portal at docs.roja.dev provides the complete engineering handbook and API specifications.
Codebase & Engineering Handbook
Deep-dive into the monorepo architecture, development workflows, financial invariants, and production operations.
Monorepo layout, Go strict-server design, tech stack matrix, and FCCPC compliance rules.
Local DevelopmentContainer-free local dev with Nix flakes, Atlas migrations, and Taskfile workflows.
Financial Safety & LedgerDouble-entry audit mirror, chart of accounts, decimal precision, and reconciliation.
Domain Models & LifecyclesTickets marketplace, loan amortization, multi-tier KYC pipeline, scoring, and collections.
Web, Staff & MobileNext.js App Router, Staff dashboard, Expo React Native, @roja/common, and Storybook.
Asynq queues, transactional outbox pattern, pprof/Pyroscope profiling, and Flux GitOps.
Platform Domain Guides
Understand how Roja's primary financial primitives operate from the user and API perspectives.
Create borrow or lend tickets, negotiate counter-offers, and match counterparties.
Loan Engine & SettlementAccepted tickets to disbursement, repayment amortization schedules, and settlement sagas.
Identity Verification (KYC)NIN and BVN paired lookups, selfie liveness checks, and address verification.
Bank Linking & MandatesOpen Banking account resolution and automated direct-debit collection mandates.
API Integration & Quickstart
Integrate against the unified REST API powering all Roja surfaces.
Authenticate and make your first API call in under five minutes.
Authentication & 2FALog in, handle two-factor TOTP challenges, and refresh JWT access tokens.
API ReferenceInteractive OpenAPI endpoint documentation with cURL, Node.js, Python, and Go snippets.
EnvironmentsBase URLs for production (api.getroja.com) and staging (api.roja.dev), plus versioning.
Architecture Principles at a Glance
- Base URL —
https://api.getroja.comin production,https://api.roja.devin staging, with all routes versioned under/v1. - OpenAPI Contract — Hand-authored in
backend/spec/, generating strict Go server interfaces and the TypeScript client SDK. - Money Safety — All monetary values cross the wire as exact decimal strings (e.g.
{"amount": "50000.00", "currency": "NGN"}). Floats are strictly prohibited. - Idempotency — Write endpoints that move money require an
Idempotency-Keyheader to prevent double disbursements or duplicate repayments. - Zero-Container Local Dev — Local services run natively via Nix flakes (
nix run .#servicesornix run .#dev).
Need developer support or security escalation? Reach our team at support@getroja.com.