Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Team Dashboard

Analytics dashboard for ClickUp project management with JWT authentication.

Local Setup

Prerequisites

  • Node.js 18+
  • PostgreSQL

Quick Start (Automated)

chmod +x setup.sh
./setup.sh
npm run dev

Visit http://localhost:3000

Default Login:

  • Email: admin@admin.com
  • Password: admin123

Manual Setup

1. Database Setup (ONE-TIME)

Using Docker:

docker run --name team-dashboard-db \
  -e POSTGRES_PASSWORD=postgres \
  -e POSTGRES_DB=team_dashboard \
  -p 5432:5432 \
  -d postgres:15

Using Local PostgreSQL:

chmod +x db-setup-once.sh
./db-setup-once.sh

Or manually:

sudo -u postgres psql -c "CREATE USER swapps WITH PASSWORD 'swapps123' CREATEDB;"
sudo -u postgres psql -c "CREATE DATABASE team_dashboard OWNER swapps;"

2. Install Dependencies

npm install

3. Configure Environment

cp .env.example .env

Edit .env with your credentials:

# Database (choose one)
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/team_dashboard?schema=public"  # Docker
# DATABASE_URL="postgresql://swapps:swapps123@localhost:5432/team_dashboard?schema=public"  # Local

# ClickUp API (get from: ClickUp Settings → Apps → API)
CLICKUP_API_TOKEN="your_token"
CLICKUP_TEAM_ID="your_team_id"
CLICKUP_LIST_ID="your_list_id"

# JWT Secret (generate with command below)
JWT_SECRET="generate_with_command_below"

Generate JWT secret:

node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

4. Setup Database

npx prisma generate
npx prisma migrate dev --name init
npm run db:seed

5. Start Development Server

npm run dev

Visit http://localhost:3000 and login with admin@admin.com / admin123


ClickUp API Configuration

  1. Go to ClickUp Settings → Apps → API
  2. Generate API token
  3. Get Team ID from URL: https://app.clickup.com/{TEAM_ID}/...
  4. Get List ID from URL: https://app.clickup.com/.../{LIST_ID}/...
  5. Add values to .env file

Common Commands

npm run dev          # Start dev server
npm run build        # Build for production
npm run db:studio    # Open database GUI
npm run db:seed      # Create admin user

Troubleshooting

Database Connection Error

Error: "Authentication failed against database server"

Fix: Update .env with correct credentials:

  • Docker: postgresql://postgres:postgres@localhost:5432/team_dashboard?schema=public
  • Local: postgresql://swapps:swapps123@localhost:5432/team_dashboard?schema=public

Then restart dev server:

# Stop server (Ctrl+C)
npm run dev

Port 5432 Already in Use

Check what's running:

lsof -i :5432

Stop existing PostgreSQL or use existing database.

ClickUp Sync Not Working

  • Verify API token is valid
  • Check Team ID and List ID are correct
  • Ensure you have API access permissions in ClickUp

Tech Stack

  • Next.js 14+ (App Router)
  • TypeScript
  • PostgreSQL + Prisma
  • JWT Authentication
  • TailwindCSS + shadcn/ui
  • TanStack Query
  • Recharts

License

ISC

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages