Skip to content

Fix Supabase configuration, table naming inconsistencies, and routing issues#19

Open
its-nott-me wants to merge 5 commits intoTiwariDivya25:mainfrom
its-nott-me:feature/supabase-routing-fixes
Open

Fix Supabase configuration, table naming inconsistencies, and routing issues#19
its-nott-me wants to merge 5 commits intoTiwariDivya25:mainfrom
its-nott-me:feature/supabase-routing-fixes

Conversation

@its-nott-me
Copy link

Summary

This PR addresses several early-stage issues related to Supabase setup, database schema consistency, storage uploads, and routing behavior.

The changes aim to improve reliability, portability, and deployment readiness without altering existing features.

Changes Included

  • Standardized database table names to lowercase (posts, communities, comments, votes) across the codebase and README to avoid schema cache and casing issues
  • Fixed Supabase client configuration to use environment variables instead of a hardcoded project URL
  • Ensured user_id is always set when creating posts to satisfy NOT NULL constraints
  • Sanitized post titles used in Supabase Storage filenames to prevent upload collisions (e.g. # being treated as a fragment)
  • Aligned React Router navigation with Vite base path:
    • Added router basename support
    • Replaced hard redirects (window.location.href) with router navigation

Why These Changes

  • Prevents Supabase runtime errors caused by case-sensitive table names
  • Improves security and portability of Supabase configuration
  • Fixes storage upload failures for posts with special characters in titles
  • Ensures routing works correctly when deployed under a subpath (e.g. GitHub Pages)

Notes

  • Changes are backward-compatible
  • Commits are intentionally kept small and focused for easier review
  • Happy to split or adjust commits if preferred by maintainers

@vercel
Copy link

vercel bot commented Jan 3, 2026

@its-nott-me is attempting to deploy a commit to the Divya Tiwari's projects Team on Vercel.

A member of the Team first needs to authorize it.

@netlify
Copy link

netlify bot commented Jan 3, 2026

Deploy Preview for tiwaridivya25-devconnect ready!

Name Link
🔨 Latest commit 1c328a1
🔍 Latest deploy log https://app.netlify.com/projects/tiwaridivya25-devconnect/deploys/695924d34a4f0d00080c8942
😎 Deploy Preview https://deploy-preview-19--tiwaridivya25-devconnect.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@TiwariDivya25
Copy link
Owner

Thanks for the PR. I’m reviewing the table naming changes to ensure they align with the current Supabase schema. Once confirmed, I’ll proceed with merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants