Surplus logo
Surplus Docsby Sharing Excess
GuidesDevelopersShared packages

Shared packages

These packages are imported from apps/* and crons/*. They stay free of product-specific UI and avoid reading process.env except where a file is an explicit CLI entry point (see docs/architecture.md).

PackageRole
@surplus/contractsORPC procedure definitions consumed by client and server
@surplus/typesZod schemas + inferred TypeScript types for domain entities
@surplus/postgresDrizzle schema, query helpers, Neon client factory
@surplus/servicesDomain service classes (business rules, transactions)
@surplus/utilsPure utilities and shared constants
@surplus/redisRedis / Upstash client factory
@surplus/sharedDepsCurated re-exports to keep dependency versions aligned

Child pages document types and postgres in a bit more depth.

On this page