This quickstart runs the TypeScript application template against TypeFerry's current application framework.
- Git
- Mise
- Docker with Compose support
The template pins its runtime in template/.mise.toml and uses its own npm project. Run all commands in this guide from template/ unless stated otherwise.
git clone https://github.com/leonardoventurini/typeferry.git
cd typeferry/template
mise install
mise exec -- npm ciThe template installs the published typeferry package from npm. Its lockfile
pins the verified 0.8.0 artifact while the manifest accepts compatible
0.8.x updates.
docker compose up -d mongodbThe local database is a single-node replica set so change streams and transactions work like the production APIs they exercise.
cp .env.server.example .env.serverThe included sample bearer token is a development seam only. Do not deploy it or treat it as an identity system.
mise exec -- npm run developThe development process starts the Node.js server and client development server. The server exposes:
- TypeFerry HTTP RPC at
/__h. - TypeFerry WebSocket transport at
/typeferry-ws. - Health status at
/healthz.
Use the ports printed by the development process. The zero-config defaults are owned by the installed TypeFerry package. See the application framework guide for the complete command contract and optional configuration.
The example flow is:
client/app.tsxcallsuseMethod({ method: 'messages.list' }).server/methods/messages.tsregistersMessagesMethodsunder themessagesnamespace.- TypeFerry dispatches
messages.listwith an authenticatedClientNode. - The method returns EJSON-compatible data to the hook.
- Mutations emit
messages:changed; the hook refreshes authoritative state.
Read server and RPC and React integration to build the same flow in your application.
mise exec -- npm run format:check
mise exec -- npm run lint
mise exec -- npm run typecheck
mise exec -- npm test
mise exec -- npm run buildBrowser tests require Playwright's Chromium dependencies. MongoDB integration tests require the local replica set.
- Understand the application framework
- Configure the TypeScript client
- Define RPC methods
- Replace sample authentication
- Understand event invalidation
- Prepare deployment
For Python or Rust servers, continue with the Python guide or Rust guide.