diff --git a/docs/docs/00100-intro/00200-quickstarts/00150-nextjs.md b/docs/docs/00100-intro/00200-quickstarts/00150-nextjs.md
new file mode 100644
index 00000000000..762dbc2f93a
--- /dev/null
+++ b/docs/docs/00100-intro/00200-quickstarts/00150-nextjs.md
@@ -0,0 +1,201 @@
+---
+title: Next.js Quickstart
+sidebar_label: Next.js
+slug: /quickstarts/nextjs
+hide_table_of_contents: true
+---
+
+import { InstallCardLink } from "@site/src/components/InstallCardLink";
+import { StepByStep, Step, StepText, StepCode } from "@site/src/components/Steps";
+
+
+Get a SpacetimeDB Next.js app running in under 5 minutes.
+
+## Prerequisites
+
+- [Node.js](https://nodejs.org/) 18+ installed
+- [SpacetimeDB CLI](https://spacetimedb.com/install) installed
+
+
+
+---
+
+
+
+
+ Run the `spacetime dev` command to create a new project with a SpacetimeDB module and Next.js client.
+
+ This will start the local SpacetimeDB server, publish your module, generate TypeScript bindings, and start the Next.js development server.
+
+
+```bash
+spacetime dev --template nextjs-ts my-nextjs-app
+```
+
+
+
+
+
+ Navigate to [http://localhost:3001](http://localhost:3001) to see your app running.
+
+ Note: The Next.js dev server runs on port 3001 to avoid conflict with SpacetimeDB on port 3000.
+
+
+
+
+
+ Your project contains both server and client code using the Next.js App Router.
+
+ Edit `spacetimedb/src/index.ts` to add tables and reducers. Edit `app/page.tsx` to build your UI.
+
+
+```
+my-nextjs-app/
+├── spacetimedb/ # Your SpacetimeDB module
+│ └── src/
+│ └── index.ts # Server-side logic
+├── app/ # Next.js App Router
+│ ├── layout.tsx # Root layout with providers
+│ ├── page.tsx # Home page
+│ └── providers.tsx # SpacetimeDB provider (client component)
+├── src/
+│ └── module_bindings/ # Auto-generated types
+└── package.json
+```
+
+
+
+
+
+ Open `spacetimedb/src/index.ts` to see the module code. The template includes a `person` table and two reducers: `add` to insert a person, and `say_hello` to greet everyone.
+
+ Tables store your data. Reducers are functions that modify data — they're the only way to write to the database.
+
+
+```typescript
+import { schema, table, t } from 'spacetimedb/server';
+
+export const spacetimedb = schema(
+ table(
+ { name: 'person', public: true },
+ {
+ name: t.string(),
+ }
+ )
+);
+
+spacetimedb.reducer('add', { name: t.string() }, (ctx, { name }) => {
+ ctx.db.person.insert({ name });
+});
+
+spacetimedb.reducer('say_hello', (ctx) => {
+ for (const person of ctx.db.person.iter()) {
+ console.info(`Hello, ${person.name}!`);
+ }
+ console.info('Hello, World!');
+});
+```
+
+
+
+
+
+ Use the SpacetimeDB CLI to call reducers and query your data directly.
+
+
+```bash
+# Call the add reducer to insert a person
+spacetime call my-nextjs-app add Alice
+
+# Query the person table
+spacetime sql my-nextjs-app "SELECT * FROM person"
+ name
+---------
+ "Alice"
+
+# Call say_hello to greet everyone
+spacetime call my-nextjs-app say_hello
+
+# View the module logs
+spacetime logs my-nextjs-app
+2025-01-13T12:00:00.000000Z INFO: Hello, Alice!
+2025-01-13T12:00:00.000000Z INFO: Hello, World!
+```
+
+
+
+
+
+ SpacetimeDB is client-side only — it cannot run during server-side rendering. The `app/providers.tsx` file uses the `"use client"` directive and wraps your app with `SpacetimeDBProvider`.
+
+ The template uses environment variables for configuration. Set `NEXT_PUBLIC_SPACETIMEDB_URI` and `NEXT_PUBLIC_SPACETIMEDB_MODULE` to override defaults.
+
+
+```tsx
+// app/providers.tsx
+'use client';
+
+import { useMemo } from 'react';
+import { SpacetimeDBProvider } from 'spacetimedb/react';
+import { DbConnection } from '../src/module_bindings';
+
+const URI = process.env.NEXT_PUBLIC_SPACETIMEDB_URI ?? 'ws://localhost:3000';
+const MODULE = process.env.NEXT_PUBLIC_SPACETIMEDB_MODULE ?? 'my-nextjs-app';
+
+export function Providers({ children }: { children: React.ReactNode }) {
+ const connectionBuilder = useMemo(() =>
+ DbConnection.builder()
+ .withUri(URI)
+ .withModuleName(MODULE),
+ []
+ );
+
+ return (
+
+ {children}
+
+ );
+}
+```
+
+
+
+
+
+ In your page components, use `useTable` to subscribe to table data and `useReducer` to call reducers. All components using these hooks must have the `"use client"` directive.
+
+
+```tsx
+// app/page.tsx
+'use client';
+
+import { tables, reducers } from '../src/module_bindings';
+import { useTable, useReducer } from 'spacetimedb/react';
+
+export default function Home() {
+ // Subscribe to table data - returns [rows, isLoading]
+ const [people] = useTable(tables.person);
+
+ // Get a function to call a reducer
+ const addPerson = useReducer(reducers.add);
+
+ const handleAdd = () => {
+ // Call reducer with object syntax
+ addPerson({ name: 'Alice' });
+ };
+
+ return (
+
+ {people.map((person, i) => - {person.name}
)}
+
+ );
+}
+```
+
+
+
+
+## Next steps
+
+- See the [Chat App Tutorial](/tutorials/chat-app) for a complete example
+- Read the [TypeScript SDK Reference](/sdks/typescript) for detailed API docs
diff --git a/templates/nextjs-ts/.template.json b/templates/nextjs-ts/.template.json
new file mode 100644
index 00000000000..19b5fb62be2
--- /dev/null
+++ b/templates/nextjs-ts/.template.json
@@ -0,0 +1,5 @@
+{
+ "description": "Next.js App Router with TypeScript server",
+ "client_lang": "typescript",
+ "server_lang": "typescript"
+}
diff --git a/templates/nextjs-ts/LICENSE b/templates/nextjs-ts/LICENSE
new file mode 100644
index 00000000000..039e117dde2
--- /dev/null
+++ b/templates/nextjs-ts/LICENSE
@@ -0,0 +1 @@
+../../licenses/apache2.txt
\ No newline at end of file
diff --git a/templates/nextjs-ts/app/globals.css b/templates/nextjs-ts/app/globals.css
new file mode 100644
index 00000000000..7eec9bcc880
--- /dev/null
+++ b/templates/nextjs-ts/app/globals.css
@@ -0,0 +1,28 @@
+* {
+ box-sizing: border-box;
+ padding: 0;
+ margin: 0;
+}
+
+html,
+body {
+ max-width: 100vw;
+ overflow-x: hidden;
+}
+
+body {
+ color: #333;
+ background: #fafafa;
+}
+
+a {
+ color: inherit;
+ text-decoration: none;
+}
+
+@media (prefers-color-scheme: dark) {
+ body {
+ color: #eee;
+ background: #111;
+ }
+}
diff --git a/templates/nextjs-ts/app/layout.tsx b/templates/nextjs-ts/app/layout.tsx
new file mode 100644
index 00000000000..200d42f58d3
--- /dev/null
+++ b/templates/nextjs-ts/app/layout.tsx
@@ -0,0 +1,22 @@
+import type { Metadata } from 'next';
+import { Providers } from './providers';
+import './globals.css';
+
+export const metadata: Metadata = {
+ title: 'SpacetimeDB Next.js App',
+ description: 'A Next.js app powered by SpacetimeDB',
+};
+
+export default function RootLayout({
+ children,
+}: {
+ children: React.ReactNode;
+}) {
+ return (
+
+
+ {children}
+
+
+ );
+}
diff --git a/templates/nextjs-ts/app/page.tsx b/templates/nextjs-ts/app/page.tsx
new file mode 100644
index 00000000000..3f1951648f5
--- /dev/null
+++ b/templates/nextjs-ts/app/page.tsx
@@ -0,0 +1,71 @@
+'use client';
+
+import { useState } from 'react';
+import { tables, reducers } from '../src/module_bindings';
+import { useSpacetimeDB, useTable, useReducer } from 'spacetimedb/react';
+
+export default function Home() {
+ const [name, setName] = useState('');
+
+ const conn = useSpacetimeDB();
+ const { isActive: connected } = conn;
+
+ // Subscribe to all people in the database
+ // useTable returns [rows, isLoading] tuple
+ const [people] = useTable(tables.person);
+
+ const addReducer = useReducer(reducers.add);
+
+ const addPerson = (e: React.FormEvent) => {
+ e.preventDefault();
+ if (!name.trim() || !connected) return;
+
+ // Call the add reducer with object syntax
+ addReducer({ name: name });
+ setName('');
+ };
+
+ return (
+
+ SpacetimeDB Next.js App
+
+
+ Status:{' '}
+
+ {connected ? 'Connected' : 'Disconnected'}
+
+
+
+
+
+
+
People ({people.length})
+ {people.length === 0 ? (
+
No people yet. Add someone above!
+ ) : (
+
+ {people.map((person, index) => (
+ - {person.name}
+ ))}
+
+ )}
+
+
+ );
+}
diff --git a/templates/nextjs-ts/app/providers.tsx b/templates/nextjs-ts/app/providers.tsx
new file mode 100644
index 00000000000..bc4ec9bf028
--- /dev/null
+++ b/templates/nextjs-ts/app/providers.tsx
@@ -0,0 +1,51 @@
+'use client';
+
+import { useMemo } from 'react';
+import { SpacetimeDBProvider } from 'spacetimedb/react';
+import { DbConnection, ErrorContext } from '../src/module_bindings';
+import { Identity } from 'spacetimedb';
+
+const HOST = process.env.NEXT_PUBLIC_SPACETIMEDB_HOST ?? 'ws://localhost:3000';
+const DB_NAME = process.env.NEXT_PUBLIC_SPACETIMEDB_DB_NAME ?? 'nextjs-ts';
+
+const onConnect = (_conn: DbConnection, identity: Identity, token: string) => {
+ if (typeof window !== 'undefined') {
+ localStorage.setItem('auth_token', token);
+ }
+ console.log(
+ 'Connected to SpacetimeDB with identity:',
+ identity.toHexString()
+ );
+};
+
+const onDisconnect = () => {
+ console.log('Disconnected from SpacetimeDB');
+};
+
+const onConnectError = (_ctx: ErrorContext, err: Error) => {
+ console.log('Error connecting to SpacetimeDB:', err);
+};
+
+export function Providers({ children }: { children: React.ReactNode }) {
+ const connectionBuilder = useMemo(
+ () =>
+ DbConnection.builder()
+ .withUri(HOST)
+ .withModuleName(DB_NAME)
+ .withToken(
+ typeof window !== 'undefined'
+ ? localStorage.getItem('auth_token') || undefined
+ : undefined
+ )
+ .onConnect(onConnect)
+ .onDisconnect(onDisconnect)
+ .onConnectError(onConnectError),
+ []
+ );
+
+ return (
+
+ {children}
+
+ );
+}
diff --git a/templates/nextjs-ts/next.config.ts b/templates/nextjs-ts/next.config.ts
new file mode 100644
index 00000000000..577a42a673d
--- /dev/null
+++ b/templates/nextjs-ts/next.config.ts
@@ -0,0 +1,8 @@
+import type { NextConfig } from 'next';
+
+const nextConfig: NextConfig = {
+ // Next.js configuration
+ // Note: Use port 3001 (via npm scripts) to avoid conflict with SpacetimeDB on port 3000
+};
+
+export default nextConfig;
diff --git a/templates/nextjs-ts/package.json b/templates/nextjs-ts/package.json
new file mode 100644
index 00000000000..448bc449e1a
--- /dev/null
+++ b/templates/nextjs-ts/package.json
@@ -0,0 +1,28 @@
+{
+ "name": "@clockworklabs/nextjs-ts",
+ "private": true,
+ "version": "0.0.1",
+ "type": "module",
+ "scripts": {
+ "dev": "next dev -p 3001",
+ "build": "next build",
+ "start": "next start -p 3001",
+ "lint": "next lint",
+ "generate": "pnpm --dir spacetimedb install --ignore-workspace && cargo run -p gen-bindings -- --out-dir src/module_bindings --project-path spacetimedb && prettier --write src/module_bindings",
+ "spacetime:generate": "spacetime generate --lang typescript --out-dir src/module_bindings --project-path spacetimedb",
+ "spacetime:publish:local": "spacetime publish --project-path spacetimedb --server local",
+ "spacetime:publish": "spacetime publish --project-path spacetimedb --server maincloud"
+ },
+ "dependencies": {
+ "next": "^15.0.0",
+ "react": "^18.3.1",
+ "react-dom": "^18.3.1",
+ "spacetimedb": "workspace:*"
+ },
+ "devDependencies": {
+ "@types/node": "^20",
+ "@types/react": "^18.3.18",
+ "@types/react-dom": "^18.3.5",
+ "typescript": "~5.6.2"
+ }
+}
diff --git a/templates/nextjs-ts/spacetimedb/package.json b/templates/nextjs-ts/spacetimedb/package.json
new file mode 100644
index 00000000000..214ccc569bf
--- /dev/null
+++ b/templates/nextjs-ts/spacetimedb/package.json
@@ -0,0 +1,15 @@
+{
+ "name": "spacetime-module",
+ "version": "1.0.0",
+ "description": "",
+ "scripts": {
+ "build": "spacetime build",
+ "publish": "spacetime publish"
+ },
+ "keywords": [],
+ "author": "",
+ "license": "ISC",
+ "dependencies": {
+ "spacetimedb": "1.*"
+ }
+}
diff --git a/templates/nextjs-ts/spacetimedb/src/index.ts b/templates/nextjs-ts/spacetimedb/src/index.ts
new file mode 100644
index 00000000000..3a5ddbc8257
--- /dev/null
+++ b/templates/nextjs-ts/spacetimedb/src/index.ts
@@ -0,0 +1,33 @@
+import { schema, table, t } from 'spacetimedb/server';
+
+export const spacetimedb = schema(
+ table(
+ { name: 'person', public: true },
+ {
+ name: t.string(),
+ }
+ )
+);
+
+spacetimedb.init(_ctx => {
+ // Called when the module is initially published
+});
+
+spacetimedb.clientConnected(_ctx => {
+ // Called every time a new client connects
+});
+
+spacetimedb.clientDisconnected(_ctx => {
+ // Called every time a client disconnects
+});
+
+spacetimedb.reducer('add', { name: t.string() }, (ctx, { name }) => {
+ ctx.db.person.insert({ name });
+});
+
+spacetimedb.reducer('say_hello', ctx => {
+ for (const person of ctx.db.person.iter()) {
+ console.info(`Hello, ${person.name}!`);
+ }
+ console.info('Hello, World!');
+});
diff --git a/templates/nextjs-ts/spacetimedb/tsconfig.json b/templates/nextjs-ts/spacetimedb/tsconfig.json
new file mode 100644
index 00000000000..812c3b98cb1
--- /dev/null
+++ b/templates/nextjs-ts/spacetimedb/tsconfig.json
@@ -0,0 +1,12 @@
+{
+ "compilerOptions": {
+ "target": "ES2020",
+ "module": "ESNext",
+ "moduleResolution": "node",
+ "strict": true,
+ "esModuleInterop": true,
+ "skipLibCheck": true,
+ "outDir": "./dist"
+ },
+ "include": ["src/**/*"]
+}
diff --git a/templates/nextjs-ts/src/module_bindings/add_reducer.ts b/templates/nextjs-ts/src/module_bindings/add_reducer.ts
new file mode 100644
index 00000000000..85081559c7d
--- /dev/null
+++ b/templates/nextjs-ts/src/module_bindings/add_reducer.ts
@@ -0,0 +1,15 @@
+// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
+// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
+
+/* eslint-disable */
+/* tslint:disable */
+import {
+ TypeBuilder as __TypeBuilder,
+ t as __t,
+ type AlgebraicTypeType as __AlgebraicTypeType,
+ type Infer as __Infer,
+} from 'spacetimedb';
+
+export default {
+ name: __t.string(),
+};
diff --git a/templates/nextjs-ts/src/module_bindings/index.ts b/templates/nextjs-ts/src/module_bindings/index.ts
new file mode 100644
index 00000000000..bc073933509
--- /dev/null
+++ b/templates/nextjs-ts/src/module_bindings/index.ts
@@ -0,0 +1,135 @@
+// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
+// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
+
+// This was generated using spacetimedb cli version 1.11.2 (commit dc5997d48f7c472faf2756b07c012bcf28edc50b).
+
+/* eslint-disable */
+/* tslint:disable */
+import {
+ DbConnectionBuilder as __DbConnectionBuilder,
+ DbConnectionImpl as __DbConnectionImpl,
+ SubscriptionBuilderImpl as __SubscriptionBuilderImpl,
+ TypeBuilder as __TypeBuilder,
+ Uuid as __Uuid,
+ convertToAccessorMap as __convertToAccessorMap,
+ procedureSchema as __procedureSchema,
+ procedures as __procedures,
+ reducerSchema as __reducerSchema,
+ reducers as __reducers,
+ schema as __schema,
+ t as __t,
+ table as __table,
+ type AlgebraicTypeType as __AlgebraicTypeType,
+ type DbConnectionConfig as __DbConnectionConfig,
+ type ErrorContextInterface as __ErrorContextInterface,
+ type Event as __Event,
+ type EventContextInterface as __EventContextInterface,
+ type Infer as __Infer,
+ type ReducerEventContextInterface as __ReducerEventContextInterface,
+ type RemoteModule as __RemoteModule,
+ type SubscriptionEventContextInterface as __SubscriptionEventContextInterface,
+ type SubscriptionHandleImpl as __SubscriptionHandleImpl,
+} from 'spacetimedb';
+
+// Import and reexport all reducer arg types
+import OnConnectReducer from './on_connect_reducer';
+export { OnConnectReducer };
+import OnDisconnectReducer from './on_disconnect_reducer';
+export { OnDisconnectReducer };
+import AddReducer from './add_reducer';
+export { AddReducer };
+import SayHelloReducer from './say_hello_reducer';
+export { SayHelloReducer };
+
+// Import and reexport all procedure arg types
+
+// Import and reexport all table handle types
+import PersonRow from './person_table';
+export { PersonRow };
+
+// Import and reexport all types
+import Person from './person_type';
+export { Person };
+
+/** The schema information for all tables in this module. This is defined the same was as the tables would have been defined in the server. */
+const tablesSchema = __schema(
+ __table(
+ {
+ name: 'person',
+ indexes: [],
+ constraints: [],
+ },
+ PersonRow
+ )
+);
+
+/** The schema information for all reducers in this module. This is defined the same way as the reducers would have been defined in the server, except the body of the reducer is omitted in code generation. */
+const reducersSchema = __reducers(
+ __reducerSchema('add', AddReducer),
+ __reducerSchema('say_hello', SayHelloReducer)
+);
+
+/** The schema information for all procedures in this module. This is defined the same way as the procedures would have been defined in the server. */
+const proceduresSchema = __procedures();
+
+/** The remote SpacetimeDB module schema, both runtime and type information. */
+const REMOTE_MODULE = {
+ versionInfo: {
+ cliVersion: '1.11.2' as const,
+ },
+ tables: tablesSchema.schemaType.tables,
+ reducers: reducersSchema.reducersType.reducers,
+ ...proceduresSchema,
+} satisfies __RemoteModule<
+ typeof tablesSchema.schemaType,
+ typeof reducersSchema.reducersType,
+ typeof proceduresSchema
+>;
+
+/** The tables available in this remote SpacetimeDB module. */
+export const tables = __convertToAccessorMap(tablesSchema.schemaType.tables);
+
+/** The reducers available in this remote SpacetimeDB module. */
+export const reducers = __convertToAccessorMap(
+ reducersSchema.reducersType.reducers
+);
+
+/** The context type returned in callbacks for all possible events. */
+export type EventContext = __EventContextInterface;
+/** The context type returned in callbacks for reducer events. */
+export type ReducerEventContext = __ReducerEventContextInterface<
+ typeof REMOTE_MODULE
+>;
+/** The context type returned in callbacks for subscription events. */
+export type SubscriptionEventContext = __SubscriptionEventContextInterface<
+ typeof REMOTE_MODULE
+>;
+/** The context type returned in callbacks for error events. */
+export type ErrorContext = __ErrorContextInterface;
+/** The subscription handle type to manage active subscriptions created from a {@link SubscriptionBuilder}. */
+export type SubscriptionHandle = __SubscriptionHandleImpl;
+
+/** Builder class to configure a new subscription to the remote SpacetimeDB instance. */
+export class SubscriptionBuilder extends __SubscriptionBuilderImpl<
+ typeof REMOTE_MODULE
+> {}
+
+/** Builder class to configure a new database connection to the remote SpacetimeDB instance. */
+export class DbConnectionBuilder extends __DbConnectionBuilder {}
+
+/** The typed database connection to manage connections to the remote SpacetimeDB instance. This class has type information specific to the generated module. */
+export class DbConnection extends __DbConnectionImpl {
+ /** Creates a new {@link DbConnectionBuilder} to configure and connect to the remote SpacetimeDB instance. */
+ static builder = (): DbConnectionBuilder => {
+ return new DbConnectionBuilder(
+ REMOTE_MODULE,
+ (config: __DbConnectionConfig) =>
+ new DbConnection(config)
+ );
+ };
+
+ /** Creates a new {@link SubscriptionBuilder} to configure a subscription to the remote SpacetimeDB instance. */
+ override subscriptionBuilder = (): SubscriptionBuilder => {
+ return new SubscriptionBuilder(this);
+ };
+}
diff --git a/templates/nextjs-ts/src/module_bindings/on_connect_reducer.ts b/templates/nextjs-ts/src/module_bindings/on_connect_reducer.ts
new file mode 100644
index 00000000000..2ca99c88fea
--- /dev/null
+++ b/templates/nextjs-ts/src/module_bindings/on_connect_reducer.ts
@@ -0,0 +1,13 @@
+// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
+// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
+
+/* eslint-disable */
+/* tslint:disable */
+import {
+ TypeBuilder as __TypeBuilder,
+ t as __t,
+ type AlgebraicTypeType as __AlgebraicTypeType,
+ type Infer as __Infer,
+} from 'spacetimedb';
+
+export default {};
diff --git a/templates/nextjs-ts/src/module_bindings/on_disconnect_reducer.ts b/templates/nextjs-ts/src/module_bindings/on_disconnect_reducer.ts
new file mode 100644
index 00000000000..2ca99c88fea
--- /dev/null
+++ b/templates/nextjs-ts/src/module_bindings/on_disconnect_reducer.ts
@@ -0,0 +1,13 @@
+// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
+// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
+
+/* eslint-disable */
+/* tslint:disable */
+import {
+ TypeBuilder as __TypeBuilder,
+ t as __t,
+ type AlgebraicTypeType as __AlgebraicTypeType,
+ type Infer as __Infer,
+} from 'spacetimedb';
+
+export default {};
diff --git a/templates/nextjs-ts/src/module_bindings/person_table.ts b/templates/nextjs-ts/src/module_bindings/person_table.ts
new file mode 100644
index 00000000000..0f70f74f617
--- /dev/null
+++ b/templates/nextjs-ts/src/module_bindings/person_table.ts
@@ -0,0 +1,15 @@
+// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
+// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
+
+/* eslint-disable */
+/* tslint:disable */
+import {
+ TypeBuilder as __TypeBuilder,
+ t as __t,
+ type AlgebraicTypeType as __AlgebraicTypeType,
+ type Infer as __Infer,
+} from 'spacetimedb';
+
+export default __t.row({
+ name: __t.string(),
+});
diff --git a/templates/nextjs-ts/src/module_bindings/person_type.ts b/templates/nextjs-ts/src/module_bindings/person_type.ts
new file mode 100644
index 00000000000..1156775a3cf
--- /dev/null
+++ b/templates/nextjs-ts/src/module_bindings/person_type.ts
@@ -0,0 +1,15 @@
+// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
+// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
+
+/* eslint-disable */
+/* tslint:disable */
+import {
+ TypeBuilder as __TypeBuilder,
+ t as __t,
+ type AlgebraicTypeType as __AlgebraicTypeType,
+ type Infer as __Infer,
+} from 'spacetimedb';
+
+export default __t.object('Person', {
+ name: __t.string(),
+});
diff --git a/templates/nextjs-ts/src/module_bindings/say_hello_reducer.ts b/templates/nextjs-ts/src/module_bindings/say_hello_reducer.ts
new file mode 100644
index 00000000000..2ca99c88fea
--- /dev/null
+++ b/templates/nextjs-ts/src/module_bindings/say_hello_reducer.ts
@@ -0,0 +1,13 @@
+// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
+// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
+
+/* eslint-disable */
+/* tslint:disable */
+import {
+ TypeBuilder as __TypeBuilder,
+ t as __t,
+ type AlgebraicTypeType as __AlgebraicTypeType,
+ type Infer as __Infer,
+} from 'spacetimedb';
+
+export default {};
diff --git a/templates/nextjs-ts/tsconfig.json b/templates/nextjs-ts/tsconfig.json
new file mode 100644
index 00000000000..2c145a2d166
--- /dev/null
+++ b/templates/nextjs-ts/tsconfig.json
@@ -0,0 +1,27 @@
+{
+ "compilerOptions": {
+ "target": "ES2020",
+ "lib": ["dom", "dom.iterable", "esnext"],
+ "allowJs": true,
+ "skipLibCheck": true,
+ "strict": true,
+ "noEmit": true,
+ "esModuleInterop": true,
+ "module": "esnext",
+ "moduleResolution": "bundler",
+ "resolveJsonModule": true,
+ "isolatedModules": true,
+ "jsx": "preserve",
+ "incremental": true,
+ "plugins": [
+ {
+ "name": "next"
+ }
+ ],
+ "paths": {
+ "@/*": ["./*"]
+ }
+ },
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
+ "exclude": ["node_modules"]
+}