Skip to content

Thryyve/hudo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

32 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hudo

A modern team task manager with real-time Kanban boards β€” built for teams that ship and collaborators who stay in sync.

Hudo lets teams organize work in workspaces, boards, lists, and cards β€” with drag-and-drop ordering and live updates across every connected client. Sign in with GitHub or Google via Auth.js, with database-backed sessions so every API route and board action stays protected. The UI is fast, clean, and built around real collaboration flows.

License: MIT Next.js React PostgreSQL Socket.io Stars Forks


πŸ“Έ Screenshots

Landing Page Dashboard
Landing Page Dashboard
Workspace Kanban Board
Workspace Kanban Board

🌐 Live Demo: hudo.vercel.app
⚑ Socket Server: hudo-socket.onrender.com


Table of Contents


✨ Features

  • OAuth sign-in with GitHub and Google via Auth.js v5 β€” database sessions with the Prisma adapter
  • Workspaces with slug-based routing, descriptions, and owner management
  • Invite teammates by email with role checks (OWNER Β· ADMIN Β· MEMBER)
  • Color-coded boards inside each workspace
  • Lists and cards with full CRUD and inline editing
  • Drag-and-drop card reordering and cross-list moves via @dnd-kit
  • Real-time sync across clients with a standalone Socket.io server and board-scoped rooms
  • Zod validation on REST API routes and socket event payloads
  • Activity logging model for workspace audit trails (schema-ready)
  • Responsive UI with Tailwind CSS 4 and shadcn/ui components

πŸ› οΈ Tech Stack

Area Technologies
Framework Next.js 16.2.6 (App Router), React 19.2.4, TypeScript 5
Auth Auth.js v5 (NextAuth), @auth/prisma-adapter, GitHub + Google OAuth
Database PostgreSQL (Supabase) via Prisma 6.19.3 and @prisma/adapter-pg
Real-time Socket.io 4.8.3 (standalone server/index.ts)
UI Tailwind CSS 4, shadcn/ui, Radix UI, Lucide icons
Interactions @dnd-kit (drag-and-drop), Sonner (toasts)
Validation Zod 4
DevOps Vercel (app + API), Render (socket server), Supabase (database)

πŸš€ Getting Started

Prerequisites

Installation

1. Clone the repository

git clone git@github.com:Thryyve/hudo.git
cd hudo

2. Install dependencies

npm install

3. Configure environment

Create a .env file in the project root:

# Database (Supabase: use Transaction pooler + Direct connection)
DATABASE_URL="postgresql://..."
DIRECT_URL="postgresql://..."

# Auth.js
AUTH_SECRET="your_auth_secret_from_openssl_rand_base64_32"
GITHUB_CLIENT_ID="your_github_client_id"
GITHUB_CLIENT_SECRET="your_github_client_secret"
GOOGLE_CLIENT_ID="your_google_client_id"
GOOGLE_CLIENT_SECRET="your_google_client_secret"

# App URLs
NEXT_PUBLIC_APP_URL="http://localhost:3000"
NEXT_PUBLIC_SOCKET_URL="http://localhost:3001"

4. Set up the database

npx prisma migrate dev

5. Generate Prisma client (if needed)

npx prisma generate

Environment Variables

Variable Description Example
DATABASE_URL PostgreSQL connection (pooled) postgresql://user:pass@host:6543/db?pgbouncer=true
DIRECT_URL Direct PostgreSQL URL for migrations postgresql://user:pass@host:5432/db
AUTH_SECRET Auth.js encryption secret openssl rand -base64 32
GITHUB_CLIENT_ID GitHub OAuth app client ID β€”
GITHUB_CLIENT_SECRET GitHub OAuth app secret β€”
GOOGLE_CLIENT_ID Google OAuth client ID β€”
GOOGLE_CLIENT_SECRET Google OAuth client secret β€”
NEXT_PUBLIC_APP_URL Public app URL (CORS + redirects) http://localhost:3000
NEXT_PUBLIC_SOCKET_URL Socket.io server URL http://localhost:3001
PORT Socket server port (production) 3001

Running the Project

Run Next.js and the Socket.io server together:

npm run dev:all

Or in separate terminals:

Terminal 1 β€” Next.js

npm run dev

Terminal 2 β€” Socket.io server

npm run socket

Open http://localhost:3000.

Production build

# Next.js
npm run build
npm run start   # runs socket server via package.json "start" script

# For local production preview of the app only:
npx next start

Note: In production, deploy the Next.js app on Vercel and the Socket.io server separately on Render. The start script runs server/index.ts; host the Next.js app on Vercel (or similar) with next build + platform start command.


πŸ“ Project Structure

