---
url: /howto/creating-a-project.md
description: >-
  This guide teaches you how to create a new project following best practices in
  Teamscale.
---

# How to Create a Project

\[\[toc]]

## Summary

To run Teamscale on your code, two steps are required: First, you have to create an **analysis profile** which configures the analyses
that should be run and all their options.  Second, you need a **project configuration** which configures the scope of the analyzed code.
Both steps can be done in the *Projects* perspective.

## Best Practices for Your Own Teamscale Project

Before you jump into configuring your first Teamscale project, here
are some best practices for first-time users:

### Start with the Default Analysis Profile&#x20;

Configuring an analysis profile in all its details can be a daunting
task. Teamscale offers hundreds of checks and options that let you
customize it fully to your needs. However, when you're setting up your
very first project, it makes more sense to start with some sane defaults
and then later refine the settings step-by-step. To this end,
Teamscale provides a default analysis profile for each supported
language.

:::tip Build on defaults
We recommend you start with the default analysis profile for your
language and later, step-by-step, refine it to your needs.
:::

### Limit the Amount of History you Analyze&#x20;

Teamscale’s [incremental analysis engine](../../introduction/why-teamscale/#why-teamscale-is-different) allows it to give you instant feedback on each of your commits. Analyzing the
changes in a single commit usually only takes a few seconds. If your project has a long history, analyzing that entire history will, of course, take some time. The longer the history, the longer it takes. When
you’re setting up your first Teamscale project, you will usually want
to make several smaller changes in short order, e.g., to the analysis
profile or the included/excluded files.

Thus, it makes sense to start with a very short history (e.g the last
few days) while you’re still working on fine-tuning the configuration.
Once you’re satisfied with the results, reanalyze the project with a
longer history.

To limit the amount of history that Teamscale will analyze, change the `Start revision` parameter of your repository connector.

### Exclude Generated/Third-Party Code&#x20;

Many software projects make use of code generators, e.g., to generate UI components or data classes. Generated code is often repetitive
and usually doesn't conform to your company’s coding guidelines.
Furthermore, you should never make changes to the generated code
directly. Thus, for most analyses, it makes no sense to check your
generated code with Teamscale.
We recommend that you use the include and exclude patterns of the
connector configuration to exclude all generated code from the analysis.

:::tip Excluding code from analysis
To exclude code, add a pattern to the `Excluded file names`  parameter of your repository connector.
:::

:::tip Analyzing generated code on purpose
If you really want to run certain checks on your generated code (e.g., security analyses), we recommend you create a separate Teamscale project for it plus a special analysis profile with only those checks enabled.
:::

## Creating an Analysis Profile

A detail guide on how to create or edit an analysis [can be found here](../creating-an-analysis-profile/).

## Creating the Project

:::tip SAP Integration
If you are working with SAP, refer to our guide on [how Teamscale integrates with SAP](../sap-integration/).
:::

On the *Project Configuration* perspective, you can see a list of all projects
configured in Teamscale.

To create a new project, select `New project` button at the top. You will be taken to the
project creation screen:

![Project Creation Screen](./projects-create.png)

Here, you can enter the name of your project in the *General* section and select the
[analysis profile](../../reference/ui/project/analysis-profiles/) for the default code scope in the *Code Scope Configuration* section.

Next, you can add any number of source code repositories and issue trackers.
To do so, use the `+` button of the *Connector Configuration* section and pick the connector category and then the concrete repository or issue tracker type.

[Check our list of supported version control systems](../../reference/supported-technologies/version-control-systems/) to find out how to configure the connection for your project.

A new section will appear where you can configure
all options needed to connect to the repository or issue tracker,
e.g., credentials, starting revision, files to exclude, etc.:

![Project Connector Settings](./projects-connector.png)

The options are explained in [more detail here](../../reference/connector-options/#common-and-git-specific-connector-options).

Most connectors require you to specify an account that holds shared
credentials (user name, password). While any user with sufficient rights
to create new projects may also create new accounts, only the system
administrator may edit or delete existing external accounts in the *Admin* perspective.

You may use `Validate` on a single connector, or `Validate all connectors`, to make sure your settings are correct before clicking
`Create project` to start the analysis. To
monitor analysis progress you can have a look at the *System* or *[Activity](../../reference/ui/activity/commits/)* perspective.
