Uptime monitoring tool & beautiful status pages
Powered by Supabase!
Free • Open Source • Notification
View Demo
·
Report Bug
·
Request Feature
I saw a lot of Status Page Software-as-a-Service (SAAS) out there lately, but I want to create one that allow users to freely host it themselves, and configure it to their hearts content.
This is the Supabase version of Statusbase!
- 🤩 Free
- 📖 Open-Source
- 🚀 Host it on platforms
- 🔔 Email notifications when site is down (WIP)
Warning This project is still under development
- Fork the repository
- Add your Supabase's Project URL & Key to
.env
- Setup Edge function prerequisites by following these steps.
- Deploy
health_check
function using scriptsupabase functions deploy health_check
- Copy and paste this script in the same Supabase's project SQL Editor
https://app.supabase.com/project/<your-project-ref>/sql
-- Create table
create table if not exists urls (
id uuid default uuid_generate_v4() primary key,
url text not null unique,
title text not null,
description text
);
create table if not exists logs (
id uuid default uuid_generate_v4() primary key,
url_id uuid references urls (id) on delete cascade,
time timestamp with time zone default timezone('utc'::text, now()) not null,
status text not null
);
create table if not exists incidents (
id uuid default uuid_generate_v4() primary key,
url_id uuid references urls (id) on delete cascade,
created_at timestamp with time zone default timezone('utc'::text, now()) not null,
resolved boolean,
content text
);
-- Enable RLS
alter table urls enable row level security;
alter table logs enable row level security;
alter table incidents enable row level security;
-- Create policy to allow public to read
create policy allow_public_to_read on urls for select using (true);
create policy allow_public_to_read on logs for select using (true);
create policy allow_public_to_read on incidents for select using (true);
-- CRON Job
create extension if not exists pg_cron;
create extension if not exists http;
grant usage on schema cron to postgres;
grant all privileges on all tables in schema cron to postgres;
select
cron.schedule(
'health-check-every-15-minute', -- name of the cron job
'*/15 * * * *', -- every 15 minute
$$
select content::json
from
http((
'POST',
'https://<your-project-ref>.functions.supabase.co/health_check',
ARRAY[http_header('Authorization', 'Bearer <supabase-anon-key>')],
'application/json',
'{"hello": "world"}'
)::http_request)
$$
);
- Populate the
urls
table with any url you want to monitor. - Deploy site on any platform
- Celebrate! 🎉
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Zernonia - @zernonia - [email protected]
Also, if you like my work, please buy me a coffee ☕😳