Skip to content

Repository files navigation

UWDSC Documentation Site

Documentation website for the UW Data Science Club, built with Nextra and deployed to Vercel at docs.uwdatascience.ca.

Access is restricted to signed-in exec/admin members via the shared uwdatascience.ca Supabase session — see middleware.ts.

Development

# Install dependencies
pnpm install

# Copy env vars (fill in real values from the shared secrets store)
cp .env.example .env.local

# Start dev server
pnpm dev

The documentation will be available at http://localhost:3000

Building

pnpm build

Linting & Type Checking

pnpm lint
pnpm exec tsc --noEmit

Adding Documentation

Create a New Page

  1. Create a new .mdx file in pages/ directory
  2. Add entry to _meta.js for navigation

Example:

# My New Page

This is my documentation page content.

## Section

More content here.

Navigation Structure

Edit _meta.js files in each pages/ folder to control navigation:

export default {
  index: "Introduction",
  "getting-started": "Getting Started",
  guides: "Guides",
};

Deployment

The documentation is deployed to Vercel, which deploys on every push to main and generates preview deployments for PRs.

Environment Variables (Vercel Project Settings)

  • SUPABASE_URL / SUPABASE_PUBLISHABLE_KEY — same shared Supabase project used by uwdsc-website-v3 and estimathon-v2
  • NEXT_PUBLIC_MAIN_SITE_URL — https://uwdatascience.ca
  • NEXT_PUBLIC_AUTH_COOKIE_DOMAIN — .uwdatascience.ca

Auth

middleware.ts gates every route: it validates the shared sb-*-auth-token cookie (set by uwdatascience.ca on login) via Supabase, and requires app_metadata.role to be exec or admin. Unauthenticated visitors are redirected to https://uwdatascience.ca/login?redirect=...; signed-in members are redirected to /unauthorized.

Technologies

  • Nextra: Documentation framework
  • Next.js 15: React framework
  • TypeScript: Type safety
  • MDX: Markdown with JSX support

Learn More

Releases

Packages

Contributors

Languages