Rippling/Deel-style onboarding + autonomous payroll system for Unlink x Monad hackathon.
- Admin onboarding wizard flow (workspace, KYB, treasury, payroll policy, employee invites).
- Employee self-onboarding flow via invite token links.
- Strict payroll-readiness gating:
- identity complete
- employment complete
- tax complete
- managed wallet provisioned
- docs signed
- Checklist hub and blockers.
- AI-style risk scans for onboarding and payroll proposal generation.
- Payroll lifecycle:
- preview
- agent proposal
- finance approval
- execution with retries + circuit breaker
- Biweekly payroll policy (
BIWEEKLY_FRIDAY) with deterministic pay periods. - Earned wage access (EWA):
- accrued availability
- signed withdrawal request
- immediate payout via Unlink on Monad
- payroll-period netting to prevent double payment
- Contractor handshake:
- signed timesheet submit
- employer dispute / contractor resolve
- signed approval with immediate payout
- chain anchoring for state transitions
- Idempotent payout instructions to prevent duplicate payouts.
- Audit trail and agent decision logs.
apps/api: Fastify API with state machines and execution orchestration.apps/web: Next.js frontend for admin, employee, and payroll operations.packages/shared: common types + zod schemas.packages/agent: deterministic AI-assist/risk-flag logic.packages/worker: retrying execution worker logic.
- Install dependencies:
pnpm install- Configure env files:
cp apps/api/.env.example apps/api/.env
cp apps/web/.env.local.example apps/web/.env.localSet NEXT_PUBLIC_ONBOARDING_V2=true (default in example) for the step-through onboarding routes.
- Start API and web:
pnpm dev- API:
http://localhost:4000 - Web:
http://localhost:3000
POST /orgsPOST /orgs/:id/kybPOST /orgs/:id/treasury/setupPOST /orgs/:id/payroll-policyPOST /orgs/:id/employees/inviteGET /onboarding/checklist?orgId=...GET /orgs/:id/onboarding-progressPOST /orgs/:id/onboarding/review
GET /employee-onboarding/:tokenPOST /employee-onboarding/:token/identityPOST /employee-onboarding/:token/employmentPOST /employee-onboarding/:token/taxPOST /employee-onboarding/:token/walletPOST /employee-onboarding/:token/signPOST /employee-onboarding/:token/submit
POST /payroll-runs/previewPOST /payroll-runs/:id/agent-proposalPOST /payroll-runs/:id/approvePOST /payroll-runs/:id/executeGET /payroll-runs/:id
POST /auth/loginPOST /auth/wallet/challengePOST /auth/wallet/verifyGET /auth/me
GET /employees/me/earned-wages?orgId=...&employeeId=...&asOf=YYYY-MM-DDPOST /employees/me/earned-wages/withdrawals?orgId=...GET /employees/me/earned-wages/withdrawals?orgId=...&employeeId=...
POST /orgs/:orgId/contractorsGET /orgs/:orgId/contractorsPOST /contractors/:id/timesheetsPOST /timesheets/:id/disputePOST /timesheets/:id/resolvePOST /timesheets/:id/approveGET /timesheets/:idGET /orgs/:orgId/timesheets
POST /orgs/:id/seed-employeesGET /orgs/:id/auditGET /orgs/:id/onboarding/agent-risks
- Go to
/adminand run steps 1-5. - Open generated employee invite link and complete step-through employee onboarding.
- Back on
/admin, refresh checklist and run AI onboarding risk scan. - Go to
/payroll, paste Org ID, seed employees, create preview, run proposal, approve, and execute. - Inspect run status, receipts, and breaker outcomes.
- Current implementation ships with a mock Unlink adapter (
apps/api/src/services/unlinkService.ts) so the full UX and control plane can be demoed without external credentials. - Adapter interface is aligned to required operations (
createAccount,createMultisig,getBalances,send,waitForConfirmation) so replacing with real SDK calls is localized. - Monad preflight checks enforce token and MON reserve thresholds before payroll, EWA, and contractor payout execution.
- Critical signature actions are hash-anchored through the chain anchor service (Monadic tx hash simulation in this repo).
Run API tests:
pnpm --filter @deeppling/api testCurrent tests cover:
- strict onboarding readiness gates
- preview excludes non-ready employees
- duplicate execution replay safety
- preflight halting on insufficient balances