# Integrate Playstack

Add shared application capabilities to a Megamono workspace.


Playstack provides application capabilities such as rate limiting, storage, and authentication. Megamono helps connect supported integrations to the right applications in your workspace. Playstack is optional: you can use Megamono with your existing libraries.

## Choose one capability

Check the [integration toolchain requirements](/docs/workflows/requirements#playstack-integrations) before adding a capability.

Start with a specific need in one application. Check that the selected Playstack package supports your framework and provider, and install it using the package source available to you.

For example, preview rate-limit integration in an API:

```sh
megamono add integration --packages=@playstack/rate-limit --api=apps/api --dry-run
```

Replace `apps/api` with your actual application root. An explicit path matters when the workspace contains both a public site and a product dashboard.

## Review the generated plan

The plan shows proposed files, existing code that may overlap, and configuration you need to supply. Choose the adapter, persistence implementation, and test target that fit your application. See the [integration options](/docs/generators/playstack-integrate) for the available settings.

After resolving the choices, rerun the preview. Apply only when you understand how the new code connects to your application.

## Test before switching behavior

Connect credentials through your environment configuration, fill in application-specific persistence and authorization, and run integration tests. For mail, queues, payments, and other external effects, use isolated test services so a comparison does not send real messages or create duplicate work.

If you are replacing an existing implementation, compare behavior first and switch one path at a time. Keep a rollback plan until the new path is verified.
