@@ -4,13 +4,7 @@ This is a shadcn table component with server-side sorting, filtering, and pagina
44
55[ ![ Shadcn Table] ( ./public/images/screenshot.png )] ( https://tablecn.com )
66
7- <div align =" center " >
8- <a href =" https://vercel.com/oss " >
9- <img alt="Vercel OSS Program" src="https://vercel.com/oss/program-badge.svg" />
10- </a >
11- </div >
12-
13- <br />
7+ [ ![ Vercel OSS Program] ( https://vercel.com/oss/program-badge.svg )] ( https://vercel.com/oss )
148
159## Documentation
1610
@@ -38,46 +32,78 @@ See the [documentation](https://diceui.com/docs/components/data-table) to get st
3832
3933## Running Locally
4034
41- 1 . Clone the repository
35+ ### Quick Setup
36+
37+ For first-time setup, run this single command:
38+
39+ 1 . ** Clone the repository**
4240
4341 ``` bash
4442 git clone https://github.com/sadmann7/shadcn-table
43+ cd shadcn-table
4544 ```
4645
47- 2 . Install dependencies using pnpm
46+ 2 . ** Copy the environment variables **
4847
4948 ``` bash
50- pnpm install
49+ cp .env.example .env
5150 ```
5251
53- 3 . Copy the ` .env.example ` to ` .env ` and update the variables.
52+ 3 . ** Run the setup **
5453
5554 ``` bash
56- cp .env.example .env
55+ pnpm ollie
5756 ```
5857
59- 4 . (Optional) Run database using docker-compose.yml file
58+ This will install dependencies, start the Docker PostgreSQL instance, set up the database schema, and seed it with sample data.
59+
60+ ### Manual Setup
61+
62+ 1 . ** Clone the repository**
6063
6164 ``` bash
62- docker compose up
65+ git clone https://github.com/sadmann7/shadcn-table
66+ cd shadcn-table
6367 ```
6468
65- 5 . Push the database schema
69+ 2 . ** Install dependencies **
6670
6771 ``` bash
68- pnpm run db:push
72+ pnpm install
73+ ```
74+
75+ 3 . ** Set up environment variables**
76+
77+ ``` bash
78+ cp .env.example .env
6979 ```
7080
71- 6 . Seed the database
81+ Update the ` .env ` file with your database credentials.
82+
83+ 4 . ** Choose your database approach:**
84+
85+ ** Option A: Use Docker PostgreSQL**
7286
7387 ``` bash
74- pnpm run db:seed
88+ # Start PostgreSQL container
89+ pnpm db:start
90+
91+ # Set up database schema and seed data
92+ pnpm db:setup
93+
94+ # Start development server
95+ pnpm dev
7596 ```
7697
77- 7 . Start the development server
98+ ** Option B: Use existing PostgreSQL database **
7899
79100 ``` bash
80- pnpm run dev
101+ # Update .env with your database URL
102+ # Then set up database schema and seed data
103+ pnpm db:setup
104+
105+ # Start development server
106+ pnpm dev
81107 ```
82108
83109## How do I deploy this?
0 commit comments