-
Notifications
You must be signed in to change notification settings - Fork 19
docs: Update AGENTS.md #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Completed Working on "Auto PR Description"✅ Workflow completed successfully. |
❌ Workflow Failed: "Auto PR Description"The workflow encountered an error and could not complete successfully. Error: Step prepare-pr-description failed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 MAJOR, 1 MINOR findings across this documentation update. Key themes: the new AGENTS guide diverges from the actual frontend/backend configurations (wrong Vite env var name, inaccurate dev server port) and recommends a Docker shutdown command that deletes local data. Please align the env var names with the Vite implementation, correct or enforce the documented dev server port, and either adjust or clearly warn about the destructive compose:down script so contributors are not misled during setup.
|
|
||
| ## 3. Development Guidelines | ||
| - **Prerequisites:** Node.js ≥16, npm, and Docker (per backend READMEs). Install these before working with any service. | ||
| - **Environment files:** Each service ships with its own `.env`. Populate DB URLs, Kafka hostnames, JWT secrets, etc. Backend READMEs enumerate defaults such as `DB_URL`, `JWT_SECRET_KEY`, and `BCRYPT_SALT`. The frontend expects `PORT` and `REACT_APP_SERVER_URL`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[MAJOR]: Section 3 line 20 and Section 5 line 36 instruct contributors to set REACT_APP_SERVER_URL, but the Vite admin actually consumes import.meta.env.VITE_REACT_APP_SERVER_URL (see apps/ecommerce-admin/src/data-provider/graphqlDataProvider.ts L6-L8 and .env L1-L2). Following the guide leaves the GraphQL client pointing to undefined/graphql, so the UI cannot talk to the backend when onboarding new agents.
Suggested fix: Update every frontend environment reference to VITE_REACT_APP_SERVER_URL (and explain that both the login shortcuts and the GraphQL data provider rely on that name) so the documented setup matches the actual env file and build tooling.
| | Intent | Command | | ||
| | --- | --- | | ||
| | Install dependencies | `npm install` | | ||
| | Start dev server (Vite) | `npm run start` (defaults to port 3001) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[MINOR]: The frontend command table (line 72) claims npm run start serves Vite on port 3001, but apps/ecommerce-admin/package.json (L16) just runs vite and vite.config.ts (L5-L13) never overrides server.port, so the dev server actually binds to Vite’s default 5173. This misleads anyone wiring proxies or env files based on the guide.
Suggested fix: Either correct the guide to state the real default port (5173) or add server: { port: 3001 } to vite.config.ts so the command behaves as documented.
| | Start with debugger | `npm run start:debug` | | ||
| | Run tests | `npm run test` | | ||
| | Build distributable | `npm run build` | | ||
| | Compose stack up / down | `npm run compose:up` / `npm run compose:down` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[MAJOR]: The backend command table (line 56) treats npm run compose:down as the routine way to stop the stack, but both backend packages define that script as docker-compose down --volumes (apps/ecommerce-server/package.json L18-L19 and the logistic variant). Running it as documented wipes the Postgres/MySQL and Kafka volumes every time contributors bring services down, forcing them to recreate databases, reapply migrations, and reseed brokers unexpectedly.
Suggested fix: Either update the guide to warn that compose:down destroys volumes or change the script to a plain docker-compose down and create a separate compose:down:clean for destructive resets.
Summary
This PR adds the new AGENTS guide that documents the structure, workflows, and conventions for the
amplication/sample-appmonorepo.Changes
Why
Keeping AGENTS.md current provides contributors with an accurate onboarding reference for this repository, reducing ramp-up time and clarifying service-specific workflows.
Summary
This PR adds a comprehensive
AGENTS.mdguide that documents the architecture, tooling, and workflows for the ecommerce, logistics, and admin services in the monorepo. It centralizes onboarding context, outlining service layouts, environment requirements, and operational safeguards for future contributors.Changes
Commits
Testing