Now I have the full picture. I'll add photo upload to the contribution form, save images locally to public/uploads/, store the filename in the JSON db, and display the photo in the building detail dialog.
Now create an API route to handle file uploads (since server actions can't directly write binary files easily via FormData in all cases):
Now update the server action to accept the optional photo_path:
Now update the contribute form to include a photo upload field:
Now add the photo upload field into the form UI, right before the Date field:
Update the submit button text to reflect uploading state:
Now update the building detail dialog to show photos from contributions. I need to update the campus explorer to pass photo data through, and the detail component to render it:
I need to add photo_path to the ResourceDetail type and pass it through when enriching buildings:
Now update the campus explorer to pass photo_path into ResourceDetail:
Now update the building detail dialog to render photos:
Now add the photo rendering inside each resource detail card:
Added photo upload to the contribution flow. The form now has a drag-and-drop style upload area (JPEG, PNG, WebP, GIF up to 5MB) with a live preview and remove button. Photos are saved locally to public/uploads/ via an API route, the path is stored in the JSON database alongside the contribution, and when you click a building in the detail dialog, any contributed photos appear inline under the resource location description. Everything stays fully local -- no external services needed.
Let me audit the entire codebase for any remaining third-party dependencies:
Let me also check if there's a leftover @supabase/ssr in package.json or any Supabase-related files still lingering:
All Supabase references are only in the read-only skill reference files, not in the project. Let me also remove the @supabase/ssr package if it's still in package.json and remove the leftover @vercel/analytics since the user wants a fully local setup:
Good -- the package.json has no @supabase/ssr or better-sqlite3 remaining. The only thing I see is @vercel/analytics which pings Vercel's servers. Let me check if it's actually imported anywhere:
Now remove the @vercel/analytics package from package.json:
Now let me also clean up the leftover SQL migration script since we're not using any SQL database:
The project is now fully self-contained with zero third-party service dependencies. I removed @vercel/analytics (the last thing phoning home), the leftover SQL migration script, and verified there are no Supabase, environment variable, or external API references in the codebase. Everything uses Node.js fs module: contributions go to data/contributions.json and uploaded photos go to public/uploads/. Just pnpm install && pnpm dev and you're running.
You can send messages while the preview loads