serverpod-endpoints

Official

Define RPC endpoints that clients can call.

Authorserverpod
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It removes the friction of building and wiring server RPC endpoints by letting you define typed endpoint methods that automatically become callable client APIs.

Core Features & Use Cases

  • Typed endpoint definitions: Extend Endpoint and write methods that accept a Session plus strongly typed parameters, returning Future<T> (or Stream<T> for real-time).
  • Client code generation: Use the class name to generate a consistent client API, so calling an endpoint feels like calling a local method.
  • Safe parameter/return modeling: Support primitives, common standard types (e.g., DateTime, Uri), generated serializable models, and strictly typed collections/records for end-to-end serialization.
  • Session-centered design: Use session for database access (session.db, model DB helpers), caching, logging, and request context without leaking it beyond the request lifecycle.
  • Codegen controls and evolution: Exclude endpoints or methods with @doNotGenerate, and preserve backward compatibility by not renaming or breaking existing signatures while using versioned endpoints when changes are unavoidable.
  • Use case: You want a Flutter client to authenticate and fetch domain data; define an endpoint method like Future<UserProfile> getProfile(Session session, String userId) and then call it from the generated client as await client.user.getProfile(userId).

Quick Start

Create a Dart class extending Endpoint under your server lib/ directory, define an async method whose first parameter is Session and whose return type is Future of your result model.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: serverpod-endpoints
Download link: https://github.com/serverpod/serverpod/archive/main.zip#serverpod-endpoints

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.