Repository files navigation

The Forum

Princeton's campus events platform, built by TigerApps.

This is a Turborepo monorepo managed with Bun:

PackageWhat it is
apps/webThe main app — Next.js 15 (App Router), React 19, Tailwind v4, shadcn/ui
apps/databaseShared Drizzle ORM schema + migrations (PostgreSQL)
apps/admin-webAdmin dashboard — Vite + React
backends/fastapiFastAPI backend (Python 3.12, managed with uv)
apps/listserv-scraperPython scraper for Princeton listserv archives
apps/mpu-scraperScraper for MyPrincetonU events

New to the project? Follow Quick start below — it gets apps/web running locally, which is the primary thing you need. The Python backend and scrapers are optional until you work on them.


Prerequisites

ToolVersionInstall
Bun≥ 1.2macOS/Linux: curl -fsSL https://bun.sh/install | bash · Windows: powershell -c "irm bun.sh/install.ps1 | iex"
Docker Desktoplatestdocker.com (used only for local Postgres)
Git≥ 2.40Pre-installed on macOS; winget install Git.Git on Windows
uv≥ 0.5Only needed for the Python backend — see Python backend

Windows: use WSL2 or Git Bash for all commands below. Restart your terminal after installing tools so PATH updates apply.

Never use npm, yarn, or pnpm in this repo — always bun.


Quick start (apps/web)

1. Clone and install

git clone https://github.com/TigerAppsOrg/TheForum.git
cd TheForum
bun install # installs every workspace package + sets up Husky pre-commit hooks

2. Environment variables

Copy the example files:

cp .env.example .env # root — used by docker-compose
cp apps/web/.env.local.example apps/web/.env.local # Next.js app
cp apps/database/.env.example apps/database/.env # drizzle-kit CLI

Then fill in apps/web/.env.local. Env vars are validated at startup by apps/web/src/env.ts — the app won't boot if a required one is missing, and that file is the source of truth for what's required.

Can't obtain a value yourself? Ask Ibraheem. He is the contact for all credentials that aren't self-serve (Entra ID, Mapbox tokens, AWS, etc.).

VariableWhere to get it
DATABASE_URLDefault in the example file works as-is with the Docker database (port 5434)
AUTH_SECRETGenerate your own: openssl rand -base64 32
AUTH_AZURE_AD_CLIENT_ID / AUTH_AZURE_AD_CLIENT_SECRETAsk Ibraheem — these are the Microsoft Entra ID app credentials for Princeton CAS login
AUTH_AZURE_AD_TENANT_IDPrinceton's tenant ID — already filled in the example file
NEXT_PUBLIC_MAPBOX_TOKEN / NEXT_PUBLIC_CAMPUS_MAP_TOKEN / NEXT_PUBLIC_CAMPUS_MAP_STYLEAsk Ibraheem — Mapbox tokens + the Princeton campus map style URL
AWS_S3_BUCKET / AWS_REGIONOptional (image uploads) — ask Ibraheem if you're working on that feature

3. Start the database

Make sure Docker Desktop is running, then from the repo root:

bun run db:up # starts Postgres 17 in Docker (container: the-forum-db, host port 5434)
bun run db:push # push the Drizzle schema into the fresh database

Sanity checks:

docker compose ps # the-forum-db should show "Up (healthy)"
bun run db:logs # tail the Postgres logs if something looks wrong

The database URL is postgresql://forum:forum_password@localhost:5434/the_forum (also reachable with any Postgres client, e.g. psql, TablePlus, or bun run db:studio).

Optionally fill the database with realistic demo data:

bun run db:seed

4. Run the app

cd apps/web && bun run dev

Open http://localhost:3000. You're set up.

To run everything at once (web + admin + FastAPI) from the repo root:

bun run dev # Turborepo TUI: web :3000, admin-web :5173, FastAPI :8000

