<aside> 🧠

This page provides a technical overview of the Sharpei platform for engineering teams, architects, and technical stakeholders evaluating or integrating with the platform.

</aside>


System Overview

Sharpei is a B2B AI-native equipment financing platform. Lenders deploy it as their operating system for vendor channel management, application processing, underwriting, and portfolio monitoring. Every stage is augmented by purpose-built AI agents.

High-Level Architecture

Platform Architecture

Platform Architecture


Tech Stack

Layer Technology Purpose
Frontend React 18, Vite, TypeScript, Tailwind, Radix UI Single-page application with RBAC
State TanStack React Query Server state, caching, real-time sync
Backend NestJS 11, Express 5, TypeScript REST API, event processing, agent orchestration
Database PostgreSQL 15, Drizzle ORM Primary datastore with type-safe queries
Auth JWT-based Auth + RLS Authentication, RBAC, multi-tenancy
AI Proprietary AI Engine (multi-model) 5 AI agents, chat assistant, document analysis
Integrations Sharpei Connect (proprietary) OAuth management, token refresh, API proxy
Infrastructure AWS Lambda, API Gateway, Amplify, Terraform Serverless deployment, IaC

Key Design Decisions

Fully Serverless

The API runs on AWS Lambda — auto-scales per request, zero capacity planning, pay-per-use. API Gateway handles routing, Lambda handles compute. No servers to manage or patch.

Multi-Tenancy via RLS

Every table has an org_id column. PostgreSQL Row-Level Security ensures one lender can never access another's data — enforced at the database engine level, not just application code.

Token Claims as the Trust Boundary

Auth tokens carry organization, role, and vendor scope. These claims are: