Developer Documentation

Fork it, extend it, deploy it. Everything you need to build with Activity Hub.

Introduction

Activity Hub is an open-source platform to unify student organizations, events, projects, and campus resources. Our goal: make it effortless for students and staff to discover and collaborate.

This doc is intentionally lightweight for now—most of the action lives on GitHub. As APIs, SDKs, and widgets stabilize, this page will grow.

Tech Stack

Frontend

  • Next.js / React
  • Tailwind CSS
  • Headless UI patterns (custom listboxes, dialogs)

Backend & Database

  • Node.js (Next API routes or Express micro-services)
  • PostgreSQL + Prisma ORM
  • NextAuth for auth (Email/SSO)

Infra & CI/CD

  • Vercel (frontend)
  • Fly.io / Render / Docker for API & workers
  • GitHub Actions for tests, linting, builds, deploys

Quick Start

Clone & Install

git clone https://github.com/your-org/activity-hub.git
cd activity-hub
pnpm install   # or yarn / npm i

Configure Env & DB

cp .env.example .env.local
pnpm prisma migrate dev
pnpm prisma db seed   # optional

Run Dev Server

pnpm dev
# open http://localhost:3000

Environment Variables

Put everything in .env.local.

# Database
DATABASE_URL="postgres://USER:PASSWORD@HOST:PORT/DB"

# Auth
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="super-secret-string"

# Email (SMTP)
SMTP_HOST=
SMTP_PORT=
SMTP_USER=
SMTP_PASS=

See .env.example for the full list.

Architecture

Folders

  • /app or /pages – Next.js routes
  • /components – UI components
  • /lib – utils (db, helpers, hooks)
  • /prisma – schema & migrations
  • /public – static assets

Data Flow

Client → Server actions / API routes → Prisma → Postgres. We prefer server components when possible to keep data-fetching secure and fast.

Auth

NextAuth handles sessions. We keep roles/permissions in Postgres via Prisma. Protect API routes with session checks or middleware.

API (Work in Progress)

Public endpoints (events feed, org search, RSVP hooks) are planned. For now, internal routes live under /api/*. When stable, we'll publish an OpenAPI spec and a lightweight SDK.

UI & Components

Tailwind + headless patterns. Marketing-site components (hero, cards, custom listboxes) live in /components/ui. Please PR accessibility improvements—keyboard nav and ARIA matter.

Contributing

  1. Fork the repo & create a feature branch: git checkout -b feat/your-thing
  2. Run lint/tests locally, add screenshots for UI changes.
  3. Open a PR with a clear description. Link related issues.

Look for good-first-issue labels on GitHub if you're new here.

Coding Standards

  • Prettier + ESLint + Husky pre-commit hooks
  • Functional components & hooks only
  • TypeScript: avoid any; add proper types
  • Accessibility first (labels, roles, keyboard UX)
  • Conventional commits: feat:, fix:, chore:, etc.

Deployment

CI

Push to main triggers GitHub Actions: lint, test, build.

Production DB

Run prisma migrate deploy on prod after deploy.

Docker

Dockerfile & docker-compose included for VPS deploys.

Support & Questions

Open a GitHub issue or ping us via the contact form. Discord link is in the repo README.