|
| 1 | +--- |
| 2 | +title: Create Frontend and Backend Sentry Projects |
| 3 | +sidebar_order: 2 |
| 4 | +description: "Learn how to create your Sentry projects, which will scope events to distinct pieces of your application landscape." |
| 5 | +--- |
| 6 | + |
| 7 | +In order to capture errors and other events, you need to have a project set up in Sentry. In this walkthrough we'll be creating a frontend project in React and a separate backend project in Express. |
| 8 | + |
| 9 | +Because you can create a Sentry Project for _each_ language or framework used in your application (for example, you might have separate projects for your API server and frontend client), a single application might have multiple projects associated with it. Once you've set up all the projects that correspond to different parts of your application in Sentry, you'll be able to scope events to a distinct application in your organization and assign responsibility to specific users and teams. For more information, see [best practices for creating projects](/organization/getting-started/#4-create-projects). |
| 10 | + |
| 11 | +## Create a Frontend Project |
| 12 | + |
| 13 | +Follow the steps below to create a new Sentry project for a sample React application: |
| 14 | + |
| 15 | +1. Log in to your [Sentry organization](https://sentry.io). |
| 16 | + |
| 17 | +1. Select **Projects** from the left side navigation menu. |
| 18 | + |
| 19 | +1. Click "Create Project" and configure it as appropriate for your application: |
| 20 | + |
| 21 | + - **Choose your platform**: Select the language or framework for your project based on the code you wish to monitor. In this case, choose **React**. |
| 22 | + |
| 23 | + - **Set your alert frequency**: For the purpose of this tutorial, select **Alert me on high priority issues**. |
| 24 | + |
| 25 | + > If you're wary of alert fatigue, learn more about how to set up your alerts in [Alerts Best Practices](/product/alerts/best-practices/). |
| 26 | +
|
| 27 | + - **Name your project and assign it a team**: Name your project in the **Project name** field and assign a team by selecting one in the **Team** dropdown (or click **+** to create a new team). |
| 28 | + |
| 29 | + - Click **Create Project**. This takes you to the quick Configure React SDK guide, which provides an overview of how to configure the SDK. This tutorial covers the SDK setup in more detail. |
| 30 | + |
| 31 | + - You'll notice that the Sentry React SDK setup code has come pre-populated with the project's unique DSN (Data Source Name). The DSN tells the SDK where to send events, so events are associated with the right project. You'll need to paste the DSN key into the SDK configuration code later in the tutorial. You can make a note of it now, or you can also find a project's DSN anytime in **[Project] > Settings > Client Keys (DSN)** |
| 32 | + |
| 33 | +1. Click **Take me to Issues** to go to your new project's **Issues** page. |
| 34 | + |
| 35 | +### UI Walkthrough |
| 36 | + |
| 37 | +The interactive demo below walks through how to create a new project in the UI. |
| 38 | + |
| 39 | +<div |
| 40 | + style={{ |
| 41 | + height: "0px", |
| 42 | + paddingBottom: "calc(56.88524590163935% + 41px)", |
| 43 | + position: "relative", |
| 44 | + width: "100%", |
| 45 | + }} |
| 46 | +> |
| 47 | + <iframe |
| 48 | + src="https://demo.arcade.software/4z9l5xNZfpXFGAFc03az?embed" |
| 49 | + frameborder="0" |
| 50 | + loading="lazy" |
| 51 | + webkitallowfullscreen |
| 52 | + mozallowfullscreen |
| 53 | + allowfullscreen |
| 54 | + allow="fullscreen;" |
| 55 | + style={{ |
| 56 | + colorScheme: "light", |
| 57 | + height: "100%", |
| 58 | + left: "0px", |
| 59 | + position: "absolute", |
| 60 | + top: "0px", |
| 61 | + width: "100%", |
| 62 | + }} |
| 63 | + title="FE Tutorial -> Create Project" |
| 64 | + ></iframe> |
| 65 | +</div> |
| 66 | + |
| 67 | +## Create a Backend Project |
| 68 | + |
| 69 | +Next, follow the steps below to create a new Sentry project for a sample Backend application: |
| 70 | + |
| 71 | +1. Log in to your [Sentry organization](https://sentry.io). |
| 72 | + |
| 73 | +1. Select **Projects** from the left side navigation menu to display the list of all your projects. |
| 74 | + |
| 75 | +1. Click "Create Project" and configure it as appropriate for your application: |
| 76 | + |
| 77 | + - **Choose your platform**: In this case, choose **Express**. |
| 78 | + |
| 79 | + - **Set your alert frequency**: Once again, select **Alert me on high priority issues**. |
| 80 | + |
| 81 | + - **Name your project and assign it a team**: Make sure to give it a different project name than your frontend application. |
| 82 | + |
| 83 | + - Click **Create Project**. This takes you to the quick Configure Express SDK guide, which provides an overview of how to configure the SDK. |
| 84 | + |
| 85 | +1. Copy the DSN key and keep it handy. |
| 86 | + |
| 87 | + > You can also find a project's DSN anytime in **[Project] > Settings > Client Keys (DSN)**. |
| 88 | +
|
| 89 | +1. Click **Take me to Issues** to go to your new project's **Issues** page. |
| 90 | + |
| 91 | +### UI Walkthrough |
| 92 | + |
| 93 | +<div |
| 94 | + style={{ |
| 95 | + height: "0px", |
| 96 | + paddingBottom: "calc(56.88524590163935% + 41px)", |
| 97 | + position: "relative", |
| 98 | + width: "100%", |
| 99 | + }} |
| 100 | +> |
| 101 | + <iframe |
| 102 | + src="https://demo.arcade.software/YXX8LAOHGSP4mWWBMMtM?embed" |
| 103 | + frameborder="0" |
| 104 | + loading="lazy" |
| 105 | + webkitallowfullscreen |
| 106 | + mozallowfullscreen |
| 107 | + allowfullscreen |
| 108 | + allow="fullscreen;" |
| 109 | + style={{ |
| 110 | + colorScheme: "light", |
| 111 | + height: "100%", |
| 112 | + left: "0px", |
| 113 | + position: "absolute", |
| 114 | + top: "0px", |
| 115 | + width: "100%", |
| 116 | + }} |
| 117 | + title="Tracing Tutorial -> Create Express Project" |
| 118 | + ></iframe> |
| 119 | +</div> |
| 120 | + |
| 121 | +## Next |
| 122 | + |
| 123 | +Now that you have your Sentry projects set up, you can [Add the Sentry SDK to Your Frontend Project](/product/sentry-basics/distributed-tracing/initialize-sentry-sdk-frontend/). |
0 commit comments