From 0b86e86d21061e832bf071a96b41eb22bf26f421 Mon Sep 17 00:00:00 2001 From: Marcus Pascual Date: Sat, 28 Mar 2026 02:13:55 +0800 Subject: [PATCH 01/23] chore: add .env and .env.* to .gitignore --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 307132b5..6e6fc58b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,6 @@ .eslintcache node_modules build -*.sh \ No newline at end of file +*.sh +.env +.env.* \ No newline at end of file From 448f273b2f0f8ed4b8d77abacc8c257cf5cea7ef Mon Sep 17 00:00:00 2001 From: Marcus Pascual Date: Sat, 28 Mar 2026 02:21:25 +0800 Subject: [PATCH 02/23] deps: add @supabase/supabase-js --- package.json | 1 + pnpm-lock.yaml | 100 ++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 99 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index edc76eb2..6546b3d5 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "@iconify/icons-heroicons": "^1.2.9", "@iconify/icons-simple-icons": "^1.2.74", "@iconify/svelte": "^5.0.2", + "@supabase/supabase-js": "^2.100.1", "@sveltejs/kit": "^2.47.3", "html-minifier": "^4.0.0", "svelte": "^5.41.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 33e8b53d..e7ff21ae 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,6 +17,9 @@ importers: '@iconify/svelte': specifier: ^5.0.2 version: 5.0.2(svelte@5.41.4) + '@supabase/supabase-js': + specifier: ^2.100.1 + version: 2.100.1 '@sveltejs/kit': specifier: ^2.47.3 version: 2.47.3(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.41.4)(vite@7.1.12(@types/node@24.9.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.36.0)))(svelte@5.41.4)(vite@7.1.12(@types/node@24.9.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.36.0)) @@ -649,6 +652,33 @@ packages: '@standard-schema/spec@1.0.0': resolution: {integrity: sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==} + '@supabase/auth-js@2.100.1': + resolution: {integrity: sha512-c5FB4nrG7cs1mLSzFGuIVl2iR2YO5XkSJ96uF4zubYm8YDn71XOi2emE9sBm/avfGCj61jaRBLOvxEAVnpys0Q==} + engines: {node: '>=20.0.0'} + + '@supabase/functions-js@2.100.1': + resolution: {integrity: sha512-mo8QheoV4KR+wSubtyEWhZUxWnCM7YZ23TncccMAlbWAHb8YTDqRGRm9IalWCAswniKyud6buZCk9snRqI86KA==} + engines: {node: '>=20.0.0'} + + '@supabase/phoenix@0.4.0': + resolution: {integrity: sha512-RHSx8bHS02xwfHdAbX5Lpbo6PXbgyf7lTaXTlwtFDPwOIw64NnVRwFAXGojHhjtVYI+PEPNSWwkL90f4agN3bw==} + + '@supabase/postgrest-js@2.100.1': + resolution: {integrity: sha512-OIh4mOSo2LdqF2kox76OAPDtcSs+PwKABJOjc6plUV4/LXhFEsI2uwdEEIs7K7fd141qehWEVl/Y+Ts0fNvYsw==} + engines: {node: '>=20.0.0'} + + '@supabase/realtime-js@2.100.1': + resolution: {integrity: sha512-FHuRWPX4qZQ4x+0Q+ZrKaBZnOiVGiwsgiAUJM98pYRib1yeaE/fOM1lZ1ozd+4gA8Udw23OyaD8SxKS5mT5NYw==} + engines: {node: '>=20.0.0'} + + '@supabase/storage-js@2.100.1': + resolution: {integrity: sha512-x9xpEIoWM4xKiAlwfWTgHPSN6N4Y0aS4FVU4F6ZPbq7Gayw08SrtC6/YH/gOr8CjXQr0HxXYXDop2xGTSjubYA==} + engines: {node: '>=20.0.0'} + + '@supabase/supabase-js@2.100.1': + resolution: {integrity: sha512-CAeFm5sfX8sbTzxoxRafhohreIzl9a7R6qHTck3MrgTqm5M5g/u0IHfEKYzI9w/17r8NINl8UZrw2i08wrO7Iw==} + engines: {node: '>=20.0.0'} + '@sveltejs/acorn-typescript@1.0.6': resolution: {integrity: sha512-4awhxtMh4cx9blePWl10HRHj8Iivtqj+2QdDCSMDzxG+XKa9+VCNupQuCuvzEhYPzZSrX+0gC+0lHA/0fFKKQQ==} peerDependencies: @@ -818,6 +848,9 @@ packages: '@types/uglify-js@3.17.5': resolution: {integrity: sha512-TU+fZFBTBcXj/GpDpDaBmgWk/gn96kMZ+uocaFUlV2f8a6WdMzzI44QBCmGcCiYR0Y6ZlNRiyUyKKt5nl/lbzQ==} + '@types/ws@8.18.1': + resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==} + '@typescript-eslint/eslint-plugin@8.46.2': resolution: {integrity: sha512-ZGBMToy857/NIPaaCucIUQgqueOiq7HeAKkhlvqVV4lm089zUFW6ikRySx2v+cAhKeUCPuWVHeimyk6Dw1iY3w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1160,6 +1193,10 @@ packages: engines: {node: '>=6'} hasBin: true + iceberg-js@0.8.1: + resolution: {integrity: sha512-1dhVQZXhcHje7798IVM+xoo/1ZdVfzOMIc8/rgVSijRK38EDqOJoGula9N/8ZI5RD8QTxNQtK/Gozpr+qUqRRA==} + engines: {node: '>=20.0.0'} + ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} @@ -1746,6 +1783,18 @@ packages: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} + ws@8.20.0: + resolution: {integrity: sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + yaml@1.10.2: resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} engines: {node: '>= 6'} @@ -2186,6 +2235,46 @@ snapshots: '@standard-schema/spec@1.0.0': {} + '@supabase/auth-js@2.100.1': + dependencies: + tslib: 2.8.1 + + '@supabase/functions-js@2.100.1': + dependencies: + tslib: 2.8.1 + + '@supabase/phoenix@0.4.0': {} + + '@supabase/postgrest-js@2.100.1': + dependencies: + tslib: 2.8.1 + + '@supabase/realtime-js@2.100.1': + dependencies: + '@supabase/phoenix': 0.4.0 + '@types/ws': 8.18.1 + tslib: 2.8.1 + ws: 8.20.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + '@supabase/storage-js@2.100.1': + dependencies: + iceberg-js: 0.8.1 + tslib: 2.8.1 + + '@supabase/supabase-js@2.100.1': + dependencies: + '@supabase/auth-js': 2.100.1 + '@supabase/functions-js': 2.100.1 + '@supabase/postgrest-js': 2.100.1 + '@supabase/realtime-js': 2.100.1 + '@supabase/storage-js': 2.100.1 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + '@sveltejs/acorn-typescript@1.0.6(acorn@8.15.0)': dependencies: acorn: 8.15.0 @@ -2352,6 +2441,10 @@ snapshots: dependencies: source-map: 0.6.1 + '@types/ws@8.18.1': + dependencies: + '@types/node': 24.9.1 + '@typescript-eslint/eslint-plugin@8.46.2(@typescript-eslint/parser@8.46.2(eslint@9.38.0(jiti@2.6.1))(typescript@5.9.3))(eslint@9.38.0(jiti@2.6.1))(typescript@5.9.3)': dependencies: '@eslint-community/regexpp': 4.12.2 @@ -2751,6 +2844,8 @@ snapshots: relateurl: 0.2.7 uglify-js: 3.19.3 + iceberg-js@0.8.1: {} + ignore@5.3.2: {} ignore@7.0.5: {} @@ -3162,8 +3257,7 @@ snapshots: dependencies: typescript: 5.9.3 - tslib@2.8.1: - optional: true + tslib@2.8.1: {} type-check@0.4.0: dependencies: @@ -3231,6 +3325,8 @@ snapshots: word-wrap@1.2.5: {} + ws@8.20.0: {} + yaml@1.10.2: {} yocto-queue@0.1.0: {} From 1395ed67cade69be1a48fbe0215d5e0a90c04b76 Mon Sep 17 00:00:00 2001 From: Marcus Pascual Date: Sat, 28 Mar 2026 19:10:24 +0800 Subject: [PATCH 03/23] feat: use Supabase client to fetch member list instead of JSON --- src/lib/data/team/index.ts | 68 ++++++++++++++++++++++++++++++++++---- src/lib/supabaseClient.ts | 4 +++ 2 files changed, 65 insertions(+), 7 deletions(-) create mode 100644 src/lib/supabaseClient.ts diff --git a/src/lib/data/team/index.ts b/src/lib/data/team/index.ts index 9a76ec7e..74447c62 100644 --- a/src/lib/data/team/index.ts +++ b/src/lib/data/team/index.ts @@ -1,15 +1,69 @@ import { parse } from 'valibot'; +import { supabase } from "$lib/supabaseClient"; import { type Member, Member as MemberSchema } from '$lib/models/member'; +const committeeMap: Record = { + SERVICE: 'Service', + 'M&I': 'Membership & Internals', + ENGG: 'Engineering', + BEX: 'Executive', + INNOV: 'Innovation', + EXTE: 'External Relations', + BnC: 'Branding & Creatives', +}; + export async function getTeam() { - const imports = import.meta.glob('./json/*.json'); + const { data, error } = await supabase + .from("people") + .select(` + last_name, + nickname, + image_url, + committee, + is_exec, + github_handle, + linkedin_url, + instagram_url, + website_url + `); - const promises = Object.entries(imports).map(async ([_, asset]) => { - const member = parse(MemberSchema, await asset()); - const parsed_member: Member = { ...member, src: member.img }; - return parsed_member; - }); + if (error) { + console.error(error); + throw new Error("team data fetching error"); + } + + const members: Member[] = data.map((person) => { + const comm = committeeMap[person.committee]!; + + // a quirk of the DB setup, + // if the comm is set to Executive then thats the president, + // otherwise if the person is_exec then they have two comms, + // everone else has only one comm + const committees = + comm === "Executive" || !person.is_exec + ? [comm] + : person.is_exec + ? [comm, "Executive"] + : [comm]; - return await Promise.all(promises); + const socials: Record = {}; + + if (person.github_handle) socials.github = person.github_handle; + if (person.linkedin_url) socials.linkedin = person.linkedin_url; + if (person.instagram_url) socials.instagram = person.instagram_url; + if (person.website_url) socials.website = person.website_url; + + const member: Member = { + name: `${person.nickname} ${person.last_name}`, + img: person.image_url, + committee: committees, + socials: socials, + src: person.image_url + } + + return member + }); + + return members } diff --git a/src/lib/supabaseClient.ts b/src/lib/supabaseClient.ts new file mode 100644 index 00000000..0f70be4c --- /dev/null +++ b/src/lib/supabaseClient.ts @@ -0,0 +1,4 @@ +import { createClient } from '@supabase/supabase-js'; +import { PUBLIC_SUPABASE_URL, PUBLIC_SUPABASE_PUBLISHABLE_KEY } from '$env/static/public'; + +export const supabase = createClient(PUBLIC_SUPABASE_URL, PUBLIC_SUPABASE_PUBLISHABLE_KEY) \ No newline at end of file From fc2c9d66d345096d233241a9ff7a146fec86ee7a Mon Sep 17 00:00:00 2001 From: Marcus Pascual Date: Sat, 28 Mar 2026 20:35:07 +0800 Subject: [PATCH 04/23] fix: rework path handling for images and social links --- src/lib/components/cards/MemberCard.svelte | 2 +- src/lib/components/cards/MemberCardTag.svelte | 2 +- src/lib/models/officer.ts | 2 +- src/lib/types/board_officer.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/components/cards/MemberCard.svelte b/src/lib/components/cards/MemberCard.svelte index 30e44a23..21a5a0d8 100644 --- a/src/lib/components/cards/MemberCard.svelte +++ b/src/lib/components/cards/MemberCard.svelte @@ -26,7 +26,7 @@ onmouseleave={() => (isOverlayVisible = false)} > {name} { - src: EnhancedImgAttributes['src']; + src: string; parsed_pos: Record; } diff --git a/src/lib/types/board_officer.ts b/src/lib/types/board_officer.ts index 2d12b8cd..ed60fcc0 100644 --- a/src/lib/types/board_officer.ts +++ b/src/lib/types/board_officer.ts @@ -3,6 +3,6 @@ import type { Position } from '$lib/models/position'; export interface BoardOfficer { name: string; - src: EnhancedImgAttributes['src']; + src: string; title: Position[]; } From aa637aebc5a701df976f8ed8d62e5b7114c0ad58 Mon Sep 17 00:00:00 2001 From: Marcus Pascual Date: Sat, 28 Mar 2026 23:41:03 +0800 Subject: [PATCH 05/23] feat: sort members --- src/lib/data/team/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/data/team/index.ts b/src/lib/data/team/index.ts index 74447c62..6c694669 100644 --- a/src/lib/data/team/index.ts +++ b/src/lib/data/team/index.ts @@ -65,5 +65,5 @@ export async function getTeam() { return member }); - return members + return members.sort((a, b) => a.name.localeCompare(b.name)) } From 0db7cd6453718a6ace9a7dd1b25ab3a298c3fdf0 Mon Sep 17 00:00:00 2001 From: Marcus Pascual Date: Sun, 29 Mar 2026 00:59:13 +0800 Subject: [PATCH 06/23] feat: use Supabase for exec Accordion components --- src/lib/data/exec/index.ts | 55 ++++++++++++++++++++++++++++++++++---- 1 file changed, 50 insertions(+), 5 deletions(-) diff --git a/src/lib/data/exec/index.ts b/src/lib/data/exec/index.ts index e4f2fa2a..d13969d8 100644 --- a/src/lib/data/exec/index.ts +++ b/src/lib/data/exec/index.ts @@ -1,5 +1,6 @@ import type { EnhancedImgAttributes } from '@sveltejs/enhanced-img'; import { parse } from 'valibot'; +import { supabase } from "$lib/supabaseClient"; import { type Officer, Officer as OfficerSchema } from '$lib/models/officer'; import { type Position, Position as PositionSchema } from '$lib/models/position'; @@ -9,10 +10,53 @@ import type { BoardOfficer } from '$lib/types/board_officer'; export const pres_term = '2526A'; async function getOfficers() { - const imports = import.meta.glob('./json/*.json'); + const { data, error } = await supabase + .from("executive_terms") + .select(` + term, + execs ( + id, + last_name, + nickname, + image_url + ), + positions ( + title + ) + `) + + console.log("RAW DATA:", data); + + if (error) { + console.error(error); + throw new Error("exec data fetching error"); + } + + const exec_map = new Map(); + data.forEach(({term, execs, positions}) => { + if (!execs || !positions) return; + + const { id, last_name, nickname, image_url } = execs as any; + const { title } = positions as any; + + if (!exec_map.has(id)) { + exec_map.set(id, { + name: { + last_name, + nickname + }, + img: image_url, + pos: [`${term}:${title}`] + }); + } else { + exec_map.get(id).pos.push(`${term}:${title}`); + } + }) + const imports = Array.from(exec_map.values()); - const promises = Object.entries(imports).map(async ([_, asset]) => { - const officer = parse(OfficerSchema, await asset()); + console.log("IMPORTS:", imports); + const promises = Object.entries(imports).map(([_, asset]) => { + const officer = parse(OfficerSchema, asset); const src: string = officer.img; @@ -34,7 +78,7 @@ async function getOfficers() { return parsed_officer; }); - return await Promise.all(promises); + return promises; } export async function getExec() { @@ -54,7 +98,8 @@ export async function getExec() { const new_board: Board = { term, src: null, officers: [] }; boards[term] = new_board; } - + + console.log(`term ${term} was accessed`); boards[term].officers.push(new_officer); } }); From 08024c1f04d8d4644afa074f764f203f23efab51 Mon Sep 17 00:00:00 2001 From: Marcus Pascual Date: Sun, 29 Mar 2026 01:11:31 +0800 Subject: [PATCH 07/23] chore: run fmt, lint, and build --- src/lib/components/cards/MemberCard.svelte | 2 +- src/lib/data/exec/index.ts | 53 ++++++++++++---------- src/lib/data/team/index.ts | 37 ++++++--------- src/lib/models/officer.ts | 2 - src/lib/supabaseClient.ts | 2 +- src/lib/types/board_officer.ts | 1 - 6 files changed, 45 insertions(+), 52 deletions(-) diff --git a/src/lib/components/cards/MemberCard.svelte b/src/lib/components/cards/MemberCard.svelte index 21a5a0d8..779a095e 100644 --- a/src/lib/components/cards/MemberCard.svelte +++ b/src/lib/components/cards/MemberCard.svelte @@ -26,7 +26,7 @@ onmouseleave={() => (isOverlayVisible = false)} > {name}(); - if (error) { - console.error(error); - throw new Error("exec data fetching error"); - } + if (error) throw new Error('exec data fetching error'); const exec_map = new Map(); - data.forEach(({term, execs, positions}) => { + data.forEach(({ term, execs, positions }) => { if (!execs || !positions) return; - const { id, last_name, nickname, image_url } = execs as any; - const { title } = positions as any; + const { id, last_name, nickname, image_url } = execs; + const { title } = positions; - if (!exec_map.has(id)) { + if (exec_map.has(id)) exec_map.get(id).pos.push(`${term}:${title}`); + else exec_map.set(id, { name: { last_name, - nickname + nickname, }, img: image_url, - pos: [`${term}:${title}`] + pos: [`${term}:${title}`], }); - } else { - exec_map.get(id).pos.push(`${term}:${title}`); - } - }) + }); const imports = Array.from(exec_map.values()); - console.log("IMPORTS:", imports); const promises = Object.entries(imports).map(([_, asset]) => { const officer = parse(OfficerSchema, asset); @@ -98,8 +106,7 @@ export async function getExec() { const new_board: Board = { term, src: null, officers: [] }; boards[term] = new_board; } - - console.log(`term ${term} was accessed`); + boards[term].officers.push(new_officer); } }); diff --git a/src/lib/data/team/index.ts b/src/lib/data/team/index.ts index 6c694669..f24e4132 100644 --- a/src/lib/data/team/index.ts +++ b/src/lib/data/team/index.ts @@ -1,7 +1,5 @@ -import { parse } from 'valibot'; -import { supabase } from "$lib/supabaseClient"; - -import { type Member, Member as MemberSchema } from '$lib/models/member'; +import { supabase } from '$lib/supabaseClient'; +import { Member } from '$lib/models/member'; const committeeMap: Record = { SERVICE: 'Service', @@ -14,9 +12,7 @@ const committeeMap: Record = { }; export async function getTeam() { - const { data, error } = await supabase - .from("people") - .select(` + const { data, error } = await supabase.from('people').select(` last_name, nickname, image_url, @@ -28,24 +24,17 @@ export async function getTeam() { website_url `); - if (error) { - console.error(error); - throw new Error("team data fetching error"); - } + if (error) throw new Error('team data fetching error'); - const members: Member[] = data.map((person) => { + const members: Member[] = data.map(person => { const comm = committeeMap[person.committee]!; // a quirk of the DB setup, // if the comm is set to Executive then thats the president, // otherwise if the person is_exec then they have two comms, // everone else has only one comm - const committees = - comm === "Executive" || !person.is_exec - ? [comm] - : person.is_exec - ? [comm, "Executive"] - : [comm]; + const committees = [comm]; + if (person.is_exec && comm !== 'Executive') committees.push('Executive'); const socials: Record = {}; @@ -58,12 +47,12 @@ export async function getTeam() { name: `${person.nickname} ${person.last_name}`, img: person.image_url, committee: committees, - socials: socials, - src: person.image_url - } + socials, + src: person.image_url, + }; - return member + return member; }); - - return members.sort((a, b) => a.name.localeCompare(b.name)) + + return members.sort((a, b) => a.name.localeCompare(b.name)); } diff --git a/src/lib/models/officer.ts b/src/lib/models/officer.ts index 04a4465f..4ca62b15 100644 --- a/src/lib/models/officer.ts +++ b/src/lib/models/officer.ts @@ -1,5 +1,3 @@ -import type { EnhancedImgAttributes } from '@sveltejs/enhanced-img'; - import { type InferOutput, array, object, string } from 'valibot'; import type { Position } from '$lib/models/position'; diff --git a/src/lib/supabaseClient.ts b/src/lib/supabaseClient.ts index 0f70be4c..d962b9a5 100644 --- a/src/lib/supabaseClient.ts +++ b/src/lib/supabaseClient.ts @@ -1,4 +1,4 @@ import { createClient } from '@supabase/supabase-js'; import { PUBLIC_SUPABASE_URL, PUBLIC_SUPABASE_PUBLISHABLE_KEY } from '$env/static/public'; -export const supabase = createClient(PUBLIC_SUPABASE_URL, PUBLIC_SUPABASE_PUBLISHABLE_KEY) \ No newline at end of file +export const supabase = createClient(PUBLIC_SUPABASE_URL, PUBLIC_SUPABASE_PUBLISHABLE_KEY); diff --git a/src/lib/types/board_officer.ts b/src/lib/types/board_officer.ts index ed60fcc0..294e064f 100644 --- a/src/lib/types/board_officer.ts +++ b/src/lib/types/board_officer.ts @@ -1,4 +1,3 @@ -import type { EnhancedImgAttributes } from '@sveltejs/enhanced-img'; import type { Position } from '$lib/models/position'; export interface BoardOfficer { From ba6c28ee9c8f21d324490751c25169e1e1577125 Mon Sep 17 00:00:00 2001 From: Marcus Pascual Date: Sun, 29 Mar 2026 01:18:28 +0800 Subject: [PATCH 08/23] feat: sort officers --- src/lib/data/exec/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/data/exec/index.ts b/src/lib/data/exec/index.ts index 81bbc59f..b315a5a9 100644 --- a/src/lib/data/exec/index.ts +++ b/src/lib/data/exec/index.ts @@ -86,7 +86,7 @@ async function getOfficers() { return parsed_officer; }); - return promises; + return promises.sort((a, b) => a.name.nickname.localeCompare(b.name.nickname)); } export async function getExec() { From b49e173e6ab133a89eacb936916e5b444661207c Mon Sep 17 00:00:00 2001 From: Ehren Castillo Date: Mon, 13 Apr 2026 12:31:20 +0800 Subject: [PATCH 09/23] chore: remove redundant JSON data --- src/lib/data/exec/json/AndriCrisostomo.json | 5 ----- src/lib/data/exec/json/ArianRey.json | 5 ----- src/lib/data/exec/json/BastiOrtiz.json | 5 ----- src/lib/data/exec/json/BeaDiokno.json | 5 ----- src/lib/data/exec/json/BenjLazaro.json | 5 ----- src/lib/data/exec/json/BmaeAmurao.json | 8 -------- src/lib/data/exec/json/BryanUy.json | 5 ----- src/lib/data/exec/json/CalebBunye.json | 5 ----- src/lib/data/exec/json/DonSebastienChavez.json | 5 ----- src/lib/data/exec/json/EyronTanael.json | 5 ----- src/lib/data/exec/json/HansLorico.json | 5 ----- src/lib/data/exec/json/IsayBucu.json | 5 ----- src/lib/data/exec/json/JellyRaborar.json | 5 ----- src/lib/data/exec/json/SeanKenjiTolentino.json | 5 ----- src/lib/data/exec/json/VictorReyes.json | 5 ----- src/lib/data/team/json/AbeSahi.json | 6 ------ src/lib/data/team/json/AishaGo.json | 10 ---------- src/lib/data/team/json/AlecLopez.json | 6 ------ "src/lib/data/team/json/AlyssaA\303\261onuevo.json" | 10 ---------- src/lib/data/team/json/AndriCrisostomo.json | 6 ------ src/lib/data/team/json/AzulEusebio.json | 6 ------ src/lib/data/team/json/BenjLazaro.json | 6 ------ src/lib/data/team/json/BmaeAmurao.json | 6 ------ src/lib/data/team/json/BryanUy.json | 6 ------ src/lib/data/team/json/CJSalces.json | 6 ------ src/lib/data/team/json/CedricLegara.json | 6 ------ src/lib/data/team/json/CessaGonzales.json | 6 ------ src/lib/data/team/json/CharSim.json | 6 ------ src/lib/data/team/json/DaleFlores.json | 6 ------ "src/lib/data/team/json/DashCe\303\261ido.json" | 6 ------ src/lib/data/team/json/DonSebastienChavez.json | 6 ------ src/lib/data/team/json/EhrenCastillo.json | 11 ----------- src/lib/data/team/json/EkoDelfin.json | 6 ------ src/lib/data/team/json/ElijahMejilla.json | 6 ------ src/lib/data/team/json/EllieLim.json | 6 ------ src/lib/data/team/json/EmmanAmante.json | 6 ------ src/lib/data/team/json/EthanFilio.json | 6 ------ src/lib/data/team/json/FibiMoraca.json | 6 ------ src/lib/data/team/json/GVVitug.json | 6 ------ src/lib/data/team/json/GabbySacramento.json | 6 ------ src/lib/data/team/json/HanzVicencio.json | 6 ------ src/lib/data/team/json/InigoDeGuzman.json | 6 ------ src/lib/data/team/json/IsayBucu.json | 10 ---------- src/lib/data/team/json/JackyAbucay.json | 6 ------ src/lib/data/team/json/JeromeEstrella.json | 6 ------ src/lib/data/team/json/JulianDolojan.json | 6 ------ src/lib/data/team/json/KCAbriol.json | 6 ------ src/lib/data/team/json/KarinConsebido.json | 6 ------ src/lib/data/team/json/KarloDomingo.json | 6 ------ src/lib/data/team/json/KennethCo.json | 10 ---------- src/lib/data/team/json/KurtLanting.json | 6 ------ src/lib/data/team/json/LeanneAustria.json | 6 ------ src/lib/data/team/json/LilyCelestino.json | 6 ------ src/lib/data/team/json/LouieTorres.json | 11 ----------- src/lib/data/team/json/LucasAgcaoili.json | 6 ------ src/lib/data/team/json/MarcusPascual.json | 6 ------ src/lib/data/team/json/MariusBarcenas.json | 6 ------ src/lib/data/team/json/MichaelReal.json | 6 ------ src/lib/data/team/json/MigzGuiang.json | 6 ------ src/lib/data/team/json/MikelArcardo.json | 10 ---------- "src/lib/data/team/json/NateZu\303\261iga.json" | 6 ------ src/lib/data/team/json/PaoloLapira.json | 6 ------ src/lib/data/team/json/PaulaDomingo.json | 6 ------ src/lib/data/team/json/RafaJimenez.json | 6 ------ src/lib/data/team/json/SamSiy.json | 6 ------ src/lib/data/team/json/SeanKenjiTolentino.json | 6 ------ src/lib/data/team/json/ShereenaVillafania.json | 6 ------ src/lib/data/team/json/SheyManzala.json | 6 ------ src/lib/data/team/json/SidneyFernando.json | 6 ------ src/lib/data/team/json/TrishObzunar.json | 6 ------ src/lib/data/team/json/YenyenGalinato.json | 6 ------ src/lib/data/team/json/YsaacVillamil.json | 6 ------ src/lib/data/team/json/YuwenSaavedra.json | 6 ------ 73 files changed, 456 deletions(-) delete mode 100644 src/lib/data/exec/json/AndriCrisostomo.json delete mode 100644 src/lib/data/exec/json/ArianRey.json delete mode 100644 src/lib/data/exec/json/BastiOrtiz.json delete mode 100644 src/lib/data/exec/json/BeaDiokno.json delete mode 100644 src/lib/data/exec/json/BenjLazaro.json delete mode 100644 src/lib/data/exec/json/BmaeAmurao.json delete mode 100644 src/lib/data/exec/json/BryanUy.json delete mode 100644 src/lib/data/exec/json/CalebBunye.json delete mode 100644 src/lib/data/exec/json/DonSebastienChavez.json delete mode 100644 src/lib/data/exec/json/EyronTanael.json delete mode 100644 src/lib/data/exec/json/HansLorico.json delete mode 100644 src/lib/data/exec/json/IsayBucu.json delete mode 100644 src/lib/data/exec/json/JellyRaborar.json delete mode 100644 src/lib/data/exec/json/SeanKenjiTolentino.json delete mode 100644 src/lib/data/exec/json/VictorReyes.json delete mode 100644 src/lib/data/team/json/AbeSahi.json delete mode 100644 src/lib/data/team/json/AishaGo.json delete mode 100644 src/lib/data/team/json/AlecLopez.json delete mode 100644 "src/lib/data/team/json/AlyssaA\303\261onuevo.json" delete mode 100644 src/lib/data/team/json/AndriCrisostomo.json delete mode 100644 src/lib/data/team/json/AzulEusebio.json delete mode 100644 src/lib/data/team/json/BenjLazaro.json delete mode 100644 src/lib/data/team/json/BmaeAmurao.json delete mode 100644 src/lib/data/team/json/BryanUy.json delete mode 100644 src/lib/data/team/json/CJSalces.json delete mode 100644 src/lib/data/team/json/CedricLegara.json delete mode 100644 src/lib/data/team/json/CessaGonzales.json delete mode 100644 src/lib/data/team/json/CharSim.json delete mode 100644 src/lib/data/team/json/DaleFlores.json delete mode 100644 "src/lib/data/team/json/DashCe\303\261ido.json" delete mode 100644 src/lib/data/team/json/DonSebastienChavez.json delete mode 100644 src/lib/data/team/json/EhrenCastillo.json delete mode 100644 src/lib/data/team/json/EkoDelfin.json delete mode 100644 src/lib/data/team/json/ElijahMejilla.json delete mode 100644 src/lib/data/team/json/EllieLim.json delete mode 100644 src/lib/data/team/json/EmmanAmante.json delete mode 100644 src/lib/data/team/json/EthanFilio.json delete mode 100644 src/lib/data/team/json/FibiMoraca.json delete mode 100644 src/lib/data/team/json/GVVitug.json delete mode 100644 src/lib/data/team/json/GabbySacramento.json delete mode 100644 src/lib/data/team/json/HanzVicencio.json delete mode 100644 src/lib/data/team/json/InigoDeGuzman.json delete mode 100644 src/lib/data/team/json/IsayBucu.json delete mode 100644 src/lib/data/team/json/JackyAbucay.json delete mode 100644 src/lib/data/team/json/JeromeEstrella.json delete mode 100644 src/lib/data/team/json/JulianDolojan.json delete mode 100644 src/lib/data/team/json/KCAbriol.json delete mode 100644 src/lib/data/team/json/KarinConsebido.json delete mode 100644 src/lib/data/team/json/KarloDomingo.json delete mode 100644 src/lib/data/team/json/KennethCo.json delete mode 100644 src/lib/data/team/json/KurtLanting.json delete mode 100644 src/lib/data/team/json/LeanneAustria.json delete mode 100644 src/lib/data/team/json/LilyCelestino.json delete mode 100644 src/lib/data/team/json/LouieTorres.json delete mode 100644 src/lib/data/team/json/LucasAgcaoili.json delete mode 100644 src/lib/data/team/json/MarcusPascual.json delete mode 100644 src/lib/data/team/json/MariusBarcenas.json delete mode 100644 src/lib/data/team/json/MichaelReal.json delete mode 100644 src/lib/data/team/json/MigzGuiang.json delete mode 100644 src/lib/data/team/json/MikelArcardo.json delete mode 100644 "src/lib/data/team/json/NateZu\303\261iga.json" delete mode 100644 src/lib/data/team/json/PaoloLapira.json delete mode 100644 src/lib/data/team/json/PaulaDomingo.json delete mode 100644 src/lib/data/team/json/RafaJimenez.json delete mode 100644 src/lib/data/team/json/SamSiy.json delete mode 100644 src/lib/data/team/json/SeanKenjiTolentino.json delete mode 100644 src/lib/data/team/json/ShereenaVillafania.json delete mode 100644 src/lib/data/team/json/SheyManzala.json delete mode 100644 src/lib/data/team/json/SidneyFernando.json delete mode 100644 src/lib/data/team/json/TrishObzunar.json delete mode 100644 src/lib/data/team/json/YenyenGalinato.json delete mode 100644 src/lib/data/team/json/YsaacVillamil.json delete mode 100644 src/lib/data/team/json/YuwenSaavedra.json diff --git a/src/lib/data/exec/json/AndriCrisostomo.json b/src/lib/data/exec/json/AndriCrisostomo.json deleted file mode 100644 index 7e6c6d10..00000000 --- a/src/lib/data/exec/json/AndriCrisostomo.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": { "last_name": "Crisostomo", "nickname": "Andri" }, - "pos": ["2425A:President", "2425A:Vice President for Innovation"], - "img": "AndriCrisostomo" -} diff --git a/src/lib/data/exec/json/ArianRey.json b/src/lib/data/exec/json/ArianRey.json deleted file mode 100644 index b16431c1..00000000 --- a/src/lib/data/exec/json/ArianRey.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": { "last_name": "Rey", "nickname": "Arian" }, - "pos": ["2324:Director for Membership & Internals"], - "img": "ArianRey" -} diff --git a/src/lib/data/exec/json/BastiOrtiz.json b/src/lib/data/exec/json/BastiOrtiz.json deleted file mode 100644 index 2403606b..00000000 --- a/src/lib/data/exec/json/BastiOrtiz.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": { "last_name": "Ortiz", "nickname": "Basti" }, - "pos": ["2324:Director for Engineering"], - "img": "BastiOrtiz" -} diff --git a/src/lib/data/exec/json/BeaDiokno.json b/src/lib/data/exec/json/BeaDiokno.json deleted file mode 100644 index 7806b2b0..00000000 --- a/src/lib/data/exec/json/BeaDiokno.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": { "last_name": "Diokno", "nickname": "Bea" }, - "pos": ["2324:Director for External Relations"], - "img": "BeaDiokno" -} diff --git a/src/lib/data/exec/json/BenjLazaro.json b/src/lib/data/exec/json/BenjLazaro.json deleted file mode 100644 index 60f34b6e..00000000 --- a/src/lib/data/exec/json/BenjLazaro.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": { "last_name": "Lazaro", "nickname": "Benj" }, - "pos": ["2425B:Vice President for Innovation"], - "img": "BenjLazaro" -} diff --git a/src/lib/data/exec/json/BmaeAmurao.json b/src/lib/data/exec/json/BmaeAmurao.json deleted file mode 100644 index c3d3ecc6..00000000 --- a/src/lib/data/exec/json/BmaeAmurao.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": { "last_name": "Amurao", "nickname": "Bmae" }, - "pos": [ - "2425A:Director for Membership & Internals", - "2425B:Director for Membership & Internals" - ], - "img": "BmaeAmurao" -} diff --git a/src/lib/data/exec/json/BryanUy.json b/src/lib/data/exec/json/BryanUy.json deleted file mode 100644 index a5e08cbc..00000000 --- a/src/lib/data/exec/json/BryanUy.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": { "last_name": "Uy", "nickname": "Bryan" }, - "pos": ["2425B:Vice President for Service"], - "img": "BryanUy" -} diff --git a/src/lib/data/exec/json/CalebBunye.json b/src/lib/data/exec/json/CalebBunye.json deleted file mode 100644 index 84cb86b3..00000000 --- a/src/lib/data/exec/json/CalebBunye.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": { "last_name": "Bunye", "nickname": "Caleb" }, - "pos": ["2324:President"], - "img": "CalebBunye" -} diff --git a/src/lib/data/exec/json/DonSebastienChavez.json b/src/lib/data/exec/json/DonSebastienChavez.json deleted file mode 100644 index 62395f55..00000000 --- a/src/lib/data/exec/json/DonSebastienChavez.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": { "last_name": "Chavez", "nickname": "Don Sebastien" }, - "pos": ["2425B:Vice President for Service"], - "img": "DonSebastienChavez" -} diff --git a/src/lib/data/exec/json/EyronTanael.json b/src/lib/data/exec/json/EyronTanael.json deleted file mode 100644 index 029a606a..00000000 --- a/src/lib/data/exec/json/EyronTanael.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": { "last_name": "Tanael", "nickname": "Eyron" }, - "pos": ["2324:Vice President for Service"], - "img": "EyronTanael" -} diff --git a/src/lib/data/exec/json/HansLorico.json b/src/lib/data/exec/json/HansLorico.json deleted file mode 100644 index 5a83bf52..00000000 --- a/src/lib/data/exec/json/HansLorico.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": { "last_name": "Lorico", "nickname": "Hans" }, - "pos": ["2324:Vice President for Innovation"], - "img": "HansLorico" -} diff --git a/src/lib/data/exec/json/IsayBucu.json b/src/lib/data/exec/json/IsayBucu.json deleted file mode 100644 index 7e1c2cb4..00000000 --- a/src/lib/data/exec/json/IsayBucu.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": { "last_name": "Bucu", "nickname": "Isay" }, - "pos": ["2425A:Director for Branding & Creatives", "2425B:Director for Branding & Creatives"], - "img": "IsayBucu" -} diff --git a/src/lib/data/exec/json/JellyRaborar.json b/src/lib/data/exec/json/JellyRaborar.json deleted file mode 100644 index 0e94cd2f..00000000 --- a/src/lib/data/exec/json/JellyRaborar.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": { "last_name": "Raborar", "nickname": "Jelly" }, - "pos": ["2324:Director for Branding & Creatives"], - "img": "JellyRaborar" -} diff --git a/src/lib/data/exec/json/SeanKenjiTolentino.json b/src/lib/data/exec/json/SeanKenjiTolentino.json deleted file mode 100644 index a2914117..00000000 --- a/src/lib/data/exec/json/SeanKenjiTolentino.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": { "last_name": "Tolentino", "nickname": "Sean Kenji" }, - "pos": ["2425A:Director for External Relations", "2425B:Director for External Relations"], - "img": "SeanKenjiTolentino" -} diff --git a/src/lib/data/exec/json/VictorReyes.json b/src/lib/data/exec/json/VictorReyes.json deleted file mode 100644 index ee9ebdbe..00000000 --- a/src/lib/data/exec/json/VictorReyes.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": { "last_name": "Reyes", "nickname": "Victor" }, - "pos": ["2425A:Director for Engineering", "2425B:President", "2425B:Director for Engineering"], - "img": "VictorReyes" -} diff --git a/src/lib/data/team/json/AbeSahi.json b/src/lib/data/team/json/AbeSahi.json deleted file mode 100644 index 7b1ad447..00000000 --- a/src/lib/data/team/json/AbeSahi.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Abe Sahi", - "img": "AbeSahi", - "committee": ["Membership & Internals"], - "socials": { "github": "RhamzHam", "linkedin": "Abraham Sahi" } -} diff --git a/src/lib/data/team/json/AishaGo.json b/src/lib/data/team/json/AishaGo.json deleted file mode 100644 index 3130d2cf..00000000 --- a/src/lib/data/team/json/AishaGo.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "Aisha Go", - "img": "AishaGo", - "committee": ["Membership & Internals"], - "socials": { - "github": "aishago", - "linkedin": "aisha-abigail-go-065956304", - "instagram": "aby.mei" - } -} diff --git a/src/lib/data/team/json/AlecLopez.json b/src/lib/data/team/json/AlecLopez.json deleted file mode 100644 index 81efbb3c..00000000 --- a/src/lib/data/team/json/AlecLopez.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Alec Lopez", - "img": "AlecLopez", - "committee": ["Innovation"], - "socials": { "github": "alec-lopez", "linkedin": "Alec Lopez", "instagram": "aaaaleclopez" } -} diff --git "a/src/lib/data/team/json/AlyssaA\303\261onuevo.json" "b/src/lib/data/team/json/AlyssaA\303\261onuevo.json" deleted file mode 100644 index 6c3da033..00000000 --- "a/src/lib/data/team/json/AlyssaA\303\261onuevo.json" +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "Alyssa Añonuevo", - "img": "AlyssaAñonuevo", - "committee": ["External Relations"], - "socials": { - "github": "adanonuevo", - "linkedin": "alessandra-ysabelle-añonuevo-052663319", - "instagram": "alessandra.ysabelle" - } -} diff --git a/src/lib/data/team/json/AndriCrisostomo.json b/src/lib/data/team/json/AndriCrisostomo.json deleted file mode 100644 index b4b29d36..00000000 --- a/src/lib/data/team/json/AndriCrisostomo.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Andri Crisostomo", - "img": "AndriCrisostomo", - "committee": ["Service"], - "socials": { "github": "RpnAndri", "linkedin": "andri-crisostomo-5860282b1" } -} diff --git a/src/lib/data/team/json/AzulEusebio.json b/src/lib/data/team/json/AzulEusebio.json deleted file mode 100644 index de6a1c19..00000000 --- a/src/lib/data/team/json/AzulEusebio.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Azul Eusebio", - "img": "AzulEusebio", - "committee": ["Membership & Internals"], - "socials": { "github": "Alphxs" } -} diff --git a/src/lib/data/team/json/BenjLazaro.json b/src/lib/data/team/json/BenjLazaro.json deleted file mode 100644 index 954c27f6..00000000 --- a/src/lib/data/team/json/BenjLazaro.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Benj Lazaro", - "img": "BenjLazaro", - "committee": ["Executive"], - "socials": { "github": "Enoux", "instagram": "itsyaboikccc" } -} diff --git a/src/lib/data/team/json/BmaeAmurao.json b/src/lib/data/team/json/BmaeAmurao.json deleted file mode 100644 index c121ab95..00000000 --- a/src/lib/data/team/json/BmaeAmurao.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Bmae Amurao", - "img": "BmaeAmurao", - "committee": ["Membership & Internals"], - "socials": { "github": "Baamurao", "instagram": "bmae.jpg" } -} diff --git a/src/lib/data/team/json/BryanUy.json b/src/lib/data/team/json/BryanUy.json deleted file mode 100644 index ca24b9cc..00000000 --- a/src/lib/data/team/json/BryanUy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Bryan Uy", - "img": "BryanUy", - "committee": ["Service", "Executive"], - "socials": { "github": "SpicySpareRibs" } -} diff --git a/src/lib/data/team/json/CJSalces.json b/src/lib/data/team/json/CJSalces.json deleted file mode 100644 index a4c45989..00000000 --- a/src/lib/data/team/json/CJSalces.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "CJ Salces", - "img": "CJSalces", - "committee": ["Innovation"], - "socials": { "github": "rue-22" } -} diff --git a/src/lib/data/team/json/CedricLegara.json b/src/lib/data/team/json/CedricLegara.json deleted file mode 100644 index 49421650..00000000 --- a/src/lib/data/team/json/CedricLegara.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Cedric Legara", - "img": "CedricLegara", - "committee": ["Engineering"], - "socials": { "github": "shankencedric", "linkedin": "sean-ken-cedric-legara-a83a02248" } -} diff --git a/src/lib/data/team/json/CessaGonzales.json b/src/lib/data/team/json/CessaGonzales.json deleted file mode 100644 index 55827d41..00000000 --- a/src/lib/data/team/json/CessaGonzales.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Cessa Gonzales", - "img": "CessaGonzales", - "committee": ["External Relations", "Executive"], - "socials": { "github": "princessagonzales" } -} diff --git a/src/lib/data/team/json/CharSim.json b/src/lib/data/team/json/CharSim.json deleted file mode 100644 index bafb4fd6..00000000 --- a/src/lib/data/team/json/CharSim.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Char Sim", - "img": "CharSim", - "committee": ["Branding & Creatives"], - "socials": { "github": "cassssy", "linkedin": "charlize-sim" } -} diff --git a/src/lib/data/team/json/DaleFlores.json b/src/lib/data/team/json/DaleFlores.json deleted file mode 100644 index ccb307cf..00000000 --- a/src/lib/data/team/json/DaleFlores.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Dale Flores", - "img": "DaleFlores", - "committee": ["Innovation"], - "socials": { "github": "exos7", "linkedin": "dale-sealtiel-flores-3734b3296" } -} diff --git "a/src/lib/data/team/json/DashCe\303\261ido.json" "b/src/lib/data/team/json/DashCe\303\261ido.json" deleted file mode 100644 index 74b6b6d9..00000000 --- "a/src/lib/data/team/json/DashCe\303\261ido.json" +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Dash Ceñido", - "img": "DashCeñido", - "committee": ["External Relations"], - "socials": { "github": "Dcenidoo", "linkedin": "Dcenidoo" } -} diff --git a/src/lib/data/team/json/DonSebastienChavez.json b/src/lib/data/team/json/DonSebastienChavez.json deleted file mode 100644 index c7f8e023..00000000 --- a/src/lib/data/team/json/DonSebastienChavez.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Don Sebastien Chavez", - "img": "DonSebastienChavez", - "committee": ["Service"], - "socials": { "github": "Jol0gs" } -} diff --git a/src/lib/data/team/json/EhrenCastillo.json b/src/lib/data/team/json/EhrenCastillo.json deleted file mode 100644 index d32b8ca5..00000000 --- a/src/lib/data/team/json/EhrenCastillo.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "Ehren Castillo", - "img": "EhrenCastillo", - "committee": ["Engineering", "Executive"], - "socials": { - "github": "ehrelevant", - "linkedin": "ehren-castillo-a8045a269", - "instagram": "ehrelevant_", - "website": "https://ehrelevant.github.io/" - } -} diff --git a/src/lib/data/team/json/EkoDelfin.json b/src/lib/data/team/json/EkoDelfin.json deleted file mode 100644 index 9da0f010..00000000 --- a/src/lib/data/team/json/EkoDelfin.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Eko Delfin", - "img": "EkoDelfin", - "committee": ["Branding & Creatives"], - "socials": { "github": "EkoChamber", "linkedin": "aneko-delfin" } -} diff --git a/src/lib/data/team/json/ElijahMejilla.json b/src/lib/data/team/json/ElijahMejilla.json deleted file mode 100644 index 1d6a5603..00000000 --- a/src/lib/data/team/json/ElijahMejilla.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Elijah Mejilla", - "img": "ElijahMejilla", - "committee": ["Engineering"], - "socials": { "github": "jgmejilla" } -} diff --git a/src/lib/data/team/json/EllieLim.json b/src/lib/data/team/json/EllieLim.json deleted file mode 100644 index 2cec0f2d..00000000 --- a/src/lib/data/team/json/EllieLim.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Ellie Lim", - "img": "EllieLim", - "committee": ["Innovation"], - "socials": { "github": "ElianaLim", "linkedin": "Eliana Mari Lim" } -} diff --git a/src/lib/data/team/json/EmmanAmante.json b/src/lib/data/team/json/EmmanAmante.json deleted file mode 100644 index a12e9d35..00000000 --- a/src/lib/data/team/json/EmmanAmante.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Emman Amante", - "img": "EmmanAmante", - "committee": ["Service"], - "socials": { "github": "Emzxxx" } -} diff --git a/src/lib/data/team/json/EthanFilio.json b/src/lib/data/team/json/EthanFilio.json deleted file mode 100644 index 2235438c..00000000 --- a/src/lib/data/team/json/EthanFilio.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Ethan Filio", - "img": "EthanFilio", - "committee": ["Service"], - "socials": { "github": "EthanFilio", "linkedin": "ethan-filio-608a0b200" } -} diff --git a/src/lib/data/team/json/FibiMoraca.json b/src/lib/data/team/json/FibiMoraca.json deleted file mode 100644 index 2b8920ab..00000000 --- a/src/lib/data/team/json/FibiMoraca.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Fibi Moraca", - "img": "FibiMoraca", - "committee": ["Branding & Creatives"], - "socials": { "github": "dinemunyu" } -} diff --git a/src/lib/data/team/json/GVVitug.json b/src/lib/data/team/json/GVVitug.json deleted file mode 100644 index 177664c9..00000000 --- a/src/lib/data/team/json/GVVitug.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "GV Vitug", - "img": "GVVitug", - "committee": ["External Relations"], - "socials": { "github": "good-vibe" } -} diff --git a/src/lib/data/team/json/GabbySacramento.json b/src/lib/data/team/json/GabbySacramento.json deleted file mode 100644 index 718a972c..00000000 --- a/src/lib/data/team/json/GabbySacramento.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Gabby Sacramento", - "img": "GabbySacramento", - "committee": ["Membership & Internals"], - "socials": { "github": "gabrielle-denise", "instagram": "gabricllc" } -} diff --git a/src/lib/data/team/json/HanzVicencio.json b/src/lib/data/team/json/HanzVicencio.json deleted file mode 100644 index 90a4f98a..00000000 --- a/src/lib/data/team/json/HanzVicencio.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Hanz Vicencio", - "img": "HanzVicencio", - "committee": ["Innovation"], - "socials": { "github": "s0mme" } -} diff --git a/src/lib/data/team/json/InigoDeGuzman.json b/src/lib/data/team/json/InigoDeGuzman.json deleted file mode 100644 index aa3d6b7d..00000000 --- a/src/lib/data/team/json/InigoDeGuzman.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Inigo De Guzman", - "img": "InigoDeGuzman", - "committee": ["External Relations"], - "socials": { "github": "Inigo-D120" } -} diff --git a/src/lib/data/team/json/IsayBucu.json b/src/lib/data/team/json/IsayBucu.json deleted file mode 100644 index 1c6af465..00000000 --- a/src/lib/data/team/json/IsayBucu.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "Isay Bucu", - "img": "IsayBucu", - "committee": ["Branding & Creatives"], - "socials": { - "github": "ClarisseCoconut", - "linkedin": "Clarisse Bianca Bucu", - "instagram": "clarissecoconut" - } -} diff --git a/src/lib/data/team/json/JackyAbucay.json b/src/lib/data/team/json/JackyAbucay.json deleted file mode 100644 index 4fb721d5..00000000 --- a/src/lib/data/team/json/JackyAbucay.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Jacky Abucay", - "img": "JackyAbucay", - "committee": ["Engineering"], - "socials": { "github": "up-jacky" } -} diff --git a/src/lib/data/team/json/JeromeEstrella.json b/src/lib/data/team/json/JeromeEstrella.json deleted file mode 100644 index 0733f108..00000000 --- a/src/lib/data/team/json/JeromeEstrella.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Jerome Estrella", - "img": "JeromeEstrella", - "committee": ["External Relations"], - "socials": { "github": "Nagimaeda", "instagram": "notjerome.e" } -} diff --git a/src/lib/data/team/json/JulianDolojan.json b/src/lib/data/team/json/JulianDolojan.json deleted file mode 100644 index 5070c3c7..00000000 --- a/src/lib/data/team/json/JulianDolojan.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Julian Dolojan", - "img": "JulianDolojan", - "committee": ["External Relations"], - "socials": { "github": "TrashHat" } -} diff --git a/src/lib/data/team/json/KCAbriol.json b/src/lib/data/team/json/KCAbriol.json deleted file mode 100644 index fda7eb77..00000000 --- a/src/lib/data/team/json/KCAbriol.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "KC Abriol", - "img": "KCAbriol", - "committee": ["Innovation"], - "socials": { "github": "kcthegreat18" } -} diff --git a/src/lib/data/team/json/KarinConsebido.json b/src/lib/data/team/json/KarinConsebido.json deleted file mode 100644 index 21fcd8af..00000000 --- a/src/lib/data/team/json/KarinConsebido.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Karin Consebido", - "img": "KarinConsebido", - "committee": ["Branding & Creatives", "Executive"], - "socials": { "github": "kalatkarin" } -} diff --git a/src/lib/data/team/json/KarloDomingo.json b/src/lib/data/team/json/KarloDomingo.json deleted file mode 100644 index fb93c22a..00000000 --- a/src/lib/data/team/json/KarloDomingo.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Karlo Domingo", - "img": "KarloDomingo", - "committee": ["Branding & Creatives"], - "socials": { "github": "krldomingo" } -} diff --git a/src/lib/data/team/json/KennethCo.json b/src/lib/data/team/json/KennethCo.json deleted file mode 100644 index d8f9cfe1..00000000 --- a/src/lib/data/team/json/KennethCo.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "Kenneth Co", - "img": "KennethCo", - "committee": ["Membership & Internals"], - "socials": { - "github": "Chraltsha", - "linkedin": "justin-co-701785315", - "instagram": "chraltsha" - } -} diff --git a/src/lib/data/team/json/KurtLanting.json b/src/lib/data/team/json/KurtLanting.json deleted file mode 100644 index 512df001..00000000 --- a/src/lib/data/team/json/KurtLanting.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Kurt Lanting", - "img": "KurtLanting", - "committee": ["Innovation"], - "socials": { "github": "LantingKurt", "linkedin": "Kurt Lanting" } -} diff --git a/src/lib/data/team/json/LeanneAustria.json b/src/lib/data/team/json/LeanneAustria.json deleted file mode 100644 index 1f9ef0f7..00000000 --- a/src/lib/data/team/json/LeanneAustria.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Leanne Austria", - "img": "LeanneAustria", - "committee": ["Service"], - "socials": { "github": "aiarre", "linkedin": "leanne-austria-6a4709256" } -} diff --git a/src/lib/data/team/json/LilyCelestino.json b/src/lib/data/team/json/LilyCelestino.json deleted file mode 100644 index 05dcdde0..00000000 --- a/src/lib/data/team/json/LilyCelestino.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Lily Celestino", - "img": "LilyCelestino", - "committee": ["Engineering"], - "socials": { "github": "Nodeil" } -} diff --git a/src/lib/data/team/json/LouieTorres.json b/src/lib/data/team/json/LouieTorres.json deleted file mode 100644 index cf96c703..00000000 --- a/src/lib/data/team/json/LouieTorres.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "Louie Torres", - "img": "LouieTorres", - "committee": ["Engineering"], - "socials": { - "github": "louie-github", - "linkedin": "aloysius-reve-torres-98829a295", - "instagram": "louie_art48", - "website": "https://blog.lowkeytowers.com" - } -} diff --git a/src/lib/data/team/json/LucasAgcaoili.json b/src/lib/data/team/json/LucasAgcaoili.json deleted file mode 100644 index d8a0976e..00000000 --- a/src/lib/data/team/json/LucasAgcaoili.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Lucas Agcaoili", - "img": "LucasAgcaoili", - "committee": ["Engineering"], - "socials": { "github": "roCatalyst" } -} diff --git a/src/lib/data/team/json/MarcusPascual.json b/src/lib/data/team/json/MarcusPascual.json deleted file mode 100644 index e061459f..00000000 --- a/src/lib/data/team/json/MarcusPascual.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Marcus Pascual", - "img": "MarcusPascual", - "committee": ["Engineering"], - "socials": { "github": "syncopascual", "instagram": "monosyphone" } -} diff --git a/src/lib/data/team/json/MariusBarcenas.json b/src/lib/data/team/json/MariusBarcenas.json deleted file mode 100644 index 6c394c0c..00000000 --- a/src/lib/data/team/json/MariusBarcenas.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Marius Barcenas", - "img": "MariusBarcenas", - "committee": ["Engineering"], - "socials": { "github": "ulyzses", "linkedin": "ulyzses" } -} diff --git a/src/lib/data/team/json/MichaelReal.json b/src/lib/data/team/json/MichaelReal.json deleted file mode 100644 index 5583c25d..00000000 --- a/src/lib/data/team/json/MichaelReal.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Michael Real", - "img": "MichaelReal", - "committee": ["Engineering"], - "socials": { "github": "AnonM00se", "instagram": "d_real_mj" } -} diff --git a/src/lib/data/team/json/MigzGuiang.json b/src/lib/data/team/json/MigzGuiang.json deleted file mode 100644 index 785560bb..00000000 --- a/src/lib/data/team/json/MigzGuiang.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Migz Guiang", - "img": "MigzGuiang", - "committee": ["Innovation"], - "socials": { "github": "SHIROKAMIQQ", "linkedin": "miguel-guiang-a03a0530a" } -} diff --git a/src/lib/data/team/json/MikelArcardo.json b/src/lib/data/team/json/MikelArcardo.json deleted file mode 100644 index 8138433d..00000000 --- a/src/lib/data/team/json/MikelArcardo.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "Mikel Arcardo", - "img": "MikelArcardo", - "committee": ["Innovation", "Executive"], - "socials": { - "github": "mikelReinanArcardo", - "linkedin": "mikel-reinan-arcardo-194680296", - "instagram": "mkl.rcrd" - } -} diff --git "a/src/lib/data/team/json/NateZu\303\261iga.json" "b/src/lib/data/team/json/NateZu\303\261iga.json" deleted file mode 100644 index cae0c812..00000000 --- "a/src/lib/data/team/json/NateZu\303\261iga.json" +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Nate Zuñiga", - "img": "NateZuñiga", - "committee": ["Membership & Internals", "Executive"], - "socials": { "github": "truenofalse" } -} diff --git a/src/lib/data/team/json/PaoloLapira.json b/src/lib/data/team/json/PaoloLapira.json deleted file mode 100644 index 0c16834d..00000000 --- a/src/lib/data/team/json/PaoloLapira.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Paolo Lapira", - "img": "PaoloLapira", - "committee": ["Membership & Internals"], - "socials": { "github": "siopaobunz" } -} diff --git a/src/lib/data/team/json/PaulaDomingo.json b/src/lib/data/team/json/PaulaDomingo.json deleted file mode 100644 index 6203fa82..00000000 --- a/src/lib/data/team/json/PaulaDomingo.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Paula Domingo", - "img": "PaulaDomingo", - "committee": ["Branding & Creatives"], - "socials": { "github": "Paula-Domingo" } -} diff --git a/src/lib/data/team/json/RafaJimenez.json b/src/lib/data/team/json/RafaJimenez.json deleted file mode 100644 index 28aff6c5..00000000 --- a/src/lib/data/team/json/RafaJimenez.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Rafa Jimenez", - "img": "RafaJimenez", - "committee": ["External Relations"], - "socials": { "github": "GRjimenez" } -} diff --git a/src/lib/data/team/json/SamSiy.json b/src/lib/data/team/json/SamSiy.json deleted file mode 100644 index 1f9119b4..00000000 --- a/src/lib/data/team/json/SamSiy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Sam Siy", - "img": "SamSiy", - "committee": ["Service"], - "socials": { "github": "SamanthaSiy", "linkedin": "samantha-siy-ab8219302" } -} diff --git a/src/lib/data/team/json/SeanKenjiTolentino.json b/src/lib/data/team/json/SeanKenjiTolentino.json deleted file mode 100644 index 25dee592..00000000 --- a/src/lib/data/team/json/SeanKenjiTolentino.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Sean Kenji Tolentino", - "img": "SeanKenjiTolentino", - "committee": ["External Relations"], - "socials": { "github": "Tolenn", "linkedin": "Sean Kenji Tolentino" } -} diff --git a/src/lib/data/team/json/ShereenaVillafania.json b/src/lib/data/team/json/ShereenaVillafania.json deleted file mode 100644 index fb9e27ba..00000000 --- a/src/lib/data/team/json/ShereenaVillafania.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Shereena Villafania", - "img": "ShereenaVillafania", - "committee": ["Service"], - "socials": { "github": "Shereena-Work", "instagram": "shereena_haniwa" } -} diff --git a/src/lib/data/team/json/SheyManzala.json b/src/lib/data/team/json/SheyManzala.json deleted file mode 100644 index dcd949ac..00000000 --- a/src/lib/data/team/json/SheyManzala.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Shey Manzala", - "img": "SheyManzala", - "committee": ["Service"], - "socials": { "github": "dajemide", "instagram": "dajemide" } -} diff --git a/src/lib/data/team/json/SidneyFernando.json b/src/lib/data/team/json/SidneyFernando.json deleted file mode 100644 index 7a9bf89a..00000000 --- a/src/lib/data/team/json/SidneyFernando.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Sidney Fernando", - "img": "SidneyFernando", - "committee": ["Innovation", "Executive"], - "socials": { "github": "slcfernando", "linkedin": "slcfernando" } -} diff --git a/src/lib/data/team/json/TrishObzunar.json b/src/lib/data/team/json/TrishObzunar.json deleted file mode 100644 index e31a7a67..00000000 --- a/src/lib/data/team/json/TrishObzunar.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Trish Obzunar", - "img": "TrishObzunar", - "committee": ["Membership & Internals"], - "socials": { "github": "tmobzunar" } -} diff --git a/src/lib/data/team/json/YenyenGalinato.json b/src/lib/data/team/json/YenyenGalinato.json deleted file mode 100644 index e05016d8..00000000 --- a/src/lib/data/team/json/YenyenGalinato.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Yenyen Galinato", - "img": "YenyenGalinato", - "committee": ["Engineering"], - "socials": { "github": "galierie", "linkedin": "edgalinato" } -} diff --git a/src/lib/data/team/json/YsaacVillamil.json b/src/lib/data/team/json/YsaacVillamil.json deleted file mode 100644 index 3d0171ad..00000000 --- a/src/lib/data/team/json/YsaacVillamil.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Ysaac Villamil", - "img": "YsaacVillamil", - "committee": ["Innovation"], - "socials": { "github": "LigsQt", "linkedin": "jysv" } -} diff --git a/src/lib/data/team/json/YuwenSaavedra.json b/src/lib/data/team/json/YuwenSaavedra.json deleted file mode 100644 index 805f8fa6..00000000 --- a/src/lib/data/team/json/YuwenSaavedra.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Yuwen Saavedra", - "img": "YuwenSaavedra", - "committee": ["Branding & Creatives"], - "socials": { "github": "BluNuggets" } -} From ecc880ef67ebc518c5ba617f79337d66c7e0a2cf Mon Sep 17 00:00:00 2001 From: Ehren Castillo Date: Mon, 13 Apr 2026 12:43:46 +0800 Subject: [PATCH 10/23] feat(env): add validation step to parsing environment variables --- src/lib/env.ts | 5 +++++ src/lib/supabaseClient.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 src/lib/env.ts diff --git a/src/lib/env.ts b/src/lib/env.ts new file mode 100644 index 00000000..e8f6b12e --- /dev/null +++ b/src/lib/env.ts @@ -0,0 +1,5 @@ +import { PUBLIC_SUPABASE_URL, PUBLIC_SUPABASE_PUBLISHABLE_KEY } from '$env/static/public'; +import { parse, string } from 'valibot'; + +export const SUPABASE_PUBLISHABLE_KEY = parse(string("PUBLIC_SUPABASE_PUBLISHABLE_KEY not supplied or not a string"), PUBLIC_SUPABASE_PUBLISHABLE_KEY); +export const SUPABASE_URL = parse(string("PUBLIC_SUPABASE_URL not supplied or not a string"), PUBLIC_SUPABASE_URL); \ No newline at end of file diff --git a/src/lib/supabaseClient.ts b/src/lib/supabaseClient.ts index d962b9a5..e9ff366b 100644 --- a/src/lib/supabaseClient.ts +++ b/src/lib/supabaseClient.ts @@ -1,4 +1,4 @@ import { createClient } from '@supabase/supabase-js'; -import { PUBLIC_SUPABASE_URL, PUBLIC_SUPABASE_PUBLISHABLE_KEY } from '$env/static/public'; +import { SUPABASE_PUBLISHABLE_KEY, SUPABASE_URL } from '$lib/env'; -export const supabase = createClient(PUBLIC_SUPABASE_URL, PUBLIC_SUPABASE_PUBLISHABLE_KEY); +export const supabase = createClient(SUPABASE_URL, SUPABASE_PUBLISHABLE_KEY); From 6cc5cc824f95309fe987295c17f1072fd471885f Mon Sep 17 00:00:00 2001 From: Ehren Castillo Date: Mon, 13 Apr 2026 17:36:31 +0800 Subject: [PATCH 11/23] refactor(people): match member schema with database query --- src/lib/models/member.ts | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/lib/models/member.ts b/src/lib/models/member.ts index 7089d445..817b8d92 100644 --- a/src/lib/models/member.ts +++ b/src/lib/models/member.ts @@ -1,17 +1,21 @@ -import { type InferOutput, array, object, optional, picklist, record, string } from 'valibot'; +import { type InferOutput, boolean, nullable, number, object, picklist, pipe, string, url } from 'valibot'; import { MemberCommittees } from '$lib/types/committees'; -import { MemberSocialMedia } from '$lib/types/social_media'; -import { POSITIONS } from '$lib/models/position'; export const Member = object({ - name: string(), - img: string(), - title: optional(array(picklist(POSITIONS))), - committee: array(picklist(Object.keys(MemberCommittees))), - socials: optional(record(picklist(Object.keys(MemberSocialMedia)), string())), + id: number(), + last_name: string(), + nickname: string(), + image_url: pipe(string(), url("Invalid image URL")), + committee: picklist(Object.keys(MemberCommittees)), + is_exec: boolean(), + github_handle: nullable(string()), + linkedin_url: nullable(pipe(string(), url("Invalid LinkedIn URL"))), + instagram_url: nullable(pipe(string(), url("Invalid Instagram URL"))), + website_url: nullable(pipe(string(), url("Invalid Website URL"))) }); -export interface Member extends InferOutput { - src: string; +export interface Member extends Pick, 'id' | 'last_name' | 'nickname' | 'image_url'> { + committees: string[]; + socials: Record; } From df8b1439edd2de25ec0008329783233bc2ddfd7e Mon Sep 17 00:00:00 2001 From: Ehren Castillo Date: Mon, 13 Apr 2026 17:39:03 +0800 Subject: [PATCH 12/23] refactor(people): remove committee abbreviations The database was updated to use the full committee names instead of their abbreviations. --- src/lib/data/team/index.ts | 69 ++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 37 deletions(-) diff --git a/src/lib/data/team/index.ts b/src/lib/data/team/index.ts index f24e4132..5984f437 100644 --- a/src/lib/data/team/index.ts +++ b/src/lib/data/team/index.ts @@ -1,58 +1,53 @@ import { supabase } from '$lib/supabaseClient'; import { Member } from '$lib/models/member'; - -const committeeMap: Record = { - SERVICE: 'Service', - 'M&I': 'Membership & Internals', - ENGG: 'Engineering', - BEX: 'Executive', - INNOV: 'Innovation', - EXTE: 'External Relations', - BnC: 'Branding & Creatives', -}; +import { array, parse } from 'valibot'; export async function getTeam() { const { data, error } = await supabase.from('people').select(` - last_name, - nickname, - image_url, - committee, - is_exec, - github_handle, - linkedin_url, - instagram_url, - website_url + id, + last_name, + nickname, + image_url, + committee, + is_exec, + github_handle, + linkedin_url, + instagram_url, + website_url `); if (error) throw new Error('team data fetching error'); - const members: Member[] = data.map(person => { - const comm = committeeMap[person.committee]!; - + const members = parse(array(Member), data).map(({ + committee, + is_exec, + github_handle, + linkedin_url, + instagram_url, + website_url, + ...rest + }) => { // a quirk of the DB setup, // if the comm is set to Executive then thats the president, // otherwise if the person is_exec then they have two comms, // everone else has only one comm - const committees = [comm]; - if (person.is_exec && comm !== 'Executive') committees.push('Executive'); + const committees = [committee]; + if (is_exec && committee !== 'Executive') committees.push('Executive'); const socials: Record = {}; - if (person.github_handle) socials.github = person.github_handle; - if (person.linkedin_url) socials.linkedin = person.linkedin_url; - if (person.instagram_url) socials.instagram = person.instagram_url; - if (person.website_url) socials.website = person.website_url; + if (github_handle) socials.github = github_handle; + if (linkedin_url) socials.linkedin = linkedin_url; + if (instagram_url) socials.instagram = instagram_url; + if (website_url) socials.website = website_url; - const member: Member = { - name: `${person.nickname} ${person.last_name}`, - img: person.image_url, - committee: committees, - socials, - src: person.image_url, + return { + ...rest, + committees, + socials }; - - return member; }); - return members.sort((a, b) => a.name.localeCompare(b.name)); + // Sorts members by nickname (or last name if nickname is the same) + return members.sort((a, b) => a.nickname.localeCompare(b.nickname) || a.last_name.localeCompare(b.last_name)); } From a2517df9b7e867dea6e1a07c58975acf087e493c Mon Sep 17 00:00:00 2001 From: Ehren Castillo Date: Mon, 13 Apr 2026 17:49:29 +0800 Subject: [PATCH 13/23] refactor(people): prefer views for querying executive boards A view for compiling executive information, aggregating executives' positions into an array, and aggregating executives by term into an object was created in the database. --- src/lib/data/exec/index.ts | 128 ++++----------------------------- src/lib/models/board.ts | 9 +++ src/lib/models/executive.ts | 12 ++++ src/lib/models/officer.ts | 17 ----- src/lib/types/board.ts | 9 --- src/lib/types/board_officer.ts | 7 -- 6 files changed, 33 insertions(+), 149 deletions(-) create mode 100644 src/lib/models/board.ts create mode 100644 src/lib/models/executive.ts delete mode 100644 src/lib/models/officer.ts delete mode 100644 src/lib/types/board.ts delete mode 100644 src/lib/types/board_officer.ts diff --git a/src/lib/data/exec/index.ts b/src/lib/data/exec/index.ts index b315a5a9..a7c455a1 100644 --- a/src/lib/data/exec/index.ts +++ b/src/lib/data/exec/index.ts @@ -1,128 +1,24 @@ -import type { EnhancedImgAttributes } from '@sveltejs/enhanced-img'; -import { parse } from 'valibot'; +import { array, parse } from 'valibot'; import { supabase } from '$lib/supabaseClient'; -import { type Officer, Officer as OfficerSchema } from '$lib/models/officer'; -import { type Position, Position as PositionSchema } from '$lib/models/position'; -import type { Board } from '$lib/types/board'; -import type { BoardOfficer } from '$lib/types/board_officer'; - -interface ExecRow { - term: string; - execs: { - id: number; - last_name: string; - nickname: string; - image_url: string; - }; - positions: { - title: string; - }; -} +import { Board } from '$lib/models/board'; export const pres_term = '2526A'; -async function getOfficers() { +export async function getExecBoards() { + // Queries view that groups executives by term + // View is already sorted in advance, so we can return it directly const { data, error } = await supabase - .from('executive_terms') - .select( - ` + .from('execs_by_term') + .select(` term, - execs ( - id, - last_name, - nickname, - image_url - ), - positions ( - title - ) - `, - ) - .overrideTypes(); + executives + `); if (error) throw new Error('exec data fetching error'); - const exec_map = new Map(); - data.forEach(({ term, execs, positions }) => { - if (!execs || !positions) return; - - const { id, last_name, nickname, image_url } = execs; - const { title } = positions; - - if (exec_map.has(id)) exec_map.get(id).pos.push(`${term}:${title}`); - else - exec_map.set(id, { - name: { - last_name, - nickname, - }, - img: image_url, - pos: [`${term}:${title}`], - }); - }); - const imports = Array.from(exec_map.values()); - - const promises = Object.entries(imports).map(([_, asset]) => { - const officer = parse(OfficerSchema, asset); - - const src: string = officer.img; - - const parsed_pos: Record = {}; - - officer.pos.forEach(raw_detail => { - const detail = raw_detail.split(':'); - const [term, raw_actual_pos] = detail; - const actual_pos: Position = parse(PositionSchema, raw_actual_pos); - - if (term) { - if (!parsed_pos[term]) parsed_pos[term] = []; - - parsed_pos[term].push(actual_pos); - } - }); - - const parsed_officer: Officer = { ...officer, parsed_pos, src }; - return parsed_officer; - }); - - return promises.sort((a, b) => a.name.nickname.localeCompare(b.name.nickname)); -} - -export async function getExec() { - const officers = await getOfficers(); - const boards: Record = {}; - - officers.forEach(({ name, src, parsed_pos }) => { - const { last_name, nickname } = name; - const officer_name = `${nickname} ${last_name}`; - - Object.keys(parsed_pos).forEach(term => { - const title = parsed_pos[term]; - if (title) { - const new_officer: BoardOfficer = { name: officer_name, src, title }; - - if (!boards[term]) { - const new_board: Board = { term, src: null, officers: [] }; - boards[term] = new_board; - } - - boards[term].officers.push(new_officer); - } - }); - }); - - Object.keys(boards).forEach(async term => { - // eslint-disable-next-line @typescript-eslint/init-declarations - let src: EnhancedImgAttributes['src'] | null; - try { - src = (await import(`$lib/assets/exec/${term}.webp?enhanced?url`)).default; - } catch { - src = null; - } - - if (boards[term]) boards[term].src = src; - }); + const execBoards = parse(array(Board), data); - return boards; + // View is already sorted in advance (for both boards and executives), so we can return it directly + return execBoards; } diff --git a/src/lib/models/board.ts b/src/lib/models/board.ts new file mode 100644 index 00000000..9a78f8a3 --- /dev/null +++ b/src/lib/models/board.ts @@ -0,0 +1,9 @@ +import { array, object, string, type InferOutput } from "valibot"; +import { Executive } from "$lib/models/executive"; + +export const Board = object({ + term: string(), + executives: array(Executive), +}); + +export type Board = InferOutput; \ No newline at end of file diff --git a/src/lib/models/executive.ts b/src/lib/models/executive.ts new file mode 100644 index 00000000..a625db92 --- /dev/null +++ b/src/lib/models/executive.ts @@ -0,0 +1,12 @@ +import { array, number, object, pipe, string, url, type InferOutput } from "valibot"; +import { Position } from "$lib/models/position"; + +export const Executive = object({ + id: number(), + last_name: string(), + nickname: string(), + image_url: pipe(string(), url("Invalid image URL")), + titles: array(Position) +}); + +export type Executive = InferOutput; \ No newline at end of file diff --git a/src/lib/models/officer.ts b/src/lib/models/officer.ts deleted file mode 100644 index 4ca62b15..00000000 --- a/src/lib/models/officer.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { type InferOutput, array, object, string } from 'valibot'; - -import type { Position } from '$lib/models/position'; - -export const Officer = object({ - name: object({ - last_name: string(), - nickname: string(), - }), - img: string(), - pos: array(string()), -}); - -export interface Officer extends InferOutput { - src: string; - parsed_pos: Record; -} diff --git a/src/lib/types/board.ts b/src/lib/types/board.ts deleted file mode 100644 index a20aeb22..00000000 --- a/src/lib/types/board.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { EnhancedImgAttributes } from '@sveltejs/enhanced-img'; - -import type { BoardOfficer } from '$lib/types/board_officer'; - -export interface Board { - term: string; - src: EnhancedImgAttributes['src'] | null; - officers: BoardOfficer[]; -} diff --git a/src/lib/types/board_officer.ts b/src/lib/types/board_officer.ts deleted file mode 100644 index 294e064f..00000000 --- a/src/lib/types/board_officer.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { Position } from '$lib/models/position'; - -export interface BoardOfficer { - name: string; - src: string; - title: Position[]; -} From aa4c8fb98004de779b604e56ca79f0ea590c1ebc Mon Sep 17 00:00:00 2001 From: Ehren Castillo Date: Mon, 13 Apr 2026 17:50:46 +0800 Subject: [PATCH 14/23] refactor(people): match people page with respect to updated models --- src/lib/components/cards/MemberCard.svelte | 29 ++++++++++++++----- src/lib/components/cards/MemberCardTag.svelte | 8 ++--- src/lib/components/panels/ExecPanel.svelte | 12 ++++---- src/lib/components/panels/TeamPanel.svelte | 4 +-- src/routes/people/+page.server.ts | 8 ++--- src/routes/people/+page.svelte | 15 ++++------ 6 files changed, 41 insertions(+), 35 deletions(-) diff --git a/src/lib/components/cards/MemberCard.svelte b/src/lib/components/cards/MemberCard.svelte index 779a095e..17d1b6c1 100644 --- a/src/lib/components/cards/MemberCard.svelte +++ b/src/lib/components/cards/MemberCard.svelte @@ -1,20 +1,33 @@ @@ -26,7 +39,7 @@ onmouseleave={() => (isOverlayVisible = false)} > - + {:else}
- +
diff --git a/src/lib/components/cards/MemberCardTag.svelte b/src/lib/components/cards/MemberCardTag.svelte index a4b879cb..01cb562d 100644 --- a/src/lib/components/cards/MemberCardTag.svelte +++ b/src/lib/components/cards/MemberCardTag.svelte @@ -7,18 +7,18 @@ interface Props { name: string; - title?: Position[]; + titles?: Position[]; socials?: Record; } - const { name, title, socials }: Props = $props(); + const { name, titles, socials }: Props = $props();

