MCPcopy Index your code
hub / github.com/sadmann7/tablecn

github.com/sadmann7/tablecn @main sqlite

repository ↗ · DeepWiki ↗
551 symbols 1,359 edges 162 files 4 documented · 1%
README

tablecn

Data table and data grid components built with shadcn/ui, featuring sorting, filtering, pagination, infinite scrolling, and real-time collaboration.

tablecn

Documentation

See the documentation to get started.

Tech Stack

Features

  • [x] Server-side pagination, sorting, and filtering
  • [x] Customizable columns
  • [x] Auto generated filters from column definitions
  • [x] Notion/Airtable like advanced filtering
  • [x] Linear like filter menu for command palette filtering
  • [x] Action bar on row selection
  • [x] Infinite scrolling with virtualization
  • [x] Real-time collaboration

Running Locally

Quick Setup (with Docker)

  1. Clone the repository

bash git clone https://github.com/sadmann7/tablecn cd tablecn

  1. Copy the environment variables

bash cp .env.example .env

  1. Run the setup

bash pnpm ollie

This installs dependencies, starts the Docker PostgreSQL instance, pushes the schema, and seeds sample data.

Manual Setup

  1. Clone the repository

bash git clone https://github.com/sadmann7/tablecn cd tablecn

  1. Install dependencies

bash pnpm install

  1. Set up environment variables

bash cp .env.example .env

Update .env with your database credentials.

  1. Start the database and dev server

bash pnpm db:start # start the PostgreSQL container pnpm db:setup # push schema and seed data pnpm dev # start the Next.js dev server

Multiplayer

To run the multiplayer demo locally:

pnpm dev:multiplayer

This starts both the Next.js and PartyKit dev servers concurrently.

Deployment

Follow the deployment guides for Vercel, Netlify, and Docker.

The multiplayer demo uses PartyKit as a separate deployment:

pnpm deploy:multiplayer

Set NEXT_PUBLIC_PARTYKIT_HOST in your deployment environment variables after deploying.

Credits

  • shadcn/ui - For the initial implementation of the data table.

Extension points exported contracts — how you extend this code

RoomState (Interface)
(no doc)
party/index.ts
UserPresence (Interface)
(no doc)
party/types.ts
CellSelectOption (Interface)
(no doc)
src/types/data-grid.ts
ShellProps (Interface)
(no doc)
src/components/shell.tsx
GenerateIdOptions (Interface)
(no doc)
src/lib/id.ts
IndexPageProps (Interface)
(no doc)
src/app/page.tsx
DataGridState (Interface)
(no doc)
src/hooks/use-data-grid.ts
CellUpdate (Interface)
(no doc)
src/types/data-grid.ts

Core symbols most depended-on inside this repo

cn
called by 186
src/lib/utils.ts
useDataGrid
called by 102
src/hooks/use-data-grid.ts
getCellKey
called by 29
src/lib/data-grid.ts
generateId
called by 18
src/lib/id.ts
parseTsv
called by 17
src/lib/data-grid.ts
formatDate
called by 15
src/lib/format.ts
useStore
called by 13
src/hooks/use-data-grid.ts
parseCellKey
called by 9
src/lib/data-grid.ts

Shape

Function 410
Interface 128
Method 9
Class 4

Languages

TypeScript100%

Modules by API surface

src/hooks/use-data-grid.ts28 symbols
src/lib/data-grid.ts22 symbols
src/components/ui/action-bar.tsx20 symbols
src/components/ui/sortable.tsx19 symbols
src/components/ui/dropdown-menu.tsx15 symbols
src/types/data-grid.ts13 symbols
src/hooks/use-data-grid-undo-redo.ts11 symbols
src/components/data-grid/data-grid-search.tsx11 symbols
party/index.ts11 symbols
src/hooks/use-multiplayer-room.ts10 symbols
src/components/ui/sheet.tsx10 symbols
src/components/ui/select.tsx10 symbols

Dependencies from manifests, versioned

@biomejs/biome2.5.0 · 1×
@dnd-kit/core6.3.1 · 1×
@dnd-kit/modifiers9.0.0 · 1×
@dnd-kit/sortable10.0.0 · 1×
@dnd-kit/utilities3.2.2 · 1×
@faker-js/faker10.4.0 · 1×
@hookform/resolvers5.4.0 · 1×
@t3-oss/env-nextjs0.13.11 · 1×
@tanstack/query-db-collection1.0.40 · 1×
@tanstack/react-db0.1.86 · 1×
@tanstack/react-query5.101.0 · 1×

For agents

$ claude mcp add tablecn \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact