Skip to content

se-polinema/pbl

Repository files navigation

PBL Polinema Portal

Static Astro + Vue frontend for Project Based Learning at Jurusan Teknologi Informasi Politeknik Negeri Malang. Supabase handles auth, data, and storage. GitHub Pages hosts the built site.

Stack

  • Astro 6
  • Vue 3
  • Supabase Auth, Postgres, and Storage
  • GitHub Pages via GitHub Actions

Local setup

  1. Copy .env.example to .env.
  2. Fill PUBLIC_SUPABASE_URL and PUBLIC_SUPABASE_PUBLISHABLE_KEY.
  3. Run npm install.
  4. Run npm run dev.

Supabase setup

  1. Create a Supabase project.
  2. Create two storage buckets:
    • project-public
    • project-private
  3. Run supabase/schema.sql in the SQL editor.
  4. Create the bootstrap admin auth user with email dhanifudin@polinema.ac.id.
  5. Run select public.backfill_bootstrap_admin(); if the auth user existed before the schema was applied.

Auth and admin bootstrap

  • A trigger on auth.users creates or updates public.profiles.
  • The user whose email matches public.app_settings.default_admin_email is assigned the admin role automatically.
  • Admins can open /admin/users to promote or demote users.

Submission window behavior

  • Teams can edit while their submission_windows row is active and the current time is within starts_at and ends_at.
  • After the deadline, data becomes read-only for team users.
  • Teams can still download their own private final report after the deadline.
  • Admins are not blocked by submission windows.

GitHub Pages

  • The workflow uses PUBLIC_SUPABASE_URL and PUBLIC_SUPABASE_PUBLISHABLE_KEY from GitHub repository variables.
  • astro.config.mjs derives the correct base automatically from the GitHub repository name in CI.
  • Public project detail pages use project?slug=... instead of dynamic [slug] routes because GitHub Pages is fully static.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors