Astrio provides seamless integration with Supabase, the open-source Firebase alternative built on PostgreSQL. Get a powerful, scalable database with real-time features, authentication, and storage all in one platform.
Leverage the full power of PostgreSQL with Supabase:SQL Support:
Full SQL - Complete PostgreSQL functionality
JSON Data Types - Store and query JSON efficiently
Geographic Data - PostGIS support for location features
Extensions - Rich ecosystem of database extensions
Example Queries:
Copy
-- Create a users tableCREATE TABLE users ( id UUID DEFAULT gen_random_uuid() PRIMARY KEY, email TEXT UNIQUE NOT NULL, name TEXT, created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW());-- Insert dataINSERT INTO users (email, name) VALUES ('john@example.com', 'John Doe');-- Query with JSONSELECT * FROM users WHERE metadata->>'preferences' = 'dark_mode';
Secure your data with fine-grained access control:
Copy
-- Enable RLS on users tableALTER TABLE users ENABLE ROW LEVEL SECURITY;-- Policy for users to see only their own dataCREATE POLICY "Users can view own data" ON users FOR SELECT USING (auth.uid() = id);-- Policy for public read access to profilesCREATE POLICY "Public profiles are viewable" ON users FOR SELECT USING (is_public = true);
Security Features:
User-Based Access - Control access by authenticated user
Role-Based Policies - Different permissions for different roles
Public/Private Data - Mix public and private data in same table
Automatic Filtering - Queries automatically filtered by policies
Manage your database schema through Supabase:Table Creation:
Copy
-- Example: E-commerce schemaCREATE TABLE products ( id UUID DEFAULT gen_random_uuid() PRIMARY KEY, name TEXT NOT NULL, description TEXT, price DECIMAL(10,2) NOT NULL, category TEXT, image_url TEXT, created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW());CREATE TABLE orders ( id UUID DEFAULT gen_random_uuid() PRIMARY KEY, user_id UUID REFERENCES users(id), total_amount DECIMAL(10,2) NOT NULL, status TEXT DEFAULT 'pending', created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW());
Indexes and Performance:
Copy
-- Create indexes for better performanceCREATE INDEX idx_products_category ON products(category);CREATE INDEX idx_orders_user_id ON orders(user_id);CREATE INDEX idx_orders_status ON orders(status);