# Work with your codebase

> Explore, debug, refactor, and document an existing project.

Canonical URL: https://appjet.ai/docs/essentials/codebase

AppJet has extended coding and analysis capabilities.

## Code understanding

After you open an existing repository ask AppJet to analyze your code:

`Analyze my code and give me an overview`

Dive into specific functions:

`explain how the app connects with Postgres`

or

`how do my app export data to S3?`

`how are users authenticated`

`what are the key data models`

## Search your code

If you need to locate specific functionalities or feature:

`what file set the functions of the API?`

or

`find the files that upload data to S3`

> Make your query as specific as possible. The more detailed your question the more quick and accurate the answer will be.

## Fix bugs

AppJet is particularly efficient at tracking bugs and fixing bugs over several files. You can save hours of debugging with a single prompt:

`I get a 404 error when I try to upload a file`

`Fix the background effect error`

`Add console logs when a new user register`

## Refactor your code

You may need to update an existing codebase to latest versions or patterns:

`find deprecated APIs and fix them  `

`refactor utils.js to the latest javascript practices`

`update index.php to use PHP8`

`upgrade my code to connect to MySQL using latest connection library`

## Comment functions and create documentation

AppJet can write a complete documentation about your code, even if it didn’t help you create it:

`Create a documentation for this project`

`Check if the documentation includes all the project functions`

`Find functions without proper comments in index.js and add them`

`Analyze index.php and comment the code according to functions`

## Compare branches

AppJet can help spot the differences between branches of your code:

`tell me the difference between branches master and test2`

`What are the differences on index.php across my branches`

> Check the selected branch before making changes. AppJet normally works on the `appjet` branch; review and merge changes into your default branch when ready.
