How tldraw/nextjs-template works
Project type and purpose
• This is a front‑end template project built with Next.js that demonstrates how to integrate the tldraw SDK into a modern React/Next.js application. It provides a minimal starting point for developers who want to embed a collaborative drawing canvas (tldraw) into a Next.js page.
File structure
• Top‑level files:
• package.json – dependency list (including @tldraw/tldraw, next, react, typescript)
• next.config.cjs – Next.js custom configuration
• tsconfig.json – TypeScript compiler settings
• eslint.config.mjs – linting rules
• README.md, LICENSE.md, .gitignore
• src/app directory (the new Next.js App Router):
• layout.tsx – root layout component
• page.tsx – the main page that mounts the tldraw canvas
• globals.css – shared CSS
• No separate backend directory; all code lives in the Next.js front‑end.
README for additional insights
• Confirms local development commands (yarn dev) and that the app runs on localhost:3000.
• Clarifies this is purely a front‑end integration and is delivered under MIT.