# The 12-Factor App

The 12-Factor App is a set of 12 rules that is considered good practice for anyone making an application or service. This applies to Discord bots as well!

Here are the 12 factors. These are straight from the website. **It's okay if you don't understand them. These rules are followed by large corporate companies and startups. In the future, you can come back to this page or** [**https://12factor.net/**](https://12factor.net/) **for reference.**

### [I. Codebase](https://12factor.net/codebase) <a href="#i_codebase" id="i_codebase"></a>

One codebase tracked in revision control, many deploys

### [II. Dependencies](https://12factor.net/dependencies) <a href="#ii_dependencies" id="ii_dependencies"></a>

Explicitly declare and isolate dependencies

### [III. Config](https://12factor.net/config) <a href="#iii_config" id="iii_config"></a>

Store config in the environment

* Don't commit your bot's token!

### [IV. Backing services](https://12factor.net/backing-services) <a href="#iv_backing_services" id="iv_backing_services"></a>

Treat backing services as attached resources

### [V. Build, release, run](https://12factor.net/build-release-run) <a href="#v_build_release_run" id="v_build_release_run"></a>

Strictly separate build and run stages

### [VI. Processes](https://12factor.net/processes) <a href="#vi_processes" id="vi_processes"></a>

Execute the app as one or more stateless processes

### [VII. Port binding](https://12factor.net/port-binding) <a href="#vii_port_binding" id="vii_port_binding"></a>

Export services via port binding

### [VIII. Concurrency](https://12factor.net/concurrency) <a href="#viii_concurrency" id="viii_concurrency"></a>

Scale out via the process model

### [IX. Disposability](https://12factor.net/disposability) <a href="#ix_disposability" id="ix_disposability"></a>

Maximize robustness with fast startup and graceful shutdown

### [X. Dev/prod parity](https://12factor.net/dev-prod-parity) <a href="#x_devprod_parity" id="x_devprod_parity"></a>

Keep development, staging, and production as similar as possible

### [XI. Logs](https://12factor.net/logs) <a href="#xi_logs" id="xi_logs"></a>

Treat logs as event streams

### [XII. Admin processes](https://12factor.net/admin-processes) <a href="#xii_admin_processes" id="xii_admin_processes"></a>

Run admin/management tasks as one-off processes


---

# 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://vinniehat-1.gitbook.io/guide-to-making-your-own-discord-bot/advanced/the-12-factor-app.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.
