Static browser app for a private course portal with role-based access, admin user management, sessions, audit history, localStorage fallback, and optional Supabase REST storage.
- Master/admin login screen
- User and admin account management
- Permission toggles for non-master admins
- Session tracking with IP/user-agent metadata
- Course content view for regular users
- Dark/light theme
- Supabase REST integration with localStorage fallback
No build step is required. Serve the folder with any static file server:
python3 -m http.server 5173Then open http://localhost:5173.
Default local demo credentials:
username: master
password: master123
The app works without Supabase by using localStorage. To enable cloud storage,
set SUPABASE_URL and SUPABASE_KEY in js/config.js.
Expected table name: profiles.
Example schema:
create table profiles (
id uuid primary key default gen_random_uuid(),
username text unique not null,
password text not null,
role text not null default 'user',
enabled boolean not null default true,
comment text not null default '',
permissions jsonb not null default '[]'::jsonb,
sessions jsonb not null default '[]'::jsonb,
total_sessions integer not null default 0,
last_active bigint not null default 0
);.
├── index.html
├── css/styles.css
└── js/
├── app.js
├── auth.js
├── config.js
├── database.js
├── sidebar.js
└── ui.js
This is a portfolio/demo frontend prototype. It stores passwords in plain text and performs authentication in the browser, so it is not suitable for production without a real backend, hashed passwords, server-side sessions, and strict Supabase row-level security policies.