An open API service indexing awesome lists of open source software.

https://github.com/sadmann7/shadcn-table

Shadcn table with server-side sorting, filtering, and pagination.
https://github.com/sadmann7/shadcn-table

drizzle-orm nextjs open-source shadcn-ui table tanstack-table

Last synced: 8 days ago
JSON representation

Shadcn table with server-side sorting, filtering, and pagination.

Awesome Lists containing this project

README

        

# [Shadcn Table](https://table.sadmn.com)

This is a shadcn table component with server-side sorting, filtering, and pagination. It is bootstrapped with `create-t3-app`.

[![Shadcn Table](./public/images/screenshot.png)](https://table.sadmn.com)

## Documentation

See the [documentation](https://diceui.com/docs/components/data-table) to get started.

## Tech Stack

- **Framework:** [Next.js](https://nextjs.org)
- **Styling:** [Tailwind CSS](https://tailwindcss.com)
- **UI Components:** [shadcn/ui](https://ui.shadcn.com)
- **Table package:** [TanStack/react-table](https://tanstack.com/table/latest)
- **Database:** [Neon](https://neon.tech)
- **ORM:** [Drizzle ORM](https://orm.drizzle.team)
- **Validation:** [Zod](https://zod.dev)

## Features

- [x] Server-side pagination, sorting, and filtering
- [x] Customizable columns
- [x] Auto generated filters from column definitions
- [x] Dynamic `Data-Table-Toolbar` with search, filters, and actions
- [x] `Notion/Airtable` like advanced filtering
- [x] `Linear` like filter menu for command palette filtering
- [x] Action bar on row selection

## Running Locally

1. Clone the repository

```bash
git clone https://github.com/sadmann7/shadcn-table
```

2. Install dependencies using pnpm

```bash
pnpm install
```

3. Copy the `.env.example` to `.env` and update the variables.

```bash
cp .env.example .env
```

4. (Optional) Run database using docker-compose.yml file

```bash
docker compose up
```

5. Push the database schema

```bash
pnpm run db:push
```

6. Seed the database

```bash
pnpm run db:seed
```

7. Start the development server

```bash
pnpm run dev
```

## How do I deploy this?

Follow the deployment guides for [Vercel](https://create.t3.gg/en/deployment/vercel), [Netlify](https://create.t3.gg/en/deployment/netlify) and [Docker](https://create.t3.gg/en/deployment/docker) for more information.

## Credits

- [shadcn/ui](https://github.com/shadcn-ui/ui/tree/main/apps/www/app/(app)/examples/tasks) - For the initial implementation of the data table.