# Use and adapt roshn_reint_x

Use the documented interfaces and source layout for **roshn_reint_x**. The sections below retain the README’s examples and configuration details.

## Operational commands

```bash
bun run seed
bun run setup-storage
```

`setup-storage` idempotently creates or updates the canonical image, video, and file buckets. It requires `NEXT_PUBLIC_SUPABASE_URL` and `SUPABASE_SERVICE_ROLE_KEY`.

Deploy migrations through the guarded command:

```bash
bun run db:deploy
```

It refuses to run the baseline over an existing untracked schema. For a database that predates Prisma migration tracking, first back it up, apply `scripts/adopt-legacy-database.sql` with your PostgreSQL client, then record the one-time adoption:

```bash
bunx prisma migrate resolve --applied 20260809000000_baseline
bun run db:deploy
```

Fresh databases can run `bun run db:deploy` directly. Deployment automation must use this command instead of calling `prisma migrate deploy` directly.

## Development

```bash
bun install
bun run dev
```

Copy `.env.example` to `.env` and provide the required database, authentication, email, analytics, and storage credentials.

## Architecture

Domain terminology and module ownership live in [`CONTEXT.md`](https://github.com/Up-to-code/roshn_reint_x/blob/main/CONTEXT.md). Route handlers and server actions are adapters; business rules belong to the Property, Authorization, Site Content, Inquiry, Publishing, and Media Storage modules under `lib/`.

## Commands in the root manifest

The captured [package.json](https://github.com/Up-to-code/roshn_reint_x/blob/HEAD/package.json) declares the following scripts. Run them from the directory containing that manifest.

| Command | Script |
| --- | --- |
| `npm run dev` | `next dev` |
| `npm run build` | `prisma generate &&next build` |
| `npm run start` | `next start` |
| `npm run test` | `bun test scripts/tests` |
| `npm run typecheck` | `tsc --noEmit --pretty false` |
| `npm run lint` | `next lint` |

## Troubleshoot a local change

1. Reproduce the smallest example from the [quick-start guide](/docs/up-to-code-roshn_reint_x/quick-start-guide).
2. Compare required configuration and dependency versions with the README.
3. Check the linked issue tracker for the same error. Include the command, runtime version, and relevant error when reporting a problem; omit credentials.

## Source and help

- [GitHub repository](https://github.com/Up-to-code/roshn_reint_x)
- [Original README](https://github.com/Up-to-code/roshn_reint_x/blob/main/README.md)
- [Issues and existing reports](https://github.com/Up-to-code/roshn_reint_x/issues)
- [Open the project website](https://roshn-reint-x.vercel.app)