hudo/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ (auth)/                      # Sign-in flow
β”‚   β”‚   └── sign-in/
β”‚   β”œβ”€β”€ (main)/                      # Protected app shell
β”‚   β”‚   β”œβ”€β”€ dashboard/               # Workspace overview
β”‚   β”‚   β”œβ”€β”€ workspace/[workspaceId]/ # Boards in a workspace
β”‚   β”‚   └── board/[boardId]/         # Kanban view + real-time sync
β”‚   └── api/                         # REST API routes
β”‚       β”œβ”€β”€ auth/[...nextauth]/      # Auth.js handlers
β”‚       β”œβ”€β”€ workspaces/              # Workspace CRUD + invites + members
β”‚       β”œβ”€β”€ boards/                  # Board CRUD
β”‚       β”œβ”€β”€ lists/                   # List CRUD
β”‚       └── cards/                   # Card CRUD + reorder
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ ui/                          # shadcn/ui primitives
β”‚   β”œβ”€β”€ shared/                      # Navbar, sidebar, layout
β”‚   └── modules/                     # Workspace, board, card features
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ auth.ts                      # Auth.js + Prisma adapter config
β”‚   β”œβ”€β”€ db.ts                        # Prisma client singleton (pg pool)
β”‚   └── validations/                 # Zod schemas per domain
β”œβ”€β”€ server/
β”‚   └── index.ts                     # Standalone Socket.io server
β”œβ”€β”€ prisma/
β”‚   β”œβ”€β”€ schema.prisma                # Auth.js + app models
β”‚   └── migrations/
└── types/                           # Shared TypeScript types

🌐 API Documentation

All JSON API routes require an authenticated session (Auth.js cookie) unless noted. Unauthorized requests return 401.

Method Endpoint Description Auth
GET /api/workspaces List workspaces for the signed-in user βœ…
POST /api/workspaces Create a workspace (owner membership auto-created) βœ…
GET /api/workspaces/:workspaceId Get workspace with boards βœ…
POST /api/workspaces/:workspaceId/invite Invite member by email (OWNER / ADMIN only) βœ…
DELETE /api/workspaces/:workspaceId/members/:memberId Remove a workspace member βœ…
POST /api/boards Create a board in a workspace βœ…
GET /api/boards/:boardId Get board with lists and cards βœ…
DELETE /api/boards/:boardId Delete a board βœ…
POST /api/lists Create a list on a board βœ…
PATCH /api/lists/:listId Update list title βœ…
DELETE /api/lists/:listId Delete a list βœ…
POST /api/cards Create a card in a list βœ…
PATCH /api/cards/:cardId Update title, description, listId, or order βœ…
DELETE /api/cards/:cardId Delete a card βœ…

Auth routes are handled by Auth.js at /api/auth/* (sign-in, sign-out, callbacks).

Workspace member roles: OWNER Β· ADMIN Β· MEMBER


⚑ Real-time Events

Clients connect to the Socket.io server, join a board room, and broadcast changes to other viewers.

Client β†’ Server Server β†’ Room Payload
join-board β€” boardId
leave-board β€” boardId
card-created card-created { boardId, listId, card }
card-deleted card-deleted { boardId, cardId, listId }
card-moved card-moved { boardId, cardId, listId, order }
list-created list-created { boardId, list }
list-deleted list-deleted { boardId, listId }

Payloads are validated with Zod on the server. Sockets must be in the board room before broadcasting.


🚒 Deployment

Service Purpose
Vercel Next.js app + API routes
Render Socket.io server (npm start β†’ server/index.ts)
Supabase PostgreSQL (DATABASE_URL + DIRECT_URL)

Frontend β†’ Vercel

  1. Import the repository and deploy with the default Next.js settings.
  2. Add environment variables: DATABASE_URL, DIRECT_URL, AUTH_SECRET, OAuth credentials, NEXT_PUBLIC_APP_URL, NEXT_PUBLIC_SOCKET_URL.
  3. Set OAuth callback URLs to https://<your-domain>/api/auth/callback/github (and /google).

Socket server β†’ Render

  1. Create a Web Service pointing at this repo.
  2. Build command: npm install
  3. Start command: npm start (runs npx tsx server/index.ts)
  4. Set PORT, NEXT_PUBLIC_APP_URL (your Vercel URL), and allow Vercel origins (built into server/index.ts).

Database β†’ Supabase

  1. Create a project and copy the Transaction pooler URL β†’ DATABASE_URL.
  2. Copy the Direct connection URL β†’ DIRECT_URL.
  3. Run npx prisma migrate deploy against production.

Note: Render’s free tier spins down after inactivity. The first WebSocket connection after idle may take ~30 seconds on cold start.


🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: feat/<short-description>
  3. Commit using Conventional Commits:
    feat: add card due-date filters
    fix: sync cross-list drag on socket reconnect
    docs: improve deployment notes
    
  4. Push your branch and open a Pull Request

Code style: ESLint via eslint-config-next β€” run npm run lint before submitting.


πŸ“„ License

Distributed under the MIT License. See the project repository for details.


πŸ‘€ Author

Made by Aayam Sinha

LinkedIn Email