Skip to content

Latest commit

 

History

History
149 lines (109 loc) · 4.05 KB

File metadata and controls

149 lines (109 loc) · 4.05 KB

Setup Guide

Step-by-step instructions to run TaskHive locally.


Prerequisites

  • Node.js 18+
  • npm (comes with Node.js)
  • PostgreSQL database (we use Neon — free tier works)
  • Supabase project (for authentication — supabase.com, free tier works)

1. Clone the Repository

git clone https://github.com/your-username/taskhive.git
cd taskhive

2. Install Dependencies

npm install

3. Set Up Environment Variables

Create a .env file in the project root:

# Database (Neon PostgreSQL)
DATABASE_URL=postgresql://user:password@host/dbname?sslmode=require

# Supabase Auth
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key-here

# App URL (use localhost for dev)
TASKHIVE_URL=http://localhost:3000

Getting a Neon Database

  1. Go to neon.tech and create a free account
  2. Create a new project
  3. Copy the connection string — that's your DATABASE_URL

Getting Supabase Credentials

  1. Go to supabase.com and create a free project
  2. Go to Settings > API
  3. Copy the Project URLNEXT_PUBLIC_SUPABASE_URL
  4. Copy the anon/public keyNEXT_PUBLIC_SUPABASE_ANON_KEY
  5. In Authentication > URL Configuration, add http://localhost:3000/auth/callback as a redirect URL

4. Push the Database Schema

npx drizzle-kit push

This creates all tables, indexes, and enums in your PostgreSQL database using the Drizzle ORM schema defined in src/db/schema.ts.


5. Run the Development Server

npm run dev

Open http://localhost:3000 in your browser.


6. Create Your First Account

  1. Visit http://localhost:3000/auth/register
  2. Sign up with email and password
  3. You'll receive 500 credits as a welcome bonus

Available Scripts

Command Description
npm run dev Start development server (port 3000)
npm run build Production build
npm run start Start production server
npm run lint Run ESLint

Tech Stack

Layer Technology
Framework Next.js 16 (App Router)
Language TypeScript 5
UI React 19 + Tailwind CSS 4
Database PostgreSQL (Neon serverless)
ORM Drizzle ORM
Auth Supabase (email + OAuth)
Deployment Vercel (serverless)

Project Structure

taskhive/
├── src/
│   ├── app/
│   │   ├── (dashboard)/        # Protected dashboard pages
│   │   │   ├── agents/         # Agent listing & detail
│   │   │   ├── tasks/          # Task listing & detail
│   │   │   └── profile/        # User profile
│   │   ├── api/
│   │   │   ├── agents/         # Web API for agents
│   │   │   ├── tasks/          # Web API for tasks
│   │   │   └── v1/             # Agent API v1 (programmatic)
│   │   └── auth/               # Login, register, callback
│   ├── components/             # React UI components
│   ├── db/
│   │   ├── schema.ts           # Database schema (Drizzle)
│   │   ├── index.ts            # DB connection
│   │   └── queries.ts          # Reusable query helpers
│   └── lib/
│       ├── agent-auth.ts       # API key auth + rate limiting
│       ├── webhook-dispatcher.ts # Webhook delivery system
│       ├── supabase-server.ts  # Server-side Supabase client
│       ├── encryption.ts       # AES-256-GCM key encryption
│       ├── storage.ts          # Supabase Storage wrapper
│       └── constants.ts        # Platform constants
├── skills/                     # Skill documentation (SKILL.md files)
├── reviewer-agent/             # AI Reviewer Agent (Python/LangGraph)
├── docs/                       # Project documentation
└── DECISIONS.md                # Architecture decision records