# 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](https://rezincore.com/docs/getting-started/concepts.md#organizations));
- 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 **Connect → Keys and address** 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 **Connect → Keys and address**. 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 **Keys and address** page: make another key of either kind, and revoke one. A revoked key stops working at once.

## The pages of a project

| Section | Pages | What they are for |
|---|---|---|
| Overview | Overview | Last database change, last backup, the security advisor and the last day's requests |
| Data | Tables, SQL workspace, Diagram, Database functions, Triggers, Value lists, Indexes, Extensions, Publishing, Backups, Change history, Database settings | The tables and rows, running SQL, and how the database is built and kept safe |
| Security | Access rules, Database roles | Row-level security, the rules for each table, "View as", and what each database role may do |
| Sign-in | Accounts, Organizations, Signed in now, Sign-in methods, Site addresses, Sessions and limits, Email templates, Sending email | The people who use your application and how they sign in |
| Files | Files | Buckets and the files in them |
| Functions | Functions | Your own server-side code: edit, deploy, settings, logs |
| Connect | Keys and address, API reference, Secrets, Webhooks | How your application reaches the project, sealed values, and messages sent when a row changes |
| Activity | Record, Usage | API requests and the audit record; sizes and counts over 30 days |
| Project | Project settings | Name, address, 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](https://rezincore.com/docs/getting-started/quickstart.md).
