Connect your Supabase project to get started. This only needs to be done once.
Run this SQL in your Supabase SQL Editor (Database → SQL Editor → New Query):
-- Companies table
CREATE TABLE companies (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
name TEXT NOT NULL,
domain TEXT NOT NULL UNIQUE,
logo_url TEXT,
contact_name TEXT,
contact_email TEXT,
website TEXT,
phone TEXT,
notes TEXT,
created_at TIMESTAMPTZ DEFAULT now()
);
-- Requests table
CREATE TABLE requests (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
company_id UUID REFERENCES companies(id) ON DELETE CASCADE,
requester_email TEXT NOT NULL,
requester_name TEXT NOT NULL,
category TEXT NOT NULL,
title TEXT NOT NULL,
description TEXT NOT NULL,
priority TEXT DEFAULT 'medium',
status TEXT DEFAULT 'new',
page_url TEXT,
screenshot_url TEXT,
created_at TIMESTAMPTZ DEFAULT now(),
updated_at TIMESTAMPTZ DEFAULT now()
);
-- Storage bucket for logos and screenshots
INSERT INTO storage.buckets (id, name, public)
VALUES ('portal-assets', 'portal-assets', true)
ON CONFLICT (id) DO NOTHING;
-- Row Level Security (allow all for anon key — restrict in production)
ALTER TABLE companies ENABLE ROW LEVEL SECURITY;
ALTER TABLE requests ENABLE ROW LEVEL SECURITY;
CREATE POLICY "Allow all companies" ON companies FOR ALL USING (true) WITH CHECK (true);
CREATE POLICY "Allow all requests" ON requests FOR ALL USING (true) WITH CHECK (true);
CREATE POLICY "Allow storage uploads" ON storage.objects FOR ALL USING (true) WITH CHECK (true);
Enter your work email to access your company's portal.
Loading…
Loading…
Current project: