> ## Documentation Index
> Fetch the complete documentation index at: https://docs.micleo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Database

> Postgres database from Supabase

## Database setup

### Secrets

Update all the secrets in the file init.sql.

* **JWT\_SECRET**: provided by Supabase in the Database API section.
* **ENDPOINT\_URL**: you can choose to put the Hookdeck URL or the API Endpoint of the Edge Functions
* **SERVER\_DEV**: Choose the ENV name: dev, staging, prod.

### Installation

<Note>**Go to the Supabase SQL Editor, and execute the SQL files templates.**<br />
**(micleo-functions/supabase/migrations)**
Follow the order of the SQL files: **init -> crons**</Note>

<Note>
  Set variables:

  * **VUE\_APP\_SUPABASE\_ANON\_KEY**
  * **VUE\_APP\_SUPABASE\_URL**
  * **JWT\_SECRET**
</Note>

### Tables

<AccordionGroup>
  <Accordion title="Organizations (organization_id)">
    * Members
    * Roles & permissions
    * Subscriptions
    * Integrations
    * Invoices
  </Accordion>

  <Accordion title="Projects (project_id)">
    * Objects
    * Models
    * Properties
    * Listings
    * Folders
    * Campaigns
    * Templates
    * Activities
    * Files
    * Logs
    * Tasks
    * Forms
    * Workflows
  </Accordion>

  <Accordion title="Others">
    * Admins
    * Organizations
    * Projects
    * Chats
    * Stripe tables:
      * Products
      * Prices
  </Accordion>
</AccordionGroup>
