> For the complete documentation index, see [llms.txt](https://i-am-human.gitbook.io/i-am-human-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://i-am-human.gitbook.io/i-am-human-docs/technical-specs/database-specs.md).

# Database Specs

Technical documentation on how I-AM-HUMAN SUPABASE DATABASE works

We use PostgresSQL for storing all the user data for our app. Right now we have 3 tables in our app and their purpose and functionalities are specified below&#x20;

### DATABASE SCHEMA

#### USERS TABLE

This table stores all the information relating to a user . The DB has the following schema and each column has a specified meaning relating to it as defined below

<table><thead><tr><th width="296.5">Column</th><th>Column Meaning</th></tr></thead><tbody><tr><td><code>id</code></td><td>Unique ID assigned to each user on creation</td></tr><tr><td><code>wallet-identifier</code></td><td>Near Wallet address of the user</td></tr><tr><td><code>created_at</code></td><td>Date on which user got created</td></tr><tr><td><code>fv_token_id</code></td><td>Token ID of Face Verification token issued to user</td></tr><tr><td><code>fv_issued_date</code></td><td>Issued data of Face Verification token</td></tr><tr><td><code>fv_expire_date</code></td><td>Expiry date of Face Verification token</td></tr><tr><td><code>fv_status</code></td><td><p>Status of user's requested Face Verification Token. It's value can be:</p><pre><code>User begins Face Verification, Fractal Approved, Fractal Pending Authorization, Minting txn send
</code></pre></td></tr><tr><td><code>og_tokens_metadata</code></td><td>An object containing all the information about all types of OG Tokens issued to user including the class, token_id, issued_date, expire_date</td></tr></tbody></table>

#### EVENTS TABLE

Logs all user actions that a user takes inside the app. It helps us to track errors. The DB has the following schema and each column has a specified meaning relating to it as defined below

<table><thead><tr><th width="239.5">Column</th><th>Column Meaning</th></tr></thead><tbody><tr><td><code>id</code></td><td>Unique ID assigned to each event on creation</td></tr><tr><td><code>created_at</code></td><td>Date on which action got recorded</td></tr><tr><td><code>wallet-identifier</code></td><td>Near Wallet address of the user who's action was logged</td></tr><tr><td><code>event_log</code></td><td>Action the user took</td></tr></tbody></table>

#### &#x20;SUPER\_ADMINS TABLE

Has a list of all the superadmins that PII (Personally Identifiable Information) is visible to. The DB has the following schema and each column has a specified meaning relating to it as defined below

<table><thead><tr><th width="453.5">Column</th><th>Column Meaning</th></tr></thead><tbody><tr><td><code>id</code></td><td>Unique ID assigned to each admin on creation</td></tr><tr><td><code>created_at</code></td><td>Date on which super-admin got recorded</td></tr><tr><td><code>wallet-address</code></td><td>Near Wallet address of the superadmin</td></tr></tbody></table>
