A Next.js + Supabase app for finding and claiming lost-and-found items on campus.
-
PRODUCTION: https://campus-find-three.vercel.app/
- Git
- Node.js 18.18+ (recommended: 22.x LTS)
- pnpm (latest recommended)
- Supabase account (for a hosted project) and/or Supabase CLI for local development
Check your versions:
node -v
pnpm -v
supabase --versionIf you use nvm, select a compatible Node:
nvm use 22 || nvm install 22git clone https://git.cs.usask.ca/nzy764/cmpt-370-final-project.git
cd cmpt-370-final-project
pnpm installCampusFind uses Supabase for authentication, database, storage, and real-time features.
This is the fastest way to run the app exactly like the deployed version.
- Create a
.env.localfile at the project root (if you haven’t already). - Add the following environment variables (Note: we know that this is bad practice, but for the sake of this project, it just makes the setup faster.)
NEXT_PUBLIC_SUPABASE_URL=https://fgitxgfwkdmduybokvis.supabase.co
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImZnaXR4Z2Z3a2RtZHV5Ym9rdmlzIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjA0NjA3MDYsImV4cCI6MjA3NjAzNjcwNn0.5c-1WM4D7bBYVgwErBWVu06BaME_rEknHpJLjpUgA20- Start the app with
pnpm dev(development) orpnpm start(afterpnpm build). No additional Supabase setup or migrations are required for this option.
- Create a Supabase account if you don't have one yet.
- Create a new Supabase project.
- Create a
.env.localfile at the project root (if you haven’t already). - Add the following environment variables:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=your_supabase_anon_or_publishable_key - Push the database migrations to your new project to setup the database schema.
# Link to our project for the first time
pnpm supabase link --project-ref <your_project_id>
# Push migrations
pnpm supabase db push- Start the app with
pnpm dev(development) orpnpm start(afterpnpm build). No additional Supabase setup or migrations are required for this option.
You can run Supabase locally to apply the provided migrations in supabase/migrations/ if you want a fully local setup.
# start local Supabase (Docker required)
pnpm supabase start
# reset and apply all migrations to local database
pnpm supabase db reset --localThen update .env.local with your local Supabase URL and anon key (printed by supabase start) to develop fully offline.
Starts Next.js with Turbopack for fast HMR:
pnpm devVisit http://localhost:3000
pnpm build
pnpm startBy default, the app starts on port 3000.
- Sign in: Click "Login" and sign in with your USask email (via Supabase auth).
- Browse items: Go to the Dashboard to see recent lost-and-found posts and filter/search by keyword, category, or location.
- Report a lost/found item: From the Dashboard, create a new post, add a title, description, category, location, and photos.
- Claim or return an item: Open a listing and use the built-in messaging page to coordinate with the other student without sharing personal contact info.
pnpm dev— Start the dev server (Next.js + Turbopack)pnpm build— Build for productionpnpm start— Run the production buildpnpm lint— Lint the codebase
- Next.js (App Router, 15.5.7)
- React 19
- Supabase (auth, Postgres, storage, real-time)
- Tailwind CSS 4
- Radix UI primitives
- TypeScript 5
- ESLint 9
For the full list of dependencies and exact versions, see package.json and pnpm-lock.yaml.
- If the dev server fails to start, ensure Node 18.18+ (preferably 22.x), reinstall deps (
pnpm install), and clear.next/. - If Supabase auth behaves unexpectedly in SSR, ensure environment variables are correct and see
lib/supabase/for the SSR pattern used.