(FastAPI will only start if you've done the Python backend setup.)


Everyday commands

bun run check # Biome lint + format with auto-fix (run before pushing)
bun run format # format only
bun run build # build all packages
bun run db:up # start Postgres db:down stop it (data persists)
bun run db:push # push schema (dev) db:generate generate SQL migrations
bun run db:migrate # apply migrations db:studio visual DB browser
bun run db:seed # seed demo data (safe to re-run any time)

Pre-commit hooks (Husky + lint-staged) automatically run Biome on staged files — if your commit fails, read the Biome output, fix, and re-commit.

Conventions

  • Env vars in apps/web: always import { env } from "~/env" — never process.env.* directly. New vars get added to apps/web/src/env.tsand the .env.example files.
  • UI components: use shadcn/ui. Add new ones from apps/web: bunx shadcn@latest add <component>.
  • Linting: Biome only (no ESLint/Prettier). Python uses Ruff.

Python backend (optional)

Only needed if you're working on backends/fastapi or the scrapers.

cd backends/fastapi
cp .env.example .env # default DATABASE_URL works with the Docker database
uv sync # creates .venv and installs all dependencies
bun run dev # = uv run uvicorn app.main:app --reload --port 8000

API docs live at http://localhost:8000/docs. Lint with uv run ruff check . and format with uv run ruff format ..


Branching workflow

main is protected — you cannot push to it directly, and pull requests into main are only accepted from staging.

  1. Branch off main: git checkout -b feat/my-feature origin/main
  2. Open a PR into staging and merge it there
  3. When staging is ready to ship, open a PR from staging into main

Troubleshooting

The app crashes on startup with "Invalid environment variables" A required var in apps/web/.env.local is missing or malformed — compare against apps/web/.env.local.example and the table above.

ECONNREFUSED / DATABASE_URL errors The database container isn't running (bun run db:up), or your DATABASE_URL uses the wrong port — the Docker database listens on 5434, not 5432.

Port 5434 already in use Change POSTGRES_PORT in the root .env and update DATABASE_URL everywhere to match.

Husky hooks not running Re-run bun install from the repo root (the prepare script reinstalls hooks).

bun run dev doesn't start FastAPI Expected unless you've run uv sync in backends/fastapi and uv is on your PATH.

Wipe the database and start freshdocker compose down -v (deletes the data volume), then bun run db:up && bun run db:push && bun run db:seed.

About

princeton university's ai-powered events & happenings hub

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Repository files navigation

The Forum

Princeton's campus events platform, built by TigerApps.

This is a Turborepo monorepo managed with Bun:

PackageWhat it is
apps/webThe main app — Next.js 15 (App Router), React 19, Tailwind v4, shadcn/ui
apps/databaseShared Drizzle ORM schema + migrations (PostgreSQL)
apps/admin-webAdmin dashboard — Vite + React
backends/fastapiFastAPI backend (Python 3.12, managed with uv)
apps/listserv-scraperPython scraper for Princeton listserv archives
apps/mpu-scraperScraper for MyPrincetonU events

New to the project? Follow Quick start below — it gets apps/web running locally, which is the primary thing you need. The Python backend and scrapers are optional until you work on them.


Prerequisites

ToolVersionInstall
Bun≥ 1.2macOS/Linux: curl -fsSL https://bun.sh/install | bash · Windows: powershell -c "irm bun.sh/install.ps1 | iex"
Docker Desktoplatestdocker.com (used only for local Postgres)
Git≥ 2.40Pre-installed on macOS; winget install Git.Git on Windows
uv≥ 0.5Only needed for the Python backend — see Python backend

Windows: use WSL2 or Git Bash for all commands below. Restart your terminal after installing tools so PATH updates apply.

Never use npm, yarn, or pnpm in this repo — always bun.


Quick start (apps/web)

1. Clone and install

git clone https://github.com/TigerAppsOrg/TheForum.git
cd TheForum
bun install # installs every workspace package + sets up Husky pre-commit hooks

2. Environment variables

Copy the example files:

cp .env.example .env # root — used by docker-compose
cp apps/web/.env.local.example apps/web/.env.local # Next.js app
cp apps/database/.env.example apps/database/.env # drizzle-kit CLI

Then fill in apps/web/.env.local. Env vars are validated at startup by apps/web/src/env.ts — the app won't boot if a required one is missing, and that file is the source of truth for what's required.

Can't obtain a value yourself? Ask Ibraheem. He is the contact for all credentials that aren't self-serve (Entra ID, Mapbox tokens, AWS, etc.).

VariableWhere to get it
DATABASE_URLDefault in the example file works as-is with the Docker database (port 5434)
AUTH_SECRETGenerate your own: openssl rand -base64 32
AUTH_AZURE_AD_CLIENT_ID / AUTH_AZURE_AD_CLIENT_SECRETAsk Ibraheem — these are the Microsoft Entra ID app credentials for Princeton CAS login
AUTH_AZURE_AD_TENANT_IDPrinceton's tenant ID — already filled in the example file
NEXT_PUBLIC_MAPBOX_TOKEN / NEXT_PUBLIC_CAMPUS_MAP_TOKEN / NEXT_PUBLIC_CAMPUS_MAP_STYLEAsk Ibraheem — Mapbox tokens + the Princeton campus map style URL
AWS_S3_BUCKET / AWS_REGIONOptional (image uploads) — ask Ibraheem if you're working on that feature

3. Start the database

Make sure Docker Desktop is running, then from the repo root:

bun run db:up # starts Postgres 17 in Docker (container: the-forum-db, host port 5434)
bun run db:push # push the Drizzle schema into the fresh database

Sanity checks:

docker compose ps # the-forum-db should show "Up (healthy)"
bun run db:logs # tail the Postgres logs if something looks wrong

The database URL is postgresql://forum:forum_password@localhost:5434/the_forum (also reachable with any Postgres client, e.g. psql, TablePlus, or bun run db:studio).

Optionally fill the database with realistic demo data:

bun run db:seed

4. Run the app

cd apps/web && bun run dev

Open http://localhost:3000. You're set up.

To run everything at once (web + admin + FastAPI) from the repo root:

bun run dev # Turborepo TUI: web :3000, admin-web :5173, FastAPI :8000

(FastAPI will only start if you've done the Python backend setup.)


Everyday commands

bun run check # Biome lint + format with auto-fix (run before pushing)
bun run format # format only
bun run build # build all packages
bun run db:up # start Postgres db:down stop it (data persists)
bun run db:push # push schema (dev) db:generate generate SQL migrations
bun run db:migrate # apply migrations db:studio visual DB browser
bun run db:seed # seed demo data (safe to re-run any time)

Pre-commit hooks (Husky + lint-staged) automatically run Biome on staged files — if your commit fails, read the Biome output, fix, and re-commit.

Conventions

  • Env vars in apps/web: always import { env } from "~/env" — never process.env.* directly. New vars get added to apps/web/src/env.tsand the .env.example files.
  • UI components: use shadcn/ui. Add new ones from apps/web: bunx shadcn@latest add <component>.
  • Linting: Biome only (no ESLint/Prettier). Python uses Ruff.

Python backend (optional)

Only needed if you're working on backends/fastapi or the scrapers.

cd backends/fastapi
cp .env.example .env # default DATABASE_URL works with the Docker database
uv sync # creates .venv and installs all dependencies
bun run dev # = uv run uvicorn app.main:app --reload --port 8000

API docs live at http://localhost:8000/docs. Lint with uv run ruff check . and format with uv run ruff format ..


Branching workflow

main is protected — you cannot push to it directly, and pull requests into main are only accepted from staging.

  1. Branch off main: git checkout -b feat/my-feature origin/main
  2. Open a PR into staging and merge it there
  3. When staging is ready to ship, open a PR from staging into main

Troubleshooting

The app crashes on startup with "Invalid environment variables" A required var in apps/web/.env.local is missing or malformed — compare against apps/web/.env.local.example and the table above.

ECONNREFUSED / DATABASE_URL errors The database container isn't running (bun run db:up), or your DATABASE_URL uses the wrong port — the Docker database listens on 5434, not 5432.

Port 5434 already in use Change POSTGRES_PORT in the root .env and update DATABASE_URL everywhere to match.

Husky hooks not running Re-run bun install from the repo root (the prepare script reinstalls hooks).

bun run dev doesn't start FastAPI Expected unless you've run uv sync in backends/fastapi and uv is on your PATH.

Wipe the database and start freshdocker compose down -v (deletes the data volume), then bun run db:up && bun run db:push && bun run db:seed.

About

princeton university's ai-powered events & happenings hub

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

The Forum

Princeton's campus events platform, built by TigerApps.

This is a Turborepo monorepo managed with Bun:

PackageWhat it is
apps/webThe main app — Next.js 15 (App Router), React 19, Tailwind v4, shadcn/ui
apps/databaseShared Drizzle ORM schema + migrations (PostgreSQL)
apps/admin-webAdmin dashboard — Vite + React
backends/fastapiFastAPI backend (Python 3.12, managed with uv)
apps/listserv-scraperPython scraper for Princeton listserv archives
apps/mpu-scraperScraper for MyPrincetonU events

New to the project? Follow Quick start below — it gets apps/web running locally, which is the primary thing you need. The Python backend and scrapers are optional until you work on them.


Prerequisites

ToolVersionInstall
Bun≥ 1.2macOS/Linux: curl -fsSL https://bun.sh/install | bash · Windows: powershell -c "irm bun.sh/install.ps1 | iex"
Docker Desktoplatestdocker.com (used only for local Postgres)
Git≥ 2.40Pre-installed on macOS; winget install Git.Git on Windows
uv≥ 0.5Only needed for the Python backend — see Python backend

Windows: use WSL2 or Git Bash for all commands below. Restart your terminal after installing tools so PATH updates apply.

Never use npm, yarn, or pnpm in this repo — always bun.


Quick start (apps/web)

1. Clone and install

git clone https://github.com/TigerAppsOrg/TheForum.git
cd TheForum
bun install # installs every workspace package + sets up Husky pre-commit hooks

2. Environment variables

Copy the example files:

cp .env.example .env # root — used by docker-compose
cp apps/web/.env.local.example apps/web/.env.local # Next.js app
cp apps/database/.env.example apps/database/.env # drizzle-kit CLI

Then fill in apps/web/.env.local. Env vars are validated at startup by apps/web/src/env.ts — the app won't boot if a required one is missing, and that file is the source of truth for what's required.

Can't obtain a value yourself? Ask Ibraheem. He is the contact for all credentials that aren't self-serve (Entra ID, Mapbox tokens, AWS, etc.).

VariableWhere to get it
DATABASE_URLDefault in the example file works as-is with the Docker database (port 5434)
AUTH_SECRETGenerate your own: openssl rand -base64 32
AUTH_AZURE_AD_CLIENT_ID / AUTH_AZURE_AD_CLIENT_SECRETAsk Ibraheem — these are the Microsoft Entra ID app credentials for Princeton CAS login
AUTH_AZURE_AD_TENANT_IDPrinceton's tenant ID — already filled in the example file
NEXT_PUBLIC_MAPBOX_TOKEN / NEXT_PUBLIC_CAMPUS_MAP_TOKEN / NEXT_PUBLIC_CAMPUS_MAP_STYLEAsk Ibraheem — Mapbox tokens + the Princeton campus map style URL
AWS_S3_BUCKET / AWS_REGIONOptional (image uploads) — ask Ibraheem if you're working on that feature

3. Start the database

Make sure Docker Desktop is running, then from the repo root:

bun run db:up # starts Postgres 17 in Docker (container: the-forum-db, host port 5434)
bun run db:push # push the Drizzle schema into the fresh database

Sanity checks:

docker compose ps # the-forum-db should show "Up (healthy)"
bun run db:logs # tail the Postgres logs if something looks wrong

The database URL is postgresql://forum:forum_password@localhost:5434/the_forum (also reachable with any Postgres client, e.g. psql, TablePlus, or bun run db:studio).

Optionally fill the database with realistic demo data:

bun run db:seed

4. Run the app

cd apps/web && bun run dev

Open http://localhost:3000. You're set up.

To run everything at once (web + admin + FastAPI) from the repo root:

bun run dev # Turborepo TUI: web :3000, admin-web :5173, FastAPI :8000

(FastAPI will only start if you've done the Python backend setup.)


Everyday commands

bun run check # Biome lint + format with auto-fix (run before pushing)
bun run format # format only
bun run build # build all packages
bun run db:up # start Postgres db:down stop it (data persists)
bun run db:push # push schema (dev) db:generate generate SQL migrations
bun run db:migrate # apply migrations db:studio visual DB browser
bun run db:seed # seed demo data (safe to re-run any time)

Pre-commit hooks (Husky + lint-staged) automatically run Biome on staged files — if your commit fails, read the Biome output, fix, and re-commit.

Conventions

  • Env vars in apps/web: always import { env } from "~/env" — never process.env.* directly. New vars get added to apps/web/src/env.tsand the .env.example files.
  • UI components: use shadcn/ui. Add new ones from apps/web: bunx shadcn@latest add <component>.
  • Linting: Biome only (no ESLint/Prettier). Python uses Ruff.

Python backend (optional)

Only needed if you're working on backends/fastapi or the scrapers.

cd backends/fastapi
cp .env.example .env # default DATABASE_URL works with the Docker database
uv sync # creates .venv and installs all dependencies
bun run dev # = uv run uvicorn app.main:app --reload --port 8000

API docs live at http://localhost:8000/docs. Lint with uv run ruff check . and format with uv run ruff format ..


Branching workflow

main is protected — you cannot push to it directly, and pull requests into main are only accepted from staging.

  1. Branch off main: git checkout -b feat/my-feature origin/main
  2. Open a PR into staging and merge it there
  3. When staging is ready to ship, open a PR from staging into main

Troubleshooting

The app crashes on startup with "Invalid environment variables" A required var in apps/web/.env.local is missing or malformed — compare against apps/web/.env.local.example and the table above.

ECONNREFUSED / DATABASE_URL errors The database container isn't running (bun run db:up), or your DATABASE_URL uses the wrong port — the Docker database listens on 5434, not 5432.

Port 5434 already in use Change POSTGRES_PORT in the root .env and update DATABASE_URL everywhere to match.

Husky hooks not running Re-run bun install from the repo root (the prepare script reinstalls hooks).

bun run dev doesn't start FastAPI Expected unless you've run uv sync in backends/fastapi and uv is on your PATH.

Wipe the database and start freshdocker compose down -v (deletes the data volume), then bun run db:up && bun run db:push && bun run db:seed.

About

princeton university's ai-powered events & happenings hub

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

The Forum

Princeton's campus events platform, built by TigerApps.

This is a Turborepo monorepo managed with Bun:

PackageWhat it is
apps/webThe main app — Next.js 15 (App Router), React 19, Tailwind v4, shadcn/ui
apps/databaseShared Drizzle ORM schema + migrations (PostgreSQL)
apps/admin-webAdmin dashboard — Vite + React
backends/fastapiFastAPI backend (Python 3.12, managed with uv)
apps/listserv-scraperPython scraper for Princeton listserv archives
apps/mpu-scraperScraper for MyPrincetonU events

New to the project? Follow Quick start below — it gets apps/web running locally, which is the primary thing you need. The Python backend and scrapers are optional until you work on them.


Prerequisites

ToolVersionInstall
Bun≥ 1.2macOS/Linux: curl -fsSL https://bun.sh/install | bash · Windows: powershell -c "irm bun.sh/install.ps1 | iex"
Docker Desktoplatestdocker.com (used only for local Postgres)
Git≥ 2.40Pre-installed on macOS; winget install Git.Git on Windows
uv≥ 0.5Only needed for the Python backend — see Python backend

Windows: use WSL2 or Git Bash for all commands below. Restart your terminal after installing tools so PATH updates apply.

Never use npm, yarn, or pnpm in this repo — always bun.


Quick start (apps/web)

1. Clone and install

git clone https://github.com/TigerAppsOrg/TheForum.git
cd TheForum
bun install # installs every workspace package + sets up Husky pre-commit hooks

2. Environment variables

Copy the example files:

cp .env.example .env # root — used by docker-compose
cp apps/web/.env.local.example apps/web/.env.local # Next.js app
cp apps/database/.env.example apps/database/.env # drizzle-kit CLI

Then fill in apps/web/.env.local. Env vars are validated at startup by apps/web/src/env.ts — the app won't boot if a required one is missing, and that file is the source of truth for what's required.

Can't obtain a value yourself? Ask Ibraheem. He is the contact for all credentials that aren't self-serve (Entra ID, Mapbox tokens, AWS, etc.).

VariableWhere to get it
DATABASE_URLDefault in the example file works as-is with the Docker database (port 5434)
AUTH_SECRETGenerate your own: openssl rand -base64 32
AUTH_AZURE_AD_CLIENT_ID / AUTH_AZURE_AD_CLIENT_SECRETAsk Ibraheem — these are the Microsoft Entra ID app credentials for Princeton CAS login
AUTH_AZURE_AD_TENANT_IDPrinceton's tenant ID — already filled in the example file
NEXT_PUBLIC_MAPBOX_TOKEN / NEXT_PUBLIC_CAMPUS_MAP_TOKEN / NEXT_PUBLIC_CAMPUS_MAP_STYLEAsk Ibraheem — Mapbox tokens + the Princeton campus map style URL
AWS_S3_BUCKET / AWS_REGIONOptional (image uploads) — ask Ibraheem if you're working on that feature

3. Start the database

Make sure Docker Desktop is running, then from the repo root:

bun run db:up # starts Postgres 17 in Docker (container: the-forum-db, host port 5434)
bun run db:push # push the Drizzle schema into the fresh database

Sanity checks:

docker compose ps # the-forum-db should show "Up (healthy)"
bun run db:logs # tail the Postgres logs if something looks wrong

The database URL is postgresql://forum:forum_password@localhost:5434/the_forum (also reachable with any Postgres client, e.g. psql, TablePlus, or bun run db:studio).

Optionally fill the database with realistic demo data:

bun run db:seed

4. Run the app

cd apps/web && bun run dev

Open http://localhost:3000. You're set up.

To run everything at once (web + admin + FastAPI) from the repo root:

bun run dev # Turborepo TUI: web :3000, admin-web :5173, FastAPI :8000

(FastAPI will only start if you've done the Python backend setup.)


Everyday commands

bun run check # Biome lint + format with auto-fix (run before pushing)
bun run format # format only
bun run build # build all packages
bun run db:up # start Postgres db:down stop it (data persists)
bun run db:push # push schema (dev) db:generate generate SQL migrations
bun run db:migrate # apply migrations db:studio visual DB browser
bun run db:seed # seed demo data (safe to re-run any time)

Pre-commit hooks (Husky + lint-staged) automatically run Biome on staged files — if your commit fails, read the Biome output, fix, and re-commit.

Conventions

  • Env vars in apps/web: always import { env } from "~/env" — never process.env.* directly. New vars get added to apps/web/src/env.tsand the .env.example files.
  • UI components: use shadcn/ui. Add new ones from apps/web: bunx shadcn@latest add <component>.
  • Linting: Biome only (no ESLint/Prettier). Python uses Ruff.

Python backend (optional)

Only needed if you're working on backends/fastapi or the scrapers.

cd backends/fastapi
cp .env.example .env # default DATABASE_URL works with the Docker database
uv sync # creates .venv and installs all dependencies
bun run dev # = uv run uvicorn app.main:app --reload --port 8000

API docs live at http://localhost:8000/docs. Lint with uv run ruff check . and format with uv run ruff format ..


Branching workflow

main is protected — you cannot push to it directly, and pull requests into main are only accepted from staging.

  1. Branch off main: git checkout -b feat/my-feature origin/main
  2. Open a PR into staging and merge it there
  3. When staging is ready to ship, open a PR from staging into main

Troubleshooting

The app crashes on startup with "Invalid environment variables" A required var in apps/web/.env.local is missing or malformed — compare against apps/web/.env.local.example and the table above.

ECONNREFUSED / DATABASE_URL errors The database container isn't running (bun run db:up), or your DATABASE_URL uses the wrong port — the Docker database listens on 5434, not 5432.

Port 5434 already in use Change POSTGRES_PORT in the root .env and update DATABASE_URL everywhere to match.

Husky hooks not running Re-run bun install from the repo root (the prepare script reinstalls hooks).

bun run dev doesn't start FastAPI Expected unless you've run uv sync in backends/fastapi and uv is on your PATH.

Wipe the database and start freshdocker compose down -v (deletes the data volume), then bun run db:up && bun run db:push && bun run db:seed.

About

princeton university's ai-powered events & happenings hub

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Repository files navigation

The Forum

Princeton's campus events platform, built by TigerApps.

This is a Turborepo monorepo managed with Bun:

PackageWhat it is
apps/webThe main app — Next.js 15 (App Router), React 19, Tailwind v4, shadcn/ui
apps/databaseShared Drizzle ORM schema + migrations (PostgreSQL)
apps/admin-webAdmin dashboard — Vite + React
backends/fastapiFastAPI backend (Python 3.12, managed with uv)
apps/listserv-scraperPython scraper for Princeton listserv archives
apps/mpu-scraperScraper for MyPrincetonU events

New to the project? Follow Quick start below — it gets apps/web running locally, which is the primary thing you need. The Python backend and scrapers are optional until you work on them.


Prerequisites

ToolVersionInstall
Bun≥ 1.2macOS/Linux: curl -fsSL https://bun.sh/install | bash · Windows: powershell -c "irm bun.sh/install.ps1 | iex"
Docker Desktoplatestdocker.com (used only for local Postgres)
Git≥ 2.40Pre-installed on macOS; winget install Git.Git on Windows
uv≥ 0.5Only needed for the Python backend — see Python backend

Windows: use WSL2 or Git Bash for all commands below. Restart your terminal after installing tools so PATH updates apply.

Never use npm, yarn, or pnpm in this repo — always bun.


Quick start (apps/web)

1. Clone and install

git clone https://github.com/TigerAppsOrg/TheForum.git
cd TheForum
bun install # installs every workspace package + sets up Husky pre-commit hooks

2. Environment variables

Copy the example files:

cp .env.example .env # root — used by docker-compose
cp apps/web/.env.local.example apps/web/.env.local # Next.js app
cp apps/database/.env.example apps/database/.env # drizzle-kit CLI

Then fill in apps/web/.env.local. Env vars are validated at startup by apps/web/src/env.ts — the app won't boot if a required one is missing, and that file is the source of truth for what's required.

Can't obtain a value yourself? Ask Ibraheem. He is the contact for all credentials that aren't self-serve (Entra ID, Mapbox tokens, AWS, etc.).

VariableWhere to get it
DATABASE_URLDefault in the example file works as-is with the Docker database (port 5434)
AUTH_SECRETGenerate your own: openssl rand -base64 32
AUTH_AZURE_AD_CLIENT_ID / AUTH_AZURE_AD_CLIENT_SECRETAsk Ibraheem — these are the Microsoft Entra ID app credentials for Princeton CAS login
AUTH_AZURE_AD_TENANT_IDPrinceton's tenant ID — already filled in the example file
NEXT_PUBLIC_MAPBOX_TOKEN / NEXT_PUBLIC_CAMPUS_MAP_TOKEN / NEXT_PUBLIC_CAMPUS_MAP_STYLEAsk Ibraheem — Mapbox tokens + the Princeton campus map style URL
AWS_S3_BUCKET / AWS_REGIONOptional (image uploads) — ask Ibraheem if you're working on that feature

3. Start the database

Make sure Docker Desktop is running, then from the repo root:

bun run db:up # starts Postgres 17 in Docker (container: the-forum-db, host port 5434)
bun run db:push # push the Drizzle schema into the fresh database

Sanity checks:

docker compose ps # the-forum-db should show "Up (healthy)"
bun run db:logs # tail the Postgres logs if something looks wrong

The database URL is postgresql://forum:forum_password@localhost:5434/the_forum (also reachable with any Postgres client, e.g. psql, TablePlus, or bun run db:studio).

Optionally fill the database with realistic demo data:

bun run db:seed

4. Run the app

cd apps/web && bun run dev

Open http://localhost:3000. You're set up.

To run everything at once (web + admin + FastAPI) from the repo root:

bun run dev # Turborepo TUI: web :3000, admin-web :5173, FastAPI :8000

(FastAPI will only start if you've done the Python backend setup.)


Everyday commands

bun run check # Biome lint + format with auto-fix (run before pushing)
bun run format # format only
bun run build # build all packages
bun run db:up # start Postgres db:down stop it (data persists)
bun run db:push # push schema (dev) db:generate generate SQL migrations
bun run db:migrate # apply migrations db:studio visual DB browser
bun run db:seed # seed demo data (safe to re-run any time)

Pre-commit hooks (Husky + lint-staged) automatically run Biome on staged files — if your commit fails, read the Biome output, fix, and re-commit.

Conventions

  • Env vars in apps/web: always import { env } from "~/env" — never process.env.* directly. New vars get added to apps/web/src/env.tsand the .env.example files.
  • UI components: use shadcn/ui. Add new ones from apps/web: bunx shadcn@latest add <component>.
  • Linting: Biome only (no ESLint/Prettier). Python uses Ruff.

Python backend (optional)

Only needed if you're working on backends/fastapi or the scrapers.

cd backends/fastapi
cp .env.example .env # default DATABASE_URL works with the Docker database
uv sync # creates .venv and installs all dependencies
bun run dev # = uv run uvicorn app.main:app --reload --port 8000

API docs live at http://localhost:8000/docs. Lint with uv run ruff check . and format with uv run ruff format ..


Branching workflow

main is protected — you cannot push to it directly, and pull requests into main are only accepted from staging.

  1. Branch off main: git checkout -b feat/my-feature origin/main
  2. Open a PR into staging and merge it there
  3. When staging is ready to ship, open a PR from staging into main

Troubleshooting

The app crashes on startup with "Invalid environment variables" A required var in apps/web/.env.local is missing or malformed — compare against apps/web/.env.local.example and the table above.

ECONNREFUSED / DATABASE_URL errors The database container isn't running (bun run db:up), or your DATABASE_URL uses the wrong port — the Docker database listens on 5434, not 5432.

Port 5434 already in use Change POSTGRES_PORT in the root .env and update DATABASE_URL everywhere to match.

Husky hooks not running Re-run bun install from the repo root (the prepare script reinstalls hooks).

bun run dev doesn't start FastAPI Expected unless you've run uv sync in backends/fastapi and uv is on your PATH.

Wipe the database and start freshdocker compose down -v (deletes the data volume), then bun run db:up && bun run db:push && bun run db:seed.

About

princeton university's ai-powered events & happenings hub

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

The Forum

Princeton's campus events platform, built by TigerApps.

This is a Turborepo monorepo managed with Bun:

PackageWhat it is
apps/webThe main app — Next.js 15 (App Router), React 19, Tailwind v4, shadcn/ui
apps/databaseShared Drizzle ORM schema + migrations (PostgreSQL)
apps/admin-webAdmin dashboard — Vite + React
backends/fastapiFastAPI backend (Python 3.12, managed with uv)
apps/listserv-scraperPython scraper for Princeton listserv archives
apps/mpu-scraperScraper for MyPrincetonU events

New to the project? Follow Quick start below — it gets apps/web running locally, which is the primary thing you need. The Python backend and scrapers are optional until you work on them.


Prerequisites

ToolVersionInstall
Bun≥ 1.2macOS/Linux: curl -fsSL https://bun.sh/install | bash · Windows: powershell -c "irm bun.sh/install.ps1 | iex"
Docker Desktoplatestdocker.com (used only for local Postgres)
Git≥ 2.40Pre-installed on macOS; winget install Git.Git on Windows
uv≥ 0.5Only needed for the Python backend — see Python backend

Windows: use WSL2 or Git Bash for all commands below. Restart your terminal after installing tools so PATH updates apply.

Never use npm, yarn, or pnpm in this repo — always bun.


Quick start (apps/web)

1. Clone and install

git clone https://github.com/TigerAppsOrg/TheForum.git
cd TheForum
bun install # installs every workspace package + sets up Husky pre-commit hooks

2. Environment variables

Copy the example files:

cp .env.example .env # root — used by docker-compose
cp apps/web/.env.local.example apps/web/.env.local # Next.js app
cp apps/database/.env.example apps/database/.env # drizzle-kit CLI

Then fill in apps/web/.env.local. Env vars are validated at startup by apps/web/src/env.ts — the app won't boot if a required one is missing, and that file is the source of truth for what's required.

Can't obtain a value yourself? Ask Ibraheem. He is the contact for all credentials that aren't self-serve (Entra ID, Mapbox tokens, AWS, etc.).

VariableWhere to get it
DATABASE_URLDefault in the example file works as-is with the Docker database (port 5434)
AUTH_SECRETGenerate your own: openssl rand -base64 32
AUTH_AZURE_AD_CLIENT_ID / AUTH_AZURE_AD_CLIENT_SECRETAsk Ibraheem — these are the Microsoft Entra ID app credentials for Princeton CAS login
AUTH_AZURE_AD_TENANT_IDPrinceton's tenant ID — already filled in the example file
NEXT_PUBLIC_MAPBOX_TOKEN / NEXT_PUBLIC_CAMPUS_MAP_TOKEN / NEXT_PUBLIC_CAMPUS_MAP_STYLEAsk Ibraheem — Mapbox tokens + the Princeton campus map style URL
AWS_S3_BUCKET / AWS_REGIONOptional (image uploads) — ask Ibraheem if you're working on that feature

3. Start the database

Make sure Docker Desktop is running, then from the repo root:

bun run db:up # starts Postgres 17 in Docker (container: the-forum-db, host port 5434)
bun run db:push # push the Drizzle schema into the fresh database

Sanity checks:

docker compose ps # the-forum-db should show "Up (healthy)"
bun run db:logs # tail the Postgres logs if something looks wrong

The database URL is postgresql://forum:forum_password@localhost:5434/the_forum (also reachable with any Postgres client, e.g. psql, TablePlus, or bun run db:studio).

Optionally fill the database with realistic demo data:

bun run db:seed

4. Run the app

cd apps/web && bun run dev

Open http://localhost:3000. You're set up.

To run everything at once (web + admin + FastAPI) from the repo root:

bun run dev # Turborepo TUI: web :3000, admin-web :5173, FastAPI :8000

(FastAPI will only start if you've done the Python backend setup.)


Everyday commands

bun run check # Biome lint + format with auto-fix (run before pushing)
bun run format # format only
bun run build # build all packages
bun run db:up # start Postgres db:down stop it (data persists)
bun run db:push # push schema (dev) db:generate generate SQL migrations
bun run db:migrate # apply migrations db:studio visual DB browser
bun run db:seed # seed demo data (safe to re-run any time)

Pre-commit hooks (Husky + lint-staged) automatically run Biome on staged files — if your commit fails, read the Biome output, fix, and re-commit.

Conventions

  • Env vars in apps/web: always import { env } from "~/env" — never process.env.* directly. New vars get added to apps/web/src/env.tsand the .env.example files.
  • UI components: use shadcn/ui. Add new ones from apps/web: bunx shadcn@latest add <component>.
  • Linting: Biome only (no ESLint/Prettier). Python uses Ruff.

Python backend (optional)

Only needed if you're working on backends/fastapi or the scrapers.

cd backends/fastapi
cp .env.example .env # default DATABASE_URL works with the Docker database
uv sync # creates .venv and installs all dependencies
bun run dev # = uv run uvicorn app.main:app --reload --port 8000

API docs live at http://localhost:8000/docs. Lint with uv run ruff check . and format with uv run ruff format ..


Branching workflow

main is protected — you cannot push to it directly, and pull requests into main are only accepted from staging.

  1. Branch off main: git checkout -b feat/my-feature origin/main
  2. Open a PR into staging and merge it there
  3. When staging is ready to ship, open a PR from staging into main

Troubleshooting

The app crashes on startup with "Invalid environment variables" A required var in apps/web/.env.local is missing or malformed — compare against apps/web/.env.local.example and the table above.

ECONNREFUSED / DATABASE_URL errors The database container isn't running (bun run db:up), or your DATABASE_URL uses the wrong port — the Docker database listens on 5434, not 5432.

Port 5434 already in use Change POSTGRES_PORT in the root .env and update DATABASE_URL everywhere to match.

Husky hooks not running Re-run bun install from the repo root (the prepare script reinstalls hooks).

bun run dev doesn't start FastAPI Expected unless you've run uv sync in backends/fastapi and uv is on your PATH.

Wipe the database and start freshdocker compose down -v (deletes the data volume), then bun run db:up && bun run db:push && bun run db:seed.

About

princeton university's ai-powered events & happenings hub

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

The Forum

Princeton's campus events platform, built by TigerApps.

This is a Turborepo monorepo managed with Bun:

PackageWhat it is
apps/webThe main app — Next.js 15 (App Router), React 19, Tailwind v4, shadcn/ui
apps/databaseShared Drizzle ORM schema + migrations (PostgreSQL)
apps/admin-webAdmin dashboard — Vite + React
backends/fastapiFastAPI backend (Python 3.12, managed with uv)
apps/listserv-scraperPython scraper for Princeton listserv archives
apps/mpu-scraperScraper for MyPrincetonU events

New to the project? Follow Quick start below — it gets apps/web running locally, which is the primary thing you need. The Python backend and scrapers are optional until you work on them.


Prerequisites

ToolVersionInstall
Bun≥ 1.2macOS/Linux: curl -fsSL https://bun.sh/install | bash · Windows: powershell -c "irm bun.sh/install.ps1 | iex"
Docker Desktoplatestdocker.com (used only for local Postgres)
Git≥ 2.40Pre-installed on macOS; winget install Git.Git on Windows
uv≥ 0.5Only needed for the Python backend — see Python backend

Windows: use WSL2 or Git Bash for all commands below. Restart your terminal after installing tools so PATH updates apply.

Never use npm, yarn, or pnpm in this repo — always bun.


Quick start (apps/web)

1. Clone and install

git clone https://github.com/TigerAppsOrg/TheForum.git
cd TheForum
bun install # installs every workspace package + sets up Husky pre-commit hooks

2. Environment variables

Copy the example files:

cp .env.example .env # root — used by docker-compose
cp apps/web/.env.local.example apps/web/.env.local # Next.js app
cp apps/database/.env.example apps/database/.env # drizzle-kit CLI

Then fill in apps/web/.env.local. Env vars are validated at startup by apps/web/src/env.ts — the app won't boot if a required one is missing, and that file is the source of truth for what's required.

Can't obtain a value yourself? Ask Ibraheem. He is the contact for all credentials that aren't self-serve (Entra ID, Mapbox tokens, AWS, etc.).

VariableWhere to get it
DATABASE_URLDefault in the example file works as-is with the Docker database (port 5434)
AUTH_SECRETGenerate your own: openssl rand -base64 32
AUTH_AZURE_AD_CLIENT_ID / AUTH_AZURE_AD_CLIENT_SECRETAsk Ibraheem — these are the Microsoft Entra ID app credentials for Princeton CAS login
AUTH_AZURE_AD_TENANT_IDPrinceton's tenant ID — already filled in the example file
NEXT_PUBLIC_MAPBOX_TOKEN / NEXT_PUBLIC_CAMPUS_MAP_TOKEN / NEXT_PUBLIC_CAMPUS_MAP_STYLEAsk Ibraheem — Mapbox tokens + the Princeton campus map style URL
AWS_S3_BUCKET / AWS_REGIONOptional (image uploads) — ask Ibraheem if you're working on that feature

3. Start the database

Make sure Docker Desktop is running, then from the repo root:

bun run db:up # starts Postgres 17 in Docker (container: the-forum-db, host port 5434)
bun run db:push # push the Drizzle schema into the fresh database

Sanity checks:

docker compose ps # the-forum-db should show "Up (healthy)"
bun run db:logs # tail the Postgres logs if something looks wrong

The database URL is postgresql://forum:forum_password@localhost:5434/the_forum (also reachable with any Postgres client, e.g. psql, TablePlus, or bun run db:studio).

Optionally fill the database with realistic demo data:

bun run db:seed

4. Run the app

cd apps/web && bun run dev

Open http://localhost:3000. You're set up.

To run everything at once (web + admin + FastAPI) from the repo root:

bun run dev # Turborepo TUI: web :3000, admin-web :5173, FastAPI :8000

(FastAPI will only start if you've done the Python backend setup.)


Everyday commands

bun run check # Biome lint + format with auto-fix (run before pushing)
bun run format # format only
bun run build # build all packages
bun run db:up # start Postgres db:down stop it (data persists)
bun run db:push # push schema (dev) db:generate generate SQL migrations
bun run db:migrate # apply migrations db:studio visual DB browser
bun run db:seed # seed demo data (safe to re-run any time)

Pre-commit hooks (Husky + lint-staged) automatically run Biome on staged files — if your commit fails, read the Biome output, fix, and re-commit.

Conventions

  • Env vars in apps/web: always import { env } from "~/env" — never process.env.* directly. New vars get added to apps/web/src/env.tsand the .env.example files.
  • UI components: use shadcn/ui. Add new ones from apps/web: bunx shadcn@latest add <component>.
  • Linting: Biome only (no ESLint/Prettier). Python uses Ruff.

Python backend (optional)

Only needed if you're working on backends/fastapi or the scrapers.

cd backends/fastapi
cp .env.example .env # default DATABASE_URL works with the Docker database
uv sync # creates .venv and installs all dependencies
bun run dev # = uv run uvicorn app.main:app --reload --port 8000

API docs live at http://localhost:8000/docs. Lint with uv run ruff check . and format with uv run ruff format ..


Branching workflow

main is protected — you cannot push to it directly, and pull requests into main are only accepted from staging.

  1. Branch off main: git checkout -b feat/my-feature origin/main
  2. Open a PR into staging and merge it there
  3. When staging is ready to ship, open a PR from staging into main

Troubleshooting

The app crashes on startup with "Invalid environment variables" A required var in apps/web/.env.local is missing or malformed — compare against apps/web/.env.local.example and the table above.

ECONNREFUSED / DATABASE_URL errors The database container isn't running (bun run db:up), or your DATABASE_URL uses the wrong port — the Docker database listens on 5434, not 5432.

Port 5434 already in use Change POSTGRES_PORT in the root .env and update DATABASE_URL everywhere to match.

Husky hooks not running Re-run bun install from the repo root (the prepare script reinstalls hooks).

bun run dev doesn't start FastAPI Expected unless you've run uv sync in backends/fastapi and uv is on your PATH.

Wipe the database and start freshdocker compose down -v (deletes the data volume), then bun run db:up && bun run db:push && bun run db:seed.

About

princeton university's ai-powered events & happenings hub

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Repository files navigation

The Forum

Princeton's campus events platform, built by TigerApps.

This is a Turborepo monorepo managed with Bun:

PackageWhat it is
apps/webThe main app — Next.js 15 (App Router), React 19, Tailwind v4, shadcn/ui
apps/databaseShared Drizzle ORM schema + migrations (PostgreSQL)
apps/admin-webAdmin dashboard — Vite + React
backends/fastapiFastAPI backend (Python 3.12, managed with uv)
apps/listserv-scraperPython scraper for Princeton listserv archives
apps/mpu-scraperScraper for MyPrincetonU events

New to the project? Follow Quick start below — it gets apps/web running locally, which is the primary thing you need. The Python backend and scrapers are optional until you work on them.


Prerequisites

ToolVersionInstall
Bun≥ 1.2macOS/Linux: curl -fsSL https://bun.sh/install | bash · Windows: powershell -c "irm bun.sh/install.ps1 | iex"
Docker Desktoplatestdocker.com (used only for local Postgres)
Git≥ 2.40Pre-installed on macOS; winget install Git.Git on Windows
uv≥ 0.5Only needed for the Python backend — see Python backend

Windows: use WSL2 or Git Bash for all commands below. Restart your terminal after installing tools so PATH updates apply.

Never use npm, yarn, or pnpm in this repo — always bun.


Quick start (apps/web)

1. Clone and install

git clone https://github.com/TigerAppsOrg/TheForum.git
cd TheForum
bun install # installs every workspace package + sets up Husky pre-commit hooks

2. Environment variables

Copy the example files:

cp .env.example .env # root — used by docker-compose
cp apps/web/.env.local.example apps/web/.env.local # Next.js app
cp apps/database/.env.example apps/database/.env # drizzle-kit CLI

Then fill in apps/web/.env.local. Env vars are validated at startup by apps/web/src/env.ts — the app won't boot if a required one is missing, and that file is the source of truth for what's required.

Can't obtain a value yourself? Ask Ibraheem. He is the contact for all credentials that aren't self-serve (Entra ID, Mapbox tokens, AWS, etc.).

VariableWhere to get it
DATABASE_URLDefault in the example file works as-is with the Docker database (port 5434)
AUTH_SECRETGenerate your own: openssl rand -base64 32
AUTH_AZURE_AD_CLIENT_ID / AUTH_AZURE_AD_CLIENT_SECRETAsk Ibraheem — these are the Microsoft Entra ID app credentials for Princeton CAS login
AUTH_AZURE_AD_TENANT_IDPrinceton's tenant ID — already filled in the example file
NEXT_PUBLIC_MAPBOX_TOKEN / NEXT_PUBLIC_CAMPUS_MAP_TOKEN / NEXT_PUBLIC_CAMPUS_MAP_STYLEAsk Ibraheem — Mapbox tokens + the Princeton campus map style URL
AWS_S3_BUCKET / AWS_REGIONOptional (image uploads) — ask Ibraheem if you're working on that feature

3. Start the database

Make sure Docker Desktop is running, then from the repo root:

bun run db:up # starts Postgres 17 in Docker (container: the-forum-db, host port 5434)
bun run db:push # push the Drizzle schema into the fresh database

Sanity checks:

docker compose ps # the-forum-db should show "Up (healthy)"
bun run db:logs # tail the Postgres logs if something looks wrong

The database URL is postgresql://forum:forum_password@localhost:5434/the_forum (also reachable with any Postgres client, e.g. psql, TablePlus, or bun run db:studio).

Optionally fill the database with realistic demo data:

bun run db:seed

4. Run the app

cd apps/web && bun run dev

Open http://localhost:3000. You're set up.

To run everything at once (web + admin + FastAPI) from the repo root:

bun run dev # Turborepo TUI: web :3000, admin-web :5173, FastAPI :8000

(FastAPI will only start if you've done the Python backend setup.)


Everyday commands

bun run check # Biome lint + format with auto-fix (run before pushing)
bun run format # format only
bun run build # build all packages
bun run db:up # start Postgres db:down stop it (data persists)
bun run db:push # push schema (dev) db:generate generate SQL migrations
bun run db:migrate # apply migrations db:studio visual DB browser
bun run db:seed # seed demo data (safe to re-run any time)

Pre-commit hooks (Husky + lint-staged) automatically run Biome on staged files — if your commit fails, read the Biome output, fix, and re-commit.

Conventions

  • Env vars in apps/web: always import { env } from "~/env" — never process.env.* directly. New vars get added to apps/web/src/env.tsand the .env.example files.
  • UI components: use shadcn/ui. Add new ones from apps/web: bunx shadcn@latest add <component>.
  • Linting: Biome only (no ESLint/Prettier). Python uses Ruff.

Python backend (optional)

Only needed if you're working on backends/fastapi or the scrapers.

cd backends/fastapi
cp .env.example .env # default DATABASE_URL works with the Docker database
uv sync # creates .venv and installs all dependencies
bun run dev # = uv run uvicorn app.main:app --reload --port 8000

API docs live at http://localhost:8000/docs. Lint with uv run ruff check . and format with uv run ruff format ..


Branching workflow

main is protected — you cannot push to it directly, and pull requests into main are only accepted from staging.

  1. Branch off main: git checkout -b feat/my-feature origin/main
  2. Open a PR into staging and merge it there
  3. When staging is ready to ship, open a PR from staging into main

Troubleshooting

The app crashes on startup with "Invalid environment variables" A required var in apps/web/.env.local is missing or malformed — compare against apps/web/.env.local.example and the table above.

ECONNREFUSED / DATABASE_URL errors The database container isn't running (bun run db:up), or your DATABASE_URL uses the wrong port — the Docker database listens on 5434, not 5432.

Port 5434 already in use Change POSTGRES_PORT in the root .env and update DATABASE_URL everywhere to match.

Husky hooks not running Re-run bun install from the repo root (the prepare script reinstalls hooks).

bun run dev doesn't start FastAPI Expected unless you've run uv sync in backends/fastapi and uv is on your PATH.

Wipe the database and start freshdocker compose down -v (deletes the data volume), then bun run db:up && bun run db:push && bun run db:seed.

About

princeton university's ai-powered events & happenings hub

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages