# Projects

## Overview

A project in Tailglow represents a container for your sources, metrics, and pages. Projects are used to organize data for specific purposes, such as a product, application, or environment. Each project has its own settings, while a member's team role scopes govern access across the team's projects.

## Creating a Project

To create a new project:

1. Navigate to your **Team Overview** by selecting your team name in the top toolbar.
2. Click the **"Add New"** button in the top-right corner.
3. Enter the project name and click "Create Project".
4. Once created, the project will appear in your **Team Overview**.

## Project Settings

To access a project's settings:

1. Select a project from the sidebar.
2. Navigate to the **Settings** tab.

### General Settings

In the general settings, you can:

- Rename your project.
- Update the project start date, which Tailglow uses as the starting point for displayed charts.
- Set the late data window, which controls how far back an event with an overridden timestamp can
  reach and still enter charts automatically. See
  [Late data](/guides/metrics#late-data).
- Delete the project.
  **Note**: Deleting a project schedules it for permanent removal seven days later. You can
  restore the project from the settings page any time before that date. Ingest keeps running for the
  whole window, so a restored project carries on with nothing missing.

### Sources

Sources own ingest configuration and ingest keys. Collections under a source own the records, files, and schemas. You can manage sources and their ingest keys from **Settings** > **Sources** in your project.

### Views

In this section, you can:

- Create, edit, and delete views that use TGL to transform collection or view inputs and join data when configured.

## Sending Data to a Project

Each ingest key authenticates a source. Tailglow routes an accepted request to a collection under that source using the request's collection selection or the source's default routing. To send data:

- Send data to your project's ingest endpoint (found in your source settings), e.g. `https://us11.ingest.tailglow.io/prj_xxx`.
- Include a source's ingest key in the `key` query parameter, or use the `Authorization` header.

Refer to the [Ingest Key](/guides/ingest-key) documentation for detailed steps on sending data.

## Deleting a Project

If a project is no longer needed and its data is no longer relevant, you can delete it. Deleting a project will:

- Schedule permanent removal of all data, settings, and configurations for seven days later.
- Allow you to restore the project any time before that removal date.
- Offer a **Delete Permanently** option in project settings, if you would rather not wait out the
  window. That one cannot be undone.
- Keep accepting data until the removal date, so restoring the project loses nothing.

To schedule a project for deletion:

1. Open the project's **Settings** tab and select **General**.
2. In the **Delete Project** card, press and hold **Hold to Schedule Deletion** until it completes.

The project settings page then shows a red banner counting down to the removal date. Click
**Restore Project** there at any point before it to cancel.

To remove the project immediately instead:

1. Click **Delete Permanently** in that banner.
2. Type the project name, then type **Delete permanently**.
3. Click **Delete permanently**. This cannot be undone.

## Best Practices

- **Use separate projects for different environments**: For example, create distinct projects for production, staging, and development environments.
- **Organize projects by product or feature**: If you have multiple products, consider creating one project per product for better data separation and management.
- **Monitor project activity**: Regularly check activity logs and metrics to ensure the project is running as expected.