{name}

- {#if title} + {#if titles}

- {title.join(', ')} + {titles.join(', ')}

{/if}
diff --git a/src/lib/components/panels/ExecPanel.svelte b/src/lib/components/panels/ExecPanel.svelte index 23ea2ed4..fb482c8b 100644 --- a/src/lib/components/panels/ExecPanel.svelte +++ b/src/lib/components/panels/ExecPanel.svelte @@ -1,23 +1,21 @@
- {#each officers as member (member.name)} - + {#each executives as { id, nickname, last_name, image_url, titles } (id)} + {/each}
diff --git a/src/lib/components/panels/TeamPanel.svelte b/src/lib/components/panels/TeamPanel.svelte index 716f4b06..d1d4d057 100644 --- a/src/lib/components/panels/TeamPanel.svelte +++ b/src/lib/components/panels/TeamPanel.svelte @@ -53,8 +53,8 @@ > {#if filteredTeam} {@const { color, foreground } = getCommitteeInfo(currentCommittee)} - {#each filteredTeam as member (member.name)} - + {#each filteredTeam as { id, nickname, last_name, image_url, socials } (id)} + {/each} {/if} diff --git a/src/routes/people/+page.server.ts b/src/routes/people/+page.server.ts index b029a68d..cad9074a 100644 --- a/src/routes/people/+page.server.ts +++ b/src/routes/people/+page.server.ts @@ -1,7 +1,7 @@ import type { Member } from '$lib/models/member'; import { MemberCommittees } from '$lib/types/committees'; -import { getExec } from '$lib/data/exec'; +import { getExecBoards } from '$lib/data/exec'; import { getTeam } from '$lib/data/team'; export async function load() { @@ -9,14 +9,14 @@ export async function load() { const filteredTeams: Record = {}; Object.keys(MemberCommittees).forEach(filterComm => { - filteredTeams[filterComm] = team.filter(({ committee }) => { + filteredTeams[filterComm] = team.filter(({ committees }) => { let in_committee = false; - committee.forEach(comm => { + committees.forEach(comm => { in_committee ||= comm === filterComm; }); return in_committee; }); }); - return { team, filteredTeams, exec: await getExec() }; + return { team, filteredTeams, execBoards: await getExecBoards() }; } diff --git a/src/routes/people/+page.svelte b/src/routes/people/+page.svelte index 3b091327..3ddff6d0 100644 --- a/src/routes/people/+page.svelte +++ b/src/routes/people/+page.svelte @@ -7,9 +7,7 @@ import TeamPanel from '$lib/components/panels/TeamPanel.svelte'; const { data } = $props(); - const { team, filteredTeams, exec } = $derived(data); - - const terms = $derived(Object.keys(exec).sort().reverse()); + const { team, filteredTeams, execBoards } = $derived(data);
@@ -21,14 +19,11 @@ Meet the previous executive boards - {#each terms as term (term)} + {#each execBoards as {term, executives} (term)} {#if term !== pres_term} - {@const board = exec[term]} - {#if board} - - - - {/if} + + + {/if} {/each} From 2f3928fe4803a3ab7478d01d02540851a84e79f2 Mon Sep 17 00:00:00 2001 From: Ehren Castillo Date: Mon, 13 Apr 2026 17:51:27 +0800 Subject: [PATCH 15/23] chore: run formatters and linters --- src/lib/components/cards/MemberCard.svelte | 10 +--- src/lib/data/exec/index.ts | 4 +- src/lib/data/team/index.ts | 58 ++++++++++++---------- src/lib/env.ts | 10 +++- src/lib/models/board.ts | 6 +-- src/lib/models/executive.ts | 10 ++-- src/lib/models/member.ts | 23 ++++++--- src/routes/people/+page.svelte | 2 +- 8 files changed, 67 insertions(+), 56 deletions(-) diff --git a/src/lib/components/cards/MemberCard.svelte b/src/lib/components/cards/MemberCard.svelte index 17d1b6c1..0241583d 100644 --- a/src/lib/components/cards/MemberCard.svelte +++ b/src/lib/components/cards/MemberCard.svelte @@ -16,15 +16,7 @@ foreground: string; } - const { - nickname, - last_name, - image_url, - socials, - titles, - color, - foreground - }: Props = $props(); + const { nickname, last_name, image_url, socials, titles, color, foreground }: Props = $props(); const name = $derived(`${nickname} ${last_name}`); diff --git a/src/lib/data/exec/index.ts b/src/lib/data/exec/index.ts index a7c455a1..29de72f9 100644 --- a/src/lib/data/exec/index.ts +++ b/src/lib/data/exec/index.ts @@ -8,9 +8,7 @@ export const pres_term = '2526A'; export async function getExecBoards() { // Queries view that groups executives by term // View is already sorted in advance, so we can return it directly - const { data, error } = await supabase - .from('execs_by_term') - .select(` + const { data, error } = await supabase.from('execs_by_term').select(` term, executives `); diff --git a/src/lib/data/team/index.ts b/src/lib/data/team/index.ts index 5984f437..9e903c8f 100644 --- a/src/lib/data/team/index.ts +++ b/src/lib/data/team/index.ts @@ -18,36 +18,40 @@ export async function getTeam() { if (error) throw new Error('team data fetching error'); - const members = parse(array(Member), data).map(({ - committee, - is_exec, - github_handle, - linkedin_url, - instagram_url, - website_url, - ...rest - }) => { - // a quirk of the DB setup, - // if the comm is set to Executive then thats the president, - // otherwise if the person is_exec then they have two comms, - // everone else has only one comm - const committees = [committee]; - if (is_exec && committee !== 'Executive') committees.push('Executive'); + const members = parse(array(Member), data).map( + ({ + committee, + is_exec, + github_handle, + linkedin_url, + instagram_url, + website_url, + ...rest + }) => { + // a quirk of the DB setup, + // if the comm is set to Executive then thats the president, + // otherwise if the person is_exec then they have two comms, + // everone else has only one comm + const committees = [committee]; + if (is_exec && committee !== 'Executive') committees.push('Executive'); - const socials: Record = {}; + const socials: Record = {}; - if (github_handle) socials.github = github_handle; - if (linkedin_url) socials.linkedin = linkedin_url; - if (instagram_url) socials.instagram = instagram_url; - if (website_url) socials.website = website_url; + if (github_handle) socials.github = github_handle; + if (linkedin_url) socials.linkedin = linkedin_url; + if (instagram_url) socials.instagram = instagram_url; + if (website_url) socials.website = website_url; - return { - ...rest, - committees, - socials - }; - }); + return { + ...rest, + committees, + socials, + }; + }, + ); // Sorts members by nickname (or last name if nickname is the same) - return members.sort((a, b) => a.nickname.localeCompare(b.nickname) || a.last_name.localeCompare(b.last_name)); + return members.sort( + (a, b) => a.nickname.localeCompare(b.nickname) || a.last_name.localeCompare(b.last_name), + ); } diff --git a/src/lib/env.ts b/src/lib/env.ts index e8f6b12e..939b53d2 100644 --- a/src/lib/env.ts +++ b/src/lib/env.ts @@ -1,5 +1,11 @@ import { PUBLIC_SUPABASE_URL, PUBLIC_SUPABASE_PUBLISHABLE_KEY } from '$env/static/public'; import { parse, string } from 'valibot'; -export const SUPABASE_PUBLISHABLE_KEY = parse(string("PUBLIC_SUPABASE_PUBLISHABLE_KEY not supplied or not a string"), PUBLIC_SUPABASE_PUBLISHABLE_KEY); -export const SUPABASE_URL = parse(string("PUBLIC_SUPABASE_URL not supplied or not a string"), PUBLIC_SUPABASE_URL); \ No newline at end of file +export const SUPABASE_PUBLISHABLE_KEY = parse( + string('PUBLIC_SUPABASE_PUBLISHABLE_KEY not supplied or not a string'), + PUBLIC_SUPABASE_PUBLISHABLE_KEY, +); +export const SUPABASE_URL = parse( + string('PUBLIC_SUPABASE_URL not supplied or not a string'), + PUBLIC_SUPABASE_URL, +); diff --git a/src/lib/models/board.ts b/src/lib/models/board.ts index 9a78f8a3..63627a9b 100644 --- a/src/lib/models/board.ts +++ b/src/lib/models/board.ts @@ -1,9 +1,9 @@ -import { array, object, string, type InferOutput } from "valibot"; -import { Executive } from "$lib/models/executive"; +import { array, object, string, type InferOutput } from 'valibot'; +import { Executive } from '$lib/models/executive'; export const Board = object({ term: string(), executives: array(Executive), }); -export type Board = InferOutput; \ No newline at end of file +export type Board = InferOutput; diff --git a/src/lib/models/executive.ts b/src/lib/models/executive.ts index a625db92..cddec16e 100644 --- a/src/lib/models/executive.ts +++ b/src/lib/models/executive.ts @@ -1,12 +1,12 @@ -import { array, number, object, pipe, string, url, type InferOutput } from "valibot"; -import { Position } from "$lib/models/position"; +import { array, number, object, pipe, string, url, type InferOutput } from 'valibot'; +import { Position } from '$lib/models/position'; export const Executive = object({ id: number(), last_name: string(), nickname: string(), - image_url: pipe(string(), url("Invalid image URL")), - titles: array(Position) + image_url: pipe(string(), url('Invalid image URL')), + titles: array(Position), }); -export type Executive = InferOutput; \ No newline at end of file +export type Executive = InferOutput; diff --git a/src/lib/models/member.ts b/src/lib/models/member.ts index 817b8d92..e4aa594c 100644 --- a/src/lib/models/member.ts +++ b/src/lib/models/member.ts @@ -1,4 +1,14 @@ -import { type InferOutput, boolean, nullable, number, object, picklist, pipe, string, url } from 'valibot'; +import { + type InferOutput, + boolean, + nullable, + number, + object, + picklist, + pipe, + string, + url, +} from 'valibot'; import { MemberCommittees } from '$lib/types/committees'; @@ -6,16 +16,17 @@ export const Member = object({ id: number(), last_name: string(), nickname: string(), - image_url: pipe(string(), url("Invalid image URL")), + image_url: pipe(string(), url('Invalid image URL')), committee: picklist(Object.keys(MemberCommittees)), is_exec: boolean(), github_handle: nullable(string()), - linkedin_url: nullable(pipe(string(), url("Invalid LinkedIn URL"))), - instagram_url: nullable(pipe(string(), url("Invalid Instagram URL"))), - website_url: nullable(pipe(string(), url("Invalid Website URL"))) + linkedin_url: nullable(pipe(string(), url('Invalid LinkedIn URL'))), + instagram_url: nullable(pipe(string(), url('Invalid Instagram URL'))), + website_url: nullable(pipe(string(), url('Invalid Website URL'))), }); -export interface Member extends Pick, 'id' | 'last_name' | 'nickname' | 'image_url'> { +export interface Member + extends Pick, 'id' | 'last_name' | 'nickname' | 'image_url'> { committees: string[]; socials: Record; } diff --git a/src/routes/people/+page.svelte b/src/routes/people/+page.svelte index 3ddff6d0..ce4591fb 100644 --- a/src/routes/people/+page.svelte +++ b/src/routes/people/+page.svelte @@ -19,7 +19,7 @@ Meet the previous executive boards - {#each execBoards as {term, executives} (term)} + {#each execBoards as { term, executives } (term)} {#if term !== pres_term} From 2e0bb9d5b062cc6f316fb6010c0e20423daea09a Mon Sep 17 00:00:00 2001 From: Ehren Castillo Date: Mon, 13 Apr 2026 18:12:44 +0800 Subject: [PATCH 16/23] feat(ci): inject env variables in actions workflow --- .github/workflows/deploy.yml | 98 +++++++++++++++++++----------------- 1 file changed, 51 insertions(+), 47 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d28bbe35..3452a35d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,56 +1,60 @@ name: Deploy to GitHub Pages on: - workflow_dispatch: - pull_request: - push: - branches: main + workflow_dispatch: + pull_request: + push: + branches: + - main permissions: - contents: read - pages: write - id-token: write + contents: read + pages: write + id-token: write concurrency: - group: pages - cancel-in-progress: false + group: pages + cancel-in-progress: false jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - name: Install pnpm - uses: pnpm/action-setup@v4 - - name: Install Node.js - uses: actions/setup-node@v5 - with: - cache: pnpm - cache-dependency-path: pnpm-lock.yaml - node-version: 24 - - name: Install Dependencies - run: pnpm install - - name: Check Formatters - run: pnpm fmt - - name: Run All Lints in Parallel - run: pnpm lint - - name: Build Website - run: pnpm build - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload Artifact - uses: actions/upload-pages-artifact@v3 - with: - path: build - deploy: - if: ${{ github.event_name == 'push' }} - needs: build - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 + - name: Install Node.js + uses: actions/setup-node@v5 + with: + cache: pnpm + cache-dependency-path: pnpm-lock.yaml + node-version: 24 + - name: Install Dependencies + run: pnpm install + - name: Check Formatters + run: pnpm fmt + - name: Run All Lints in Parallel + run: pnpm lint + - name: Build Website + run: pnpm build + env: + PUBLIC_SUPABASE_URL: ${{ secrets.PUBLIC_SUPABASE_URL }} + PUBLIC_SUPABASE_PUBLISHABLE_KEY: ${{ secrets.PUBLIC_SUPABASE_PUBLISHABLE_KEY }} + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Upload Artifact + uses: actions/upload-pages-artifact@v3 + with: + path: build + deploy: + if: ${{ github.event_name == 'push' }} + needs: build + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From d1acc7c6b12f0ac1a3d02ec74d46e769d77bb6ca Mon Sep 17 00:00:00 2001 From: Ehren Castillo Date: Mon, 13 Apr 2026 18:17:35 +0800 Subject: [PATCH 17/23] chore: run formatter --- .github/workflows/deploy.yml | 102 +++++++++++++++++------------------ 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3452a35d..127bfcba 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,60 +1,60 @@ name: Deploy to GitHub Pages on: - workflow_dispatch: - pull_request: - push: - branches: - - main + workflow_dispatch: + pull_request: + push: + branches: + - main permissions: - contents: read - pages: write - id-token: write + contents: read + pages: write + id-token: write concurrency: - group: pages - cancel-in-progress: false + group: pages + cancel-in-progress: false jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - name: Install pnpm - uses: pnpm/action-setup@v4 - - name: Install Node.js - uses: actions/setup-node@v5 - with: - cache: pnpm - cache-dependency-path: pnpm-lock.yaml - node-version: 24 - - name: Install Dependencies - run: pnpm install - - name: Check Formatters - run: pnpm fmt - - name: Run All Lints in Parallel - run: pnpm lint - - name: Build Website - run: pnpm build - env: - PUBLIC_SUPABASE_URL: ${{ secrets.PUBLIC_SUPABASE_URL }} - PUBLIC_SUPABASE_PUBLISHABLE_KEY: ${{ secrets.PUBLIC_SUPABASE_PUBLISHABLE_KEY }} - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload Artifact - uses: actions/upload-pages-artifact@v3 - with: - path: build - deploy: - if: ${{ github.event_name == 'push' }} - needs: build - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 + - name: Install Node.js + uses: actions/setup-node@v5 + with: + cache: pnpm + cache-dependency-path: pnpm-lock.yaml + node-version: 24 + - name: Install Dependencies + run: pnpm install + - name: Check Formatters + run: pnpm fmt + - name: Run All Lints in Parallel + run: pnpm lint + - name: Build Website + run: pnpm build + env: + PUBLIC_SUPABASE_URL: ${{ secrets.PUBLIC_SUPABASE_URL }} + PUBLIC_SUPABASE_PUBLISHABLE_KEY: ${{ secrets.PUBLIC_SUPABASE_PUBLISHABLE_KEY }} + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Upload Artifact + uses: actions/upload-pages-artifact@v3 + with: + path: build + deploy: + if: ${{ github.event_name == 'push' }} + needs: build + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From bb5d8598ff67f9b6691d248849b175c6fc448f49 Mon Sep 17 00:00:00 2001 From: Ehren Castillo Date: Mon, 13 Apr 2026 18:25:45 +0800 Subject: [PATCH 18/23] chore: inject env variables in linting and formatting steps --- .github/workflows/deploy.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 127bfcba..12509367 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -34,8 +34,14 @@ jobs: run: pnpm install - name: Check Formatters run: pnpm fmt + env: + PUBLIC_SUPABASE_URL: ${{ secrets.PUBLIC_SUPABASE_URL }} + PUBLIC_SUPABASE_PUBLISHABLE_KEY: ${{ secrets.PUBLIC_SUPABASE_PUBLISHABLE_KEY }} - name: Run All Lints in Parallel run: pnpm lint + env: + PUBLIC_SUPABASE_URL: ${{ secrets.PUBLIC_SUPABASE_URL }} + PUBLIC_SUPABASE_PUBLISHABLE_KEY: ${{ secrets.PUBLIC_SUPABASE_PUBLISHABLE_KEY }} - name: Build Website run: pnpm build env: From dcaa9cb55b8d768415819170f5ef6db5852734b7 Mon Sep 17 00:00:00 2001 From: Ehren Castillo Date: Mon, 13 Apr 2026 23:26:55 +0800 Subject: [PATCH 19/23] fix(ci): set workflow env variables at start --- .github/workflows/deploy.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 12509367..43faf496 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,6 +16,10 @@ concurrency: group: pages cancel-in-progress: false +env: + PUBLIC_SUPABASE_URL: ${{ secrets.PUBLIC_SUPABASE_URL }} + PUBLIC_SUPABASE_PUBLISHABLE_KEY: ${{ secrets.PUBLIC_SUPABASE_PUBLISHABLE_KEY }} + jobs: build: runs-on: ubuntu-latest @@ -34,19 +38,10 @@ jobs: run: pnpm install - name: Check Formatters run: pnpm fmt - env: - PUBLIC_SUPABASE_URL: ${{ secrets.PUBLIC_SUPABASE_URL }} - PUBLIC_SUPABASE_PUBLISHABLE_KEY: ${{ secrets.PUBLIC_SUPABASE_PUBLISHABLE_KEY }} - name: Run All Lints in Parallel run: pnpm lint - env: - PUBLIC_SUPABASE_URL: ${{ secrets.PUBLIC_SUPABASE_URL }} - PUBLIC_SUPABASE_PUBLISHABLE_KEY: ${{ secrets.PUBLIC_SUPABASE_PUBLISHABLE_KEY }} - name: Build Website run: pnpm build - env: - PUBLIC_SUPABASE_URL: ${{ secrets.PUBLIC_SUPABASE_URL }} - PUBLIC_SUPABASE_PUBLISHABLE_KEY: ${{ secrets.PUBLIC_SUPABASE_PUBLISHABLE_KEY }} - name: Setup Pages uses: actions/configure-pages@v4 - name: Upload Artifact From bc4d258aff5a971b6610a3829593aa731eda64da Mon Sep 17 00:00:00 2001 From: Ehren Castillo Date: Mon, 13 Apr 2026 23:54:34 +0800 Subject: [PATCH 20/23] chore(ci): prefer repository variables over secrets for public supabase keys --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 43faf496..86057426 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,8 +17,8 @@ concurrency: cancel-in-progress: false env: - PUBLIC_SUPABASE_URL: ${{ secrets.PUBLIC_SUPABASE_URL }} - PUBLIC_SUPABASE_PUBLISHABLE_KEY: ${{ secrets.PUBLIC_SUPABASE_PUBLISHABLE_KEY }} + PUBLIC_SUPABASE_URL: ${{ vars.PUBLIC_SUPABASE_URL }} + PUBLIC_SUPABASE_PUBLISHABLE_KEY: ${{ vars.PUBLIC_SUPABASE_PUBLISHABLE_KEY }} jobs: build: From 3020575855c0cb4e42d2f23c62078551ce6b0273 Mon Sep 17 00:00:00 2001 From: Ehren Castillo Date: Tue, 14 Apr 2026 00:07:54 +0800 Subject: [PATCH 21/23] feat(ci): add default values for env variables --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 86057426..a995833a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,8 +17,8 @@ concurrency: cancel-in-progress: false env: - PUBLIC_SUPABASE_URL: ${{ vars.PUBLIC_SUPABASE_URL }} - PUBLIC_SUPABASE_PUBLISHABLE_KEY: ${{ vars.PUBLIC_SUPABASE_PUBLISHABLE_KEY }} + PUBLIC_SUPABASE_URL: ${{ vars.PUBLIC_SUPABASE_URL || 'https://your-supabase-url.supabase.co' }} + PUBLIC_SUPABASE_PUBLISHABLE_KEY: ${{ vars.PUBLIC_SUPABASE_PUBLISHABLE_KEY || 'your-supabase-publishable-key' }} jobs: build: From 6cca4bcc4f7869f03a5bb911002d727df5c467fd Mon Sep 17 00:00:00 2001 From: Ehren Castillo Date: Tue, 14 Apr 2026 00:19:13 +0800 Subject: [PATCH 22/23] feat(ci): separate ci and deploy workflows --- .github/workflows/ci.yml | 33 +++++++++++++++++++++++++++++++++ .github/workflows/deploy.yml | 5 ----- 2 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..a1690e85 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +name: Code Quality + +on: + workflow_dispatch: + pull_request: + push: + branches: + - main + +env: + PUBLIC_SUPABASE_URL: ${{ vars.PUBLIC_SUPABASE_URL || 'https://your-supabase-url.supabase.co' }} + PUBLIC_SUPABASE_PUBLISHABLE_KEY: ${{ vars.PUBLIC_SUPABASE_PUBLISHABLE_KEY || 'your-supabase-publishable-key' }} + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 + - name: Install Node.js + uses: actions/setup-node@v5 + with: + cache: pnpm + cache-dependency-path: pnpm-lock.yaml + node-version: 24 + - name: Install Dependencies + run: pnpm install + - name: Check Formatters + run: pnpm fmt + - name: Run All Lints in Parallel + run: pnpm lint \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a995833a..a828771c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,7 +2,6 @@ name: Deploy to GitHub Pages on: workflow_dispatch: - pull_request: push: branches: - main @@ -36,10 +35,6 @@ jobs: node-version: 24 - name: Install Dependencies run: pnpm install - - name: Check Formatters - run: pnpm fmt - - name: Run All Lints in Parallel - run: pnpm lint - name: Build Website run: pnpm build - name: Setup Pages From 07c54f7280d2d6cd60392506c35e09b6f6f74efd Mon Sep 17 00:00:00 2001 From: Ehren Castillo Date: Tue, 14 Apr 2026 00:19:46 +0800 Subject: [PATCH 23/23] chore: run formatter --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1690e85..e95158ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,4 +30,4 @@ jobs: - name: Check Formatters run: pnpm fmt - name: Run All Lints in Parallel - run: pnpm lint \ No newline at end of file + run: pnpm lint