Skip to content

Add sensor storefront UI, admin inventory panel, and lightweight Node API#3

Open
sandip444 wants to merge 1 commit into
masterfrom
codex/create-sensor-selling-website
Open

Add sensor storefront UI, admin inventory panel, and lightweight Node API#3
sandip444 wants to merge 1 commit into
masterfrom
codex/create-sensor-selling-website

Conversation

@sandip444

Copy link
Copy Markdown
Owner

Motivation

  • Implement a sensor-focused e-commerce demo with a React frontend and a simple Node.js backend to provide an admin inventory management area and a customer-facing shop view.
  • Provide a resilient developer experience by adding a local API and a frontend fallback dataset so the UI works even when the backend is unreachable.

Description

  • Add a lightweight Express API at server/index.js with endpoints GET /api/products, GET /api/products/:id, POST /api/products, PUT /api/products/:id, and DELETE /api/products/:id, and include server/package.json to run the service.
  • Build the storefront UI and routing in React including the home inventory page (/), product detail view (/product/:productId), and a new admin inventory panel (/admin) with src/Containers/AdminPanel.jsx, updated src/App.js, and src/Containers/* components and styles in src/App.css.
  • Add a frontend API helper src/api.js and sample fallback data src/data/sampleProducts.js and wire fallbacks into productListing, prodectDetails, and AdminPanel so the app loads sample inventory when the API is unavailable.
  • Update the README with backend instructions and include improved header/navigation and product card/detail UI changes.

Testing

  • Ran the frontend with npm start and the development server compiled successfully and served the app at http://localhost:3000 (webpack compiled successfully).
  • Captured a smoke screenshot using a Playwright script which produced an artifact artifacts/sensor-shop-home.png confirming the UI rendered.
  • Attempted cd server && npm install to install backend dependencies but the install failed with an npm 403 error, so the server was not started in this environment.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant