> ## Documentation Index
> Fetch the complete documentation index at: https://docs.draftt.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Code Components

> Understand how Draftt maps the libraries your projects depend on and flags dependencies that are outdated, deprecated, or unmaintained.

Draftt scans your code repositories and maps the libraries each project depends on. Every dependency is analyzed for lifecycle risk, so you can find libraries that are outdated, deprecated, or no longer maintained, and plan upgrades before they become urgent. Code Components sit alongside the rest of your infrastructure in Draftt, giving your organization one place to govern code and infrastructure together.

![Code Inventory showing the status breakdown, the due date timeline, and a table of dependencies with their status, required version, and due date.](https://mintcdn.com/draftt/99QefcB1G-JKlbJh/images/code-components-inventory.png?fit=max\&auto=format\&n=99QefcB1G-JKlbJh\&q=85\&s=a6c2b930d2a0479b03e30b45e67b2dd2)

## How It Works

Draftt follows the same loop for every connected repository:

1. **Connect**: Install the Draftt.io GitHub App on your organization and choose which repositories Draftt can read. See [GitHub](https://docs.draftt.io/github.md). This is a separate app from the Draftt CI GitHub App, which scans Terraform plans on pull requests. Draftt also scans Azure DevOps repositories through the same Azure DevOps integration you use for ticketing.
2. **Discover**: Draftt reads build files and lockfiles at the head of each repository's configured branch, mapping every project to the libraries it depends on. To scan a different branch, contact Draftt.
3. **Analyze**: Draftt checks each dependency version for end of life, deprecation, and maintenance activity, and identifies the version required to stay supported.
4. **Surface**: Results appear in the **Code** area of Draftt, with a status, required version, and due date for each dependency.

Draftt rescans connected repositories on every scan cycle, so the inventory reflects the latest state of your code.

## Dependency Statuses

Draftt assigns each dependency a status based on its current version:

| Status | Meaning |
| - | - |
| Compliant | The current version is supported and meets the required version. |
| Outdated | The current version has reached end of support. Upgrade to the required version. |
| Deprecated | The package is deprecated by its maintainers or archived on GitHub. Replace it with a suggested alternative where one is available. |

## Suggested Alternatives

When a dependency is deprecated or no longer maintained, upgrading to a newer version isn't enough. Draftt suggests a replacement library when one exists, so your team can plan a migration instead of searching for an alternative.

## Code Inventory

The Code Inventory shows every dependency Draftt has discovered across your connected repositories, together with its status, required version, and due date. The **Status Breakdown** at the top shows how many dependencies fall under each status, so you can gauge the overall health of your code dependencies at a glance.

## Common Use Cases

* **Get visibility into what your code depends on**: See every library and version used across your projects and repositories in one place.
* **Prioritize upgrade work**: Focus on outdated and deprecated dependencies first, and use due dates to sequence the rest.
* **Plan ahead**: See which dependencies reach end of support in the coming months, and schedule upgrades before they become urgent.
* **Plan migration of unmaintained libraries**: Identify deprecated and archived packages and move to a suggested alternative.
* **Manage code and infrastructure debt in one place**: Track code dependencies next to your cloud, Kubernetes, and data platform resources, with the same statuses and due dates.

## Next Steps

Connect [GitHub](https://docs.draftt.io/github.md) or Azure DevOps to start scanning your repositories.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.