> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nex-t1.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Started

> Install, configure, and run Nex‑T1 locally or with Docker. Authentication and session flow for users.

# Get Started

<Steps>
  <Step title="Prerequisites">
    * Python 3.13+
    * PostgreSQL (local or managed)
    * Docker & Docker Compose (optional)
  </Step>

  <Step title="Install dependencies">
    <CodeGroup>
      ```bash uv theme={null}
      uv sync
      ```
    </CodeGroup>
  </Step>

  <Step title="Configure environment">
    Copy and edit an env file (see `.env.development`, `.env.staging`, `.env.production`).
    Critical keys: `LLM_API_KEY`, `JWT_SECRET_KEY`, `POSTGRES_*`, optional MCP bases.
  </Step>

  <Step title="Run the API">
    <CodeGroup>
      ```bash Local theme={null}
      make dev
      # or: uvicorn app.main:app --host 0.0.0.0 --port 8000
      ```

      ```bash Docker theme={null}
      make docker-build-env ENV=development
      make docker-run-env   ENV=development
      ```
    </CodeGroup>

    Swagger UI: `http://localhost:8000/docs`  |  Metrics: `/metrics`
  </Step>
</Steps>

## Authentication & Sessions

<CodeGroup>
  ```bash Register theme={null}
  curl -X POST http://localhost:8000/api/v1/auth/register \
    -H 'Content-Type: application/json' \
    -d '{"email":"you@example.com","password":"StrongP@ssw0rd"}'
  ```

  ```bash Login theme={null}
  curl -X POST http://localhost:8000/api/v1/auth/login \
    -F username=you@example.com -F password=StrongP@ssw0rd
  ```

  ```bash Create Session theme={null}
  curl -X POST http://localhost:8000/api/v1/auth/session \
    -H 'Authorization: Bearer <user_access_token>'
  ```
</CodeGroup>

## Rate Limiting & CORS

* Rate limiting via SlowAPI; defaults configurable in `app/core/config.py` (e.g., `RATE_LIMIT_ENDPOINTS`).
* CORS configured in `app/main.py` from `ALLOWED_ORIGINS` env var.
