Quickstart
Run the example applications in this repository to inspect Tango in a working project before you start building your own app.
Prerequisites
- Node.js 22 or newer
- pnpm 9 or newer
- this repository checked out locally
pnpm installRun the Express example
The Express example is the fastest way to see the full Tango stack in one place: models, serializers, migrations, viewsets, filtering, pagination, and an adapter.
pnpm --filter @danceroutine/tango-example-express-blog-api bootstrap
pnpm --filter @danceroutine/tango-example-express-blog-api devThen open:
http://localhost:3000/healthhttp://localhost:3000/api/posts?limit=20&offset=0http://localhost:3000/api/posts?published=true&ordering=-createdAt
If you want to inspect the example code after it is running, start with the model, serializer, viewset, and generic view used for posts and users.
Run the Next.js example
The Next.js example shows the same Tango primitives used inside App Router route handlers instead of Express.
pnpm --filter @danceroutine/tango-example-nextjs-blog bootstrap
pnpm --filter @danceroutine/tango-example-nextjs-blog devThen open:
http://localhost:3001/http://localhost:3001/api/posts?limit=20&offset=0
If you want to inspect the example code after it is running, start with the model definitions, the serializer, the post viewset, and the detail API view.
What to look for
As you browse the examples, keep this sequence in mind:
- A model definition describes shape and schema metadata.
- A serializer defines the create, update, and output contract for the HTTP boundary.
- A migration keeps the database schema aligned with the model metadata.
- A view class or viewset turns model-backed resource behavior into HTTP endpoints.
- An adapter connects those view classes to Express or Next.js.