@@ -200,34 +200,38 @@ For every significant architectural change:
200200
201201#### Build vs Dev Server Conflicts
202202- ** Use ` pnpm build:test ` for AI testing** : When AI agents need to test builds, always use ` pnpm build:test ` instead of ` pnpm build `
203- - ** Why this matters** : ` pnpm build ` overwrites ` .next/ ` directory and breaks active ` dev:web ` servers
203+ - ** Why this matters** : ` pnpm build ` overwrites ` .next/ ` directory and breaks active development servers
204204- ** Solution implemented** :
205205 - ` pnpm build:test ` uses ` .next-build/ ` directory (separate from dev server's ` .next/ ` )
206206 - Dev servers can run concurrently with build testing
207207 - No workflow disruption when testing build success
208208- ** Commands available** :
209- - ` pnpm dev: web` - Runs dev server using ` .next/ ` directory
209+ - ` docker compose -f docker-compose. dev.yml up web-dev ` - Runs containerized dev server
210210 - ` pnpm build:test ` - Tests build using ` .next-build/ ` directory
211211 - ` pnpm build ` - Production build (still uses ` .next/ ` by default)
212212
213- #### Single Dev Server Policy
214- - ** One server at a time** : ` pnpm dev:web ` uses fixed port 3000 and will fail if port is occupied
215- - ** Clear feedback** : Shows existing servers before attempting to start new one
216- - ** Preserve hot reload** : Don't kill existing servers - let developers use the running one
217- - ** Error handling** : Next.js EADDRINUSE error clearly indicates when port 3000 is busy
218- - ** Check existing servers** : The dev command shows what's running on ports 3000-3002 before starting
213+ #### Docker-Based Development Policy
214+ - ** Use Docker Compose for development** : The development environment now runs in containers for consistency
215+ - ** Configurable storage** : Storage type determined by ` .env ` file configuration (PostgreSQL, SQLite, JSON, or GitHub)
216+ - ** Hot reloading preserved** : Volume mounts ensure code changes trigger hot reloads
217+ - ** Port management** : Docker handles port allocation and prevents conflicts
218+ - ** Environment isolation** : Development dependencies are containerized
219+ - ** Commands** :
220+ - Start: ` docker compose -f docker-compose.dev.yml up web-dev `
221+ - Stop: ` docker compose -f docker-compose.dev.yml down `
222+ - Logs: ` docker compose logs web-dev -f `
219223
220224#### UI-Related Development Tasks
221225- ** ALWAYS use Playwright** : Use Playwright MCP tools for UI validation and debugging
222226- ** Browser Tool Selection** :
223227 - ** Playwright** : Required for React error debugging, console monitoring, state analysis
224228 - ** Simple Browser** : Basic navigation/UI testing only - NOT reliable for error detection
225229- ** Testing Steps** :
226- - ** Start Web App** : Run ` pnpm dev: web` to start the web app
227- - ** Verify** : Ensure the web app is running correctly before testing
230+ - ** Start Web App** : Run ` docker compose -f docker-compose. dev.yml up web-dev ` to start the containerized web app
231+ - ** Verify** : Ensure the web app is running correctly before testing (check http://localhost:3200 )
228232 - ** Run Tests** : Use Playwright to run UI tests against the web app
229233 - ** Update Devlog** : Add test results and any fixes to the devlog entry
230- - ** Stop Web App** : After testing, stop the web app with ` Ctrl+C ` in the terminal
234+ - ** Stop Web App** : After testing, stop with ` docker compose -f docker-compose.dev.yml down `
231235
232236#### React Debugging Verification Protocol
233237- ** MANDATORY for React Issues** : Use Playwright console monitoring before concluding any fix
0 commit comments