[Packagist](http://packagist.org/) is the main composer repository. A composer repository is basically a package source. A place where you can get packages from. Packagist aims to be the central repository that everybody uses. This means that you can automatically `require` any package that is available there.
If you go to the [packagist website](http://packagist.org/) (packagist.org), you can browse and search for packages.
Any open source project using composer should publish their packages on packagist.
For libraries that follow the [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md) naming standard, composer generates
a `vendor/.composer/autoload.php` file for autoloading. You can simply include this file and you will get autoloading for free.
```php
require 'vendor/.composer/autoload.php';
```
This makes it really easy to use third party code, because you really just have to add one line to `composer.json` and run `install`. For monolog, it means that we can just start using classes from it, and they will be autoloaded.
You can even add your own code to the autoloader by adding an `autoload` key to `composer.json`.
```json
{
"autoload": {
"psr-0": {"Acme": "src/"}
}
}
```
This is a mapping from namespaces to directories. The `src` directory would be in your project root. An example filename would be `src/Acme/Foo.php` containing a `Acme\Foo` class.
After adding the `autoload` key, you have to re-run `install` to re-generate the `vendor/.composer/autoload.php` file.
Including that file will also return the autoloader instance, so you can add retrieve it and add more namespaces. This can be useful for autoloading classes in a test suite, for example.
**Note:** Composer provides its own autoloader. If you don't want to use that one, you can just include `vendor/.composer/autoload_namespaces.php`, which returns an associative array mapping namespaces to directories.