docs(contributing): align development guide with dotenvx workflow (#3286)

* docs(contributing): align development guide with dotenvx workflow

- Problem: development.mdx told contributors to use a root `.env` file and
  export DATABASE_URL manually, while AGENTS.md and compose.dev.yml use
  `.env.local` loaded through dotenvx for dev and migration commands.
- Fix: update the setup, migration, dev-server, and database sections to
  match the dotenvx commands documented in AGENTS.md.
- Verification: preflight_ship.py (upstream bug marker present); duplicate
  PR check clean; docs-only change.

* docs(contributing): add cp command to env setup step

- Problem: setup step said to copy .env.example but the bash block only listed variable assignments.
- Fix: add explicit cp .env.example .env.local command and label the following block as edits.
- Verification: manual review of development.mdx; addresses CodeRabbit review on #3286.

* docs(contributing): align AGENTS.md env copy target with dotenvx

- Problem: AGENTS.md told contributors to copy .env.example to .env while all dev commands use .env.local.
- Fix: update the copy instruction to .env.local for consistency with the dotenvx workflow.
- Verification: manual review; folded into #3286 dotenvx alignment PR.

* docs(contributing): dotenvx-wrap remaining dev script references

- Problem: scripts table and troubleshooting still showed bare pnpm dev/db commands after the dotenvx workflow update.
- Fix: prefix dev, db, and port-override examples with dotenvx run -f .env.local --.
- Verification: manual review of development.mdx; folded into #3286.

---------

Co-authored-by: Amruth Pillai <im.amruth@gmail.com>
This commit is contained in:
Santhi Prakash
2026-08-13 22:50:48 +02:00
committed by GitHub
co-authored by Amruth Pillai
parent 28d698635f
commit dd9843172b
2 changed files with 21 additions and 15 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ The production server runs migrations during startup before serving traffic. Man
### Environment ### Environment
Copy `.env.example` to `.env`. The three required variables are: Copy `.env.example` to `.env.local`. The three required variables are:
- `APP_URL` (default `http://localhost:3000`) - `APP_URL` (default `http://localhost:3000`)
- `DATABASE_URL` (default `postgresql://postgres:postgres@localhost:5432/postgres`) - `DATABASE_URL` (default `postgresql://postgres:postgres@localhost:5432/postgres`)
+19 -13
View File
@@ -57,7 +57,13 @@ This guide walks you through setting up Reactive Resume for local development. W
</Step> </Step>
<Step title="Configure Environment Variables"> <Step title="Configure Environment Variables">
Create a `.env` file in the project root: Copy `.env.example` to `.env.local` in the project root:
```bash
cp .env.example .env.local
```
Then edit `.env.local` as needed — for local development on the host, set at minimum:
```bash ```bash
# Application # Application
@@ -96,16 +102,16 @@ This guide walks you through setting up Reactive Resume for local development. W
<Step title="Run Database Migrations If Needed"> <Step title="Run Database Migrations If Needed">
The server startup path runs migrations before serving traffic. To apply migrations manually without starting the app, The server startup path runs migrations before serving traffic. To apply migrations manually without starting the app,
export `DATABASE_URL` because Drizzle Kit reads directly from `process.env`: load `.env.local` with `dotenvx` because Drizzle Kit reads directly from `process.env`:
```bash ```bash
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/postgres" pnpm run db:migrate dotenvx run -f .env.local -- pnpm run db:migrate
``` ```
</Step> </Step>
<Step title="Start the Development Server"> <Step title="Start the Development Server">
```bash ```bash
pnpm run dev dotenvx run -f .env.local -- pnpm run dev
``` ```
Your local Reactive Resume instance will be available at [http://localhost:3000](http://localhost:3000). Your local Reactive Resume instance will be available at [http://localhost:3000](http://localhost:3000).
@@ -122,7 +128,7 @@ Here are the most commonly used scripts during development:
| Command | Description | | Command | Description |
| ------------------------------ | ----------------------------------------------------------- | | ------------------------------ | ----------------------------------------------------------- |
| `pnpm dev` | Start the web and server development processes | | `dotenvx run -f .env.local -- pnpm dev` | Start the web and server development processes |
| `pnpm build` | Build the production web bundle and server bundle | | `pnpm build` | Build the production web bundle and server bundle |
| `pnpm start` | Start the built production server | | `pnpm start` | Start the built production server |
| `pnpm typecheck` | Run TypeScript type checking | | `pnpm typecheck` | Run TypeScript type checking |
@@ -135,9 +141,9 @@ Here are the most commonly used scripts during development:
| Command | Description | | Command | Description |
| ---------------------- | -------------------------------------------- | | ---------------------- | -------------------------------------------- |
| `pnpm run db:generate` | Generate migration files from schema changes | | `dotenvx run -f .env.local -- pnpm run db:generate` | Generate migration files from schema changes |
| `pnpm run db:migrate` | Apply pending migrations | | `dotenvx run -f .env.local -- pnpm run db:migrate` | Apply pending migrations |
| `pnpm run db:studio` | Open Drizzle Studio (database GUI) | | `dotenvx run -f .env.local -- pnpm run db:studio` | Open Drizzle Studio (database GUI) |
### Internationalization ### Internationalization
@@ -180,7 +186,7 @@ reactive-resume/
Use Drizzle Studio to explore and manage your database: Use Drizzle Studio to explore and manage your database:
```bash ```bash
pnpm run db:studio dotenvx run -f .env.local -- pnpm run db:studio
``` ```
This opens a web-based GUI at [https://local.drizzle.studio](https://local.drizzle.studio). This opens a web-based GUI at [https://local.drizzle.studio](https://local.drizzle.studio).
@@ -190,11 +196,11 @@ This opens a web-based GUI at [https://local.drizzle.studio](https://local.drizz
1. Edit the schema in `packages/db/src/schema/*` 1. Edit the schema in `packages/db/src/schema/*`
2. Generate a migration: 2. Generate a migration:
```bash ```bash
pnpm run db:generate dotenvx run -f .env.local -- pnpm run db:generate
``` ```
3. Apply the migration: 3. Apply the migration:
```bash ```bash
pnpm run db:migrate dotenvx run -f .env.local -- pnpm run db:migrate
``` ```
<Warning>Always review generated migrations before applying them, especially when working with existing data.</Warning> <Warning>Always review generated migrations before applying them, especially when working with existing data.</Warning>
@@ -268,7 +274,7 @@ pnpm run typecheck
The Vite web server uses `PORT` (default `3000`), and the Hono server uses `SERVER_PORT` (default `3001`). The Vite web server uses `PORT` (default `3000`), and the Hono server uses `SERVER_PORT` (default `3001`).
Either stop the conflicting process or choose alternate ports: Either stop the conflicting process or choose alternate ports:
```bash ```bash
PORT=3002 SERVER_PORT=3003 pnpm dev PORT=3002 SERVER_PORT=3003 dotenvx run -f .env.local -- pnpm dev
``` ```
</Accordion> </Accordion>
@@ -296,7 +302,7 @@ pnpm run typecheck
<Accordion title="Type errors after pulling changes"> <Accordion title="Type errors after pulling changes">
The route tree may need regeneration. Run the dev server which auto-generates routes: The route tree may need regeneration. Run the dev server which auto-generates routes:
```bash ```bash
pnpm run dev dotenvx run -f .env.local -- pnpm run dev
``` ```
Or run type checking to see specific errors: Or run type checking to see specific errors:
```bash ```bash