Installation
The packages most application developers need are listed here, along with the way the examples in this repository are assembled.
Runtime requirements
- Node.js 22 or newer
- pnpm 9 or newer
If you want to run PostgreSQL integration tests, you will also need a PostgreSQL instance. The repository uses Docker for that workflow.
Install only what you need
Tango is split into packages so you can adopt it incrementally.
Typical API application
pnpm add zod
pnpm add @danceroutine/tango-config
pnpm add @danceroutine/tango-schema
pnpm add @danceroutine/tango-orm
pnpm add @danceroutine/tango-migrations
pnpm add @danceroutine/tango-resourcesThen install the adapter and database driver for your stack:
pnpm add @danceroutine/tango-adapters-express express
pnpm add better-sqlite3or:
pnpm add @danceroutine/tango-adapters-next next react react-dom
pnpm add better-sqlite3For PostgreSQL:
pnpm add pgTesting support
pnpm add -D @danceroutine/tango-testing vitestOpenAPI document generation
pnpm add @danceroutine/tango-openapiInstall the OpenAPI package when you want the application to publish a machine-readable API document for Swagger UI, client generation, or external tooling.
CLI support
pnpm add -D @danceroutine/tango-cliInstall the CLI package if you want to run tango make:migrations, tango migrate, tango plan, tango status, or tango new inside your application workspace. New Tango applications usually install @danceroutine/tango-cli and @danceroutine/tango-config together so the CLI can infer migration defaults from tango.config.ts.
Package overview
@danceroutine/tango-configexportsdefineConfig,loadConfig, the core config types, and the schemas behindtango.config.ts.@danceroutine/tango-schemaexportsModel,ModelRegistry, and metadata helpers such ast,m,c, andi.@danceroutine/tango-ormexports the transparent runtime,Model.objects,QuerySet,Q, and lower-level query primitives.@danceroutine/tango-migrationsexportsMigration,op,MigrationRunner,MigrationGenerator, and schema diffing support.@danceroutine/tango-resourcesexportsAPIView,Serializer,ModelSerializer, generic CRUD views,ModelViewSet,FilterSet, and paginators.@danceroutine/tango-openapiexports the OpenAPI generator and schema mappers used to publish a machine-readable API description.@danceroutine/tango-testingexports mocks, factories, integration harnesses, and Vitest helpers.@danceroutine/tango-cliexports thetangoexecutable plus the programmatic module-composition API behind it.
Install from a local clone
If you are working from a local clone of Tango:
pnpm install
pnpm buildThat builds all workspace packages and makes the examples and docs runnable from the local workspace.
Verify the installation
These commands are the quickest sanity check:
pnpm typecheck
pnpm testIf you want the full integration matrix:
pnpm test:integration:allChoose an example application
If you are deciding where to start:
- Use the Express blog example if you want to see the entire stack in a conventional JSON API.
- Use the Next.js example if you want to see Tango inside App Router route handlers.
The example package scripts are already configured:
@danceroutine/tango-example-express-blog-api@danceroutine/tango-example-nextjs-blog