Skip to content
/ hive Public

Hive Platform is an AI-first product management assistant that helps PMs plan backlogs, structure roadmaps, and accelerate delivery through an integrated bounty system.

Notifications You must be signed in to change notification settings

stakwork/hive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Hive Platform

Hive Platform is a modern, workspace-based product development platform that helps teams manage complex projects through AI-powered collaboration, code graph visualization, and intelligent task management. Built with Next.js and powered by a sophisticated multi-tenant workspace architecture.

๐Ÿš€ Features

  • ๐Ÿข Multi-Tenant Workspaces: Role-based workspace management with fine-grained permissions
  • ๐Ÿ” GitHub Authentication: Secure OAuth integration with GitHub for seamless code repository access
  • ๐Ÿค– AI-Powered Chat: Intelligent task management with artifact generation and code assistance
  • ๐Ÿ“Š Stakgraph Integration: Visualize and manage complex system architectures with AI-powered insights
  • ๐Ÿ—บ๏ธ Product Roadmaps: Comprehensive feature planning with requirements and user story management
  • โšก Swarm Infrastructure: Automated deployment and environment management
  • ๐Ÿ“‹ Task Management: Full-featured task system with comments, assignments, and status tracking
  • ๐Ÿ”„ Real-time Collaboration: Live updates and synchronized workspace state

๐Ÿ—๏ธ Architecture

Tech Stack

  • Frontend: Next.js 15 with App Router, React 19, TypeScript
  • Styling: Tailwind CSS v4, shadcn/ui components with Radix UI
  • Backend: Next.js API routes, Prisma ORM, PostgreSQL
  • Authentication: NextAuth.js with GitHub OAuth
  • State Management: Zustand for client state, TanStack React Query for server state
  • Real-time: Pusher for WebSocket connections
  • Testing: Vitest with Testing Library
  • Forms: React Hook Form + Zod validation

Database Schema

The application follows a hierarchical multi-tenant structure:

  • Users & Authentication: NextAuth.js integration with GitHub OAuth
  • Workspaces: Role-based multi-tenant workspace system
  • Infrastructure: Swarms (deployment infrastructure) and repositories
  • Product Management: Products โ†’ Features โ†’ User Stories โ†’ Tasks hierarchy
  • Roadmap Management: Time-based planning with dependencies
  • Communication: Polymorphic comment system and chat integration

Permission System

Role hierarchy (from highest to lowest access):

  • OWNER - Full workspace control and management
  • ADMIN - User management, settings, and repository access
  • PM - Product management, features, and roadmap control
  • DEVELOPER - Development tasks and content creation
  • STAKEHOLDER - Limited content interaction and visibility
  • VIEWER - Read-only access to workspace content

๐Ÿ“ฆ Installation

Prerequisites

  • Node.js 18+
  • PostgreSQL database
  • GitHub OAuth application

Quick Start

  1. Clone the repository
git clone <your-repo-url>
cd hive
  1. Install dependencies
npm install
  1. Set up environment variables

To create a .env.local file in the root directory, run:

cp env.example .env.local

And then update .env.local with correct values for:

GITHUB_CLIENT_ID="your-github-client-id"
GITHUB_CLIENT_SECRET="your-github-client-secret"

GitHub Developer Settings

# Database
DATABASE_URL="postgresql://hive_user:hive_password@localhost:5432/hive_db"

Note: Your Database URL and GITHUB credentials are required to login and setup the project.

  1. Generate development secrets
npm run setup
  1. Set up the database

Start PostgreSQL (or use Docker):

docker-compose up -d postgres

Run database migrations:

npx prisma generate
npx prisma migrate dev
  1. Start the development server
npm run dev
  1. Open your browser

Navigate to http://localhost:3000

๐Ÿ” Authentication

GitHub OAuth Setup

  1. Create GitHub OAuth App

    • Go to GitHub Developer Settings
    • Click "New OAuth App"
    • Set Homepage URL: http://localhost:3000 (development)
    • Set Authorization callback URL: http://localhost:3000/api/auth/callback/github
    • Copy the Client ID and Client Secret
  2. Required OAuth Scopes

    • read:user - Access user profile information
    • user:email - Access user email addresses
    • read:org - Read organization membership
    • repo - Access public and private repositories

Development Authentication

For faster development cycles, set POD_URL in your environment to enable mock authentication alongside GitHub OAuth.

๐Ÿ“ Project Structure

src/
โ”œโ”€โ”€ app/                      # Next.js App Router
โ”‚   โ”œโ”€โ”€ api/                 # API routes
โ”‚   โ”‚   โ”œโ”€โ”€ auth/           # NextAuth.js endpoints
โ”‚   โ”‚   โ”œโ”€โ”€ github/         # GitHub integration
โ”‚   โ”‚   โ”œโ”€โ”€ stakwork/       # Stakwork API integration
โ”‚   โ”‚   โ”œโ”€โ”€ pool-manager/   # Pool management
โ”‚   โ”‚   โ”œโ”€โ”€ swarm/          # Swarm management
โ”‚   โ”‚   โ”œโ”€โ”€ tasks/          # Task management
โ”‚   โ”‚   โ””โ”€โ”€ workspaces/     # Workspace operations
โ”‚   โ”œโ”€โ”€ auth/               # Authentication pages
โ”‚   โ”œโ”€โ”€ onboarding/         # User onboarding flow
โ”‚   โ”œโ”€โ”€ w/[slug]/          # Workspace-specific pages
โ”‚   โ”‚   โ”œโ”€โ”€ code-graph/    # Code visualization
โ”‚   โ”‚   โ”œโ”€โ”€ roadmap/       # Product roadmaps
โ”‚   โ”‚   โ”œโ”€โ”€ settings/      # Workspace settings
โ”‚   โ”‚   โ”œโ”€โ”€ stakgraph/     # Stakgraph configuration
โ”‚   โ”‚   โ”œโ”€โ”€ task/          # AI chat interface
โ”‚   โ”‚   โ””โ”€โ”€ tasks/         # Task management
โ”‚   โ””โ”€โ”€ workspaces/         # Workspace selection
โ”œโ”€โ”€ components/              # React components
โ”‚   โ”œโ”€โ”€ ui/                 # shadcn/ui components
โ”‚   โ”œโ”€โ”€ stakgraph/          # Stakgraph form components
โ”‚   โ”œโ”€โ”€ roadmap/            # Roadmap management
โ”‚   โ”œโ”€โ”€ onboarding/         # Onboarding components
โ”‚   โ””โ”€โ”€ wizard/             # Multi-step wizards
โ”œโ”€โ”€ hooks/                   # React hooks
โ”‚   โ”œโ”€โ”€ useWorkspace.ts     # Workspace operations
โ”‚   โ”œโ”€โ”€ useWorkspaceAccess.ts # Permission checks
โ”‚   โ””โ”€โ”€ [other hooks]       # Feature-specific hooks
โ”œโ”€โ”€ lib/                     # Core utilities
โ”‚   โ”œโ”€โ”€ auth/               # Authentication utilities
โ”‚   โ”œโ”€โ”€ db.ts               # Prisma client
โ”‚   โ””โ”€โ”€ utils.ts            # General utilities
โ”œโ”€โ”€ services/                # External API services
โ”‚   โ”œโ”€โ”€ pool-manager/       # Pool Manager integration
โ”‚   โ”œโ”€โ”€ stakwork/           # Stakwork API
โ”‚   โ””โ”€โ”€ swarm/              # Swarm management
โ”œโ”€โ”€ stores/                  # Zustand state stores
โ”œโ”€โ”€ types/                   # TypeScript definitions
โ””โ”€โ”€ contexts/                # React contexts

๐Ÿ”ง Development

Available Scripts

  • npm run dev - Start development server with Turbopack
  • npm run build - Build for production
  • npm run start - Start production server
  • npm run lint - Run ESLint
  • npm run setup - Generate JWT secret

