Skip to main content

INSTROC Backend

INSTROC includes a complete backend infrastructure so you can build full-stack applications without managing servers.

What's Included

Every INSTROC project comes with:

ServiceDescription
DatabasePostgreSQL database for structured data
AuthenticationUser signup, login, and session management
StorageFile uploads and media hosting
API RoutesServerless functions for custom logic

Architecture

┌─────────────────────────────────────────────────┐
│ Your INSTROC App │
├─────────────────────────────────────────────────┤
│ │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ Pages │ │ API │ │ Server │ │
│ │ │ │ Routes │ │ Actions │ │
│ └────┬────┘ └────┬────┘ └────┬────┘ │
│ │ │ │ │
│ └────────────┼────────────┘ │
│ │ │
│ ┌────────────┼────────────┐ │
│ ▼ ▼ ▼ │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │Database │ │ Auth │ │ Storage │ │
│ │(Supabase)│ │ │ │ │ │
│ └─────────┘ └─────────┘ └─────────┘ │
│ │
└─────────────────────────────────────────────────┘

Powered by Supabase

INSTROC's backend is built on Supabase, an open-source Firebase alternative:

  • PostgreSQL - Full-featured relational database
  • Row Level Security - Fine-grained access control
  • Real-time - Live data subscriptions
  • Edge Functions - Serverless compute
  • Auth - Multiple sign-in providers

Accessing the Backend

From AI Chat

Ask the AI to work with backend features:

Add a contact form that saves submissions to the database
Create an API endpoint that returns all published blog posts
Add Google OAuth login to my app

From Code

Import and use backend services:

import { db, auth, storage } from '@/lib/backend';

// Database query
const posts = await db.from('posts').select('*');

// Get current user
const user = await auth.getUser();

// Upload file
const { url } = await storage.upload('images', file);

From Dashboard

Manage your backend in the project dashboard:

  • View and edit database tables
  • Manage users and authentication
  • Monitor storage usage
  • Test API endpoints

Backend Features by Plan

FeatureFreeProTeam
Database rows10,0001,000,000Unlimited
Storage500 MB10 GB100 GB
Auth users1,00050,000Unlimited
API requests50k/mo2M/moUnlimited

Security

Built-in Security

  • SSL encryption - All data encrypted in transit
  • Row Level Security - Database-level access control
  • JWT authentication - Secure session tokens
  • Rate limiting - Protection against abuse

Best Practices

  • Never expose secrets in frontend code
  • Use environment variables for API keys
  • Implement proper access control
  • Validate all user input

Getting Started

  1. Database - Create tables and relationships
  2. Authentication - Add user login
  3. Storage - Handle file uploads
  4. API Routes - Write custom backend logic

Common Use Cases

User-Generated Content

Store blog posts, comments, or reviews with user ownership.

E-commerce

Product catalogs, shopping carts, and order management.

SaaS Applications

User accounts, subscriptions, and team management.

Internal Tools

Dashboards, admin panels, and data management.