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.
- ๐ข 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
- 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
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
Role hierarchy (from highest to lowest access):
OWNER
- Full workspace control and managementADMIN
- User management, settings, and repository accessPM
- Product management, features, and roadmap controlDEVELOPER
- Development tasks and content creationSTAKEHOLDER
- Limited content interaction and visibilityVIEWER
- Read-only access to workspace content
- Node.js 18+
- PostgreSQL database
- GitHub OAuth application
- Clone the repository
git clone <your-repo-url>
cd hive
- Install dependencies
npm install
- 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"
# 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.
- Generate development secrets
npm run setup
- Set up the database
Start PostgreSQL (or use Docker):
docker-compose up -d postgres
Run database migrations:
npx prisma generate
npx prisma migrate dev
- Start the development server
npm run dev
- Open your browser
Navigate to http://localhost:3000
-
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
-
Required OAuth Scopes
read:user
- Access user profile informationuser:email
- Access user email addressesread:org
- Read organization membershiprepo
- Access public and private repositories
For faster development cycles, set POD_URL
in your environment to enable mock authentication alongside GitHub OAuth.
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
npm run dev
- Start development server with Turbopacknpm run build
- Build for productionnpm run start
- Start production servernpm run lint
- Run ESLintnpm run setup
- Generate JWT secret
npm run test
- Run all testsnpm run test:watch
- Run tests in watch modenpm run test:coverage
- Run tests with coveragenpm run test:unit
- Run unit tests onlynpm run test:integration
- Run integration tests
npx prisma studio
- Open Prisma Studio (database GUI)npx prisma migrate dev
- Create and apply migrationsnpx prisma generate
- Generate Prisma clientnpx prisma db push
- Push schema changes to database
npm run test:db:start
- Start test databasenpm run test:db:stop
- Stop test databasenpm run test:db:setup
- Setup test databasenpm run test:db:reset
- Reset test database
# 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
- 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
- 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
# Development
docker-compose -f docker-compose.dev.yml up --build
# Production
docker-compose up --build
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"
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
- 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
- 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
- โ Multi-tenant workspace architecture
- โ GitHub OAuth integration
- โ Basic stakgraph configuration
- โ AI chat interface with artifacts
- โ Product roadmap management
- ๐ง 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
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- 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
This project is licensed under the MIT License - see the LICENSE file for details.
- 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