Testing

  • npm run test - Run all tests
  • npm run test:watch - Run tests in watch mode
  • npm run test:coverage - Run tests with coverage
  • npm run test:unit - Run unit tests only
  • npm run test:integration - Run integration tests

Database Management

  • npx prisma studio - Open Prisma Studio (database GUI)
  • npx prisma migrate dev - Create and apply migrations
  • npx prisma generate - Generate Prisma client
  • npx prisma db push - Push schema changes to database

Test Database

  • npm run test:db:start - Start test database
  • npm run test:db:stop - Stop test database
  • npm run test:db:setup - Setup test database
  • npm run test:db:reset - Reset test database

Adding New Components

# Add shadcn/ui components
npx shadcn@latest add [component-name]

# Examples:
npx shadcn@latest add table
npx shadcn@latest add dialog
npx shadcn@latest add dropdown-menu

Working with Workspaces

  • All workspace pages use the /w/[slug]/* URL pattern
  • Use useWorkspace() hook for workspace data and operations
  • Use useWorkspaceAccess() hook for permission checks
  • Workspace context is provided by WorkspaceProvider

[DEV Mode] Creating a Task

  • Log in with Github
  • Create a Workspace
  • Go to StakGraph
  • Fill out the fields with Mock data for a Project
  • Go to back to Tasks and you'll see + New Task top-right

๐Ÿณ Docker Deployment

Quick Docker Start

# Development
docker-compose -f docker-compose.dev.yml up --build

# Production
docker-compose up --build

Production Environment Variables

DATABASE_URL="postgresql://username:password@host:5432/database"
NEXTAUTH_URL="https://yourdomain.com"
NEXTAUTH_SECRET="secure-random-string-for-session-encryption"
GITHUB_CLIENT_ID="your-production-github-client-id"
GITHUB_CLIENT_SECRET="your-production-github-client-secret"
STAKWORK_API_KEY="your-stakwork-api-key"

๐Ÿš€ Key Features Deep Dive

Stakgraph Integration

Stakgraph provides AI-powered code analysis and system visualization:

  • Repository Integration: Connect GitHub repositories for analysis
  • Swarm Management: Automated deployment infrastructure
  • Environment Configuration: Flexible environment variable management
  • Service Discovery: Automatic service detection and configuration

AI-Powered Task Management

  • Intelligent Chat Interface: Contextual AI assistance for development tasks
  • Artifact Generation: Automatic code, form, and documentation generation
  • Task Context: AI understands project context and requirements
  • Real-time Collaboration: Live updates and synchronized conversations

Multi-Tenant Workspaces

  • Role-Based Access: Granular permissions for team collaboration
  • Resource Isolation: Complete data separation between workspaces
  • Flexible Membership: Easy team member management and role assignment
  • Audit Trail: Complete history of changes and user actions

๐Ÿ”ฎ Roadmap

Current Version

  • โœ… Multi-tenant workspace architecture
  • โœ… GitHub OAuth integration
  • โœ… Basic stakgraph configuration
  • โœ… AI chat interface with artifacts
  • โœ… Product roadmap management

Upcoming Features

  • ๐Ÿšง Enhanced code graph visualization
  • ๐Ÿšง Advanced swarm orchestration
  • ๐Ÿšง Real-time collaborative editing
  • ๐Ÿšง Mobile application
  • ๐Ÿ“‹ Advanced analytics and insights
  • ๐Ÿ“‹ Third-party integrations (Slack, Discord)
  • ๐Ÿ“‹ SSO and enterprise authentication

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow the existing code style and patterns
  • Write tests for new features
  • Update documentation as needed
  • Use TypeScript strictly
  • Follow the workspace-based architecture patterns

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ†˜ Support

  • Documentation: Check the CLAUDE.md file for detailed development guidance
  • Issues: Report bugs and feature requests via GitHub Issues
  • Discussions: Join community discussions on GitHub Discussions

Built with โค๏ธ by the Hive Platform team

About

Hive Platform is an AI-first product management assistant that helps PMs plan backlogs, structure roadmaps, and accelerate delivery through an integrated bounty system.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 9