Skip to content

refactor: use Supabase for membership data instead of JSON#158

Open
syncopascual wants to merge 8 commits intoup-csi:mainfrom
syncopascual:databaseConn
Open

refactor: use Supabase for membership data instead of JSON#158
syncopascual wants to merge 8 commits intoup-csi:mainfrom
syncopascual:databaseConn

Conversation

@syncopascual
Copy link
Copy Markdown
Contributor

@syncopascual syncopascual commented Mar 28, 2026

Refactors the backend of the website to fetch membership and executive board data from Supabase instead of using the JSON-based implementation from previous iterations of the website.

Notes

  • installs dependency @supabase/supabase-js to use the Supabase client
  • Supabase client used to fetch data in the getTeam(), getOfficer(), and getExec() functions used in the People page

Changes/fixes in progress

  • There's a small inconsistency on the database with how we store links for socials
    • GitHub handles are stored as is, without any paths included (just username)
    • Linkedin and IG profiles are stored with the path included
    • We could probably just run a query to limit to just the handle so that the parsing on the backend is more consistent
    • Relevant file: src/lib/components/cards/MemberCardTag.svelte
  • There's some boilerplate in some of the JSON parsing and types/schemas which is unnecessary now that we're getting values directly from the db
    • Specifically with the separate parsing of the string image URLs for pictures and executive board positions (ex. 2425B:Director for Engineering), which are now separated in the db (so no parsing is needed). For now, the implementation just matches the format of the JSON implementation but using data from the db instead.
  • Environment variable setup needed

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.

1 participant