# Project

A project is the result of combining one base (or in rare cases several bases) with multiple components and libraries.

<div align="left"><img src="https://3095132514-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAhrWK1psIWk5h5zNLV%2F-MLvr0aBnP0LO8jSq-lj%2F-MM-RiGnhRbPwxftgFvn%2Fproject.png?alt=media&#x26;token=74c5a034-92ed-49b8-81ec-7a1e26f7e60d" alt="This project has one library (grey), two components (green) and one base (blue)."></div>

The artifacts that are built based on the projects are the end goal of the Polylith architecture, which we deploy in our test, staging and production environments.

Each project lives in a separate directory under the `projects` directory, where it has a configuration file:

```
▾ workspace
  ▾ projects
    ▾ myproject
        deps.edn
```

The configuration file lists all included bricks and project level libraries (brick level libraries are implicitly included):

```
{:deps {poly/change        {:local/root "../../components/change"}
        poly/creator       {:local/root "../../components/creator"}
        poly/file          {:local/root "../../components/file"}
        poly/git           {:local/root "../../components/git"}
        poly/help          {:local/root "../../components/help"}
        poly/lib           {:local/root "../../components/lib"}
        poly/migrator      {:local/root "../../components/migrator"}
        poly/shell         {:local/root "../../components/shell"}
        poly/util          {:local/root "../../components/util"}
        poly/validator     {:local/root "../../components/validator"}
        poly/version       {:local/root "../../components/version"}
        poly/ws-file       {:local/root "../../components/ws-file"}
        poly/poly-cli      {:local/root "../../bases/poly-cli"}

        org.clojure/clojure {:mvn/version "1.10.3"}
        org.slf4j/slf4j-nop {:mvn/version "1.7.32"}}}        
```

Example projects can be found in the [RealWorld example app](https://github.com/furkan3ayraktar/clojure-polylith-realworld-example-app), the [User Manager example app](https://github.com/seancorfield/usermanager-example/tree/polylith), and in the [Polylith Tool](https://cljdoc.org/d/polylith/clj-poly/CURRENT/doc/readme).

Some languages, like Clojure, support having more than one `src` directory out of the box, or support including "projects" as in the example above, while other languages may need a plugin, like the [build-helper-maven-plugin](https://www.mojohaus.org/build-helper-maven-plugin/usage.html).

It's almost like magic, because all we have to do is to list all our building blocks used in e.g. a service, and everything will automatically "connect" without the need of dependency injection, annotations or any other "magic"! [Here](https://github.com/seancorfield/usermanager-example/blob/polylith/projects/usermanager/deps.edn) is how that looks like in the User Manager example app.

This is also why the Polylith architecture can be used without tooling support and still give us most of its benefits.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://polylith.gitbook.io/polylith/architecture/2.6.-project.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
