Getting started
Your first project
A project is one application's backend: its own section of the database, its own users, files, keys, secrets and logs. Projects live in a workspace.
Create it
On the company's Projects page choose New project and give it a name. Only an owner of the workspace can create a project. In one step the console makes:
- the project's own section of the database, which nothing outside the project can reach;
- the database role your application runs as, and a separate confined role for the SQL workspace and the tools;
- one organization (see Concepts);
- a publishable key and a secret key.
Important. The two keys are shown once, on the screen right after the project is made. Copy them then. If you lose one, make a new key under API & keys and revoke the old one.
A workspace can hold 5 live projects.
The project ID
Every project has an ID of twenty lowercase letters, for example abcdefghijklmnopqrst. It is shown under the project's name in the side bar and on API & keys. You use it:
- in the address of a public or signed file;
- when you start a Google or GitHub sign-in (
?project=<project ID>); - with the command-line tool and the connector (
rezin use <project ID>).
It is not a secret.
The keys
Every request to the API carries a project key in the apikey header.
| Key | Starts with | Where it may live | What it can do |
|---|---|---|---|
| Publishable | rzc_pub_ | Inside an app or a web page | Sign accounts up and in. After sign-in, whatever that account's organization and your policies allow. Nothing else. |
| Secret | rzc_sec_ | Only on your own servers | The same, and it can also act for an organization with no account signed in, by naming it in the x-organization-id header. |
Neither key reaches another project. Neither key skips row-level security. Never put a secret key in a browser page, a mobile app or a repository.
Manage keys on the project's API & keys page: make another key of either kind, and revoke one. A revoked key stops working at once.
The pages of a project
| Page | What it is for |
|---|---|
| Home | Last database change, last backup, and the security advisor |
| Data → Tables page | Tables, columns, links, indexes, rows, and the realtime switch |
| SQL | Run SQL inside the project |
| Database | The schema, installed extensions, applied migrations, backups |
| Security | Row-level security, policies, what the application may do, "View as" |
| Authentication | Users, organizations, sign-in methods, URL configuration, sessions |
| Storage | Buckets and files |
| Functions | Your own server-side code: edit, deploy, settings, logs |
| Webhooks | Messages sent when a row changes |
| API & keys | The project's address, ID, keys and ready-made examples |
| Secrets | Sealed values |
| Emails | Templates, previews, branding |
| Logs | API requests and the audit record |
| Usage | Sizes and counts over 30 days |
| Settings | Name, staff access, deleting the project |
The API reference page inside a project is written from that project's own tables, with its real table and column names. These docs describe the general rules.
Rename and delete
Rename a project under Project. Deleting one is for owners only and needs the project's name typed in.
- The project disappears and its keys stop working at once.
- Nothing is erased for 7 days. Until then an owner can bring it back, keys and data included, from Deleted projects on the company's Projects page.
- After 7 days its database section, files, keys and secrets are erased for good. The audit trail stays.
Next
Follow the Quickstart.