An improved Fork of the Shitty List template, developed by Anticroom for better level management and useablity.
- PostgreSQL Support: Replaced JSON storage with a database for better reliability.
- Admin Panel: Integrated page to add, edit, and reorder levels.
- Audit Logging: Staff actions are logged to Discord via webhooks.
- Staff Management Management page to manage all list editors as owner.
- Create a new project on Supabase.
- Navigate to the SQL Editor in the left sidebar.
- Paste the following script and click Run:
CREATE TABLE public.levels (
id BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
name TEXT NOT NULL,
rank INTEGER NOT NULL,
data JSONB NOT NULL DEFAULT '{}'::jsonb
);
CREATE TABLE public.packs (
id TEXT PRIMARY KEY,
name TEXT NOT NULL,
color TEXT,
levels TEXT[]
);
CREATE TABLE public.system (
key TEXT PRIMARY KEY,
data JSONB NOT NULL
);
INSERT INTO public.system (key, data) VALUES
('_logins', '{"management": [], "admins": []}'),
('_editors', '[]'),
('rules', '{"level_rules": [], "record_rules": []}');
ALTER TABLE public.levels DISABLE ROW LEVEL SECURITY;
ALTER TABLE public.packs DISABLE ROW LEVEL SECURITY;
ALTER TABLE public.system DISABLE ROW LEVEL SECURITY;
Create a .env file in your root directory. You will need these for local testing and Vercel deployment.
# security (create a random string of characters with www.random.org/strings)
JWT_SECRET=[YOURJWTSTRING]
# database (get this from Supabase: project settings > database > connection string > node.js)
DATABASE_URL=postgresql://postgres.[PROJECTID]@[REGION][.pooler.supabase.com:6543/postgres](https://.pooler.supabase.com:6543/postgres)
# webhooks
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/..
DISCORD_UPDATE_WEBHOOK_URL=https://discord.com/api/webhooks/..
DISCORD_COMPLETION_WEBHOOK_URL=https://discord.com/api/webhooks/..
- DISCORD_WEBHOOK_URL: Private audit log for staff actions.
- DISCORD_UPDATE_WEBHOOK_URL: Public channel for level placements/changes.
- DISCORD_COMPLETION_WEBHOOK_URL: Public channel for new records.
- Push this code to a GitHub repository.
- Go to Vercel and create a New Project.
- Import your GitHub repository.
- Add Environment Variables:
- On the "Configure Project" screen, look for Environment Variables.
- Copy the keys and values from your
.envfile and add them one by one. - Alternatively, after the project is created, go to Settings > Environment Variables and add them there.
- Click Deploy.
To access the admin panel, you must manually seed the first management account in the database:
- Go to the Table Editor in Supabase.
- Select the
systemtable. - Edit the
_loginsrow and update themanagementarray to include your desired login:
{
"management": [
{
"username": "admin",
"email": "admin@gmail.com",
"password": "1234"
}
],
"admins": []
}
Developed by Anticroom with love and care ❤️