DISCLAIMER — Seeds Database on Startup:
Running the project via
docker-compose up --buildwill automatically run database migrations and execute the Prisma seed script inside the backend container. The seed resets and populates the database with demo data (seebackend/prisma/seed.ts), so do not run it against production data or a database you need to keep unchanged.
Full-stack ops dashboard to manage products and product owners. Backend is NestJS + Prisma; frontend is Next.js with a clean admin UI. Docker Compose gives a one-command spin-up.
docker-compose up --buildServices: Postgres (5432), Backend API (3001, Swagger at http://localhost:3001/docs), Frontend dashboard (3000).
- Frontend Dashboard: http://localhost:3000
- Backend API: http://localhost:3001
- API Docs (Swagger): http://localhost:3001/docs
cd backend
cp .env.example .env # set DATABASE_URL, PORT
npm install
npx prisma migrate dev --name init
npx prisma db seed # optional but recommended for demo data
npm run start:devcd frontend
echo "NEXT_PUBLIC_API_URL=http://localhost:3001" > .env.local
npm install
npm run devYou can fully manage products and product owners from the dashboard.
- Create, edit, delete, and view products
- Upload product images (stored locally)
- Filter and search by name, SKU, status, owner, price range, and inventory range
- Sorting and pagination are built in
- Stock status updates automatically based on inventory: 0 -> Out of Stock, >0 -> In Stock
- Create, edit, and view owners
- Search, sort, and paginate
- Cannot delete an owner if products reference them
- Total products and inventory value
- Products by status
- Top owners
- Recent products
- Low stock items
- Uploading a new image replaces the old one
- Old image files are cleaned up
- Clear API errors for duplicate SKUs, missing records, or invalid relations
- No raw database errors exposed
- ProductOwner: id, name, timestamps, products relation
- Product: id, name, unique SKU, price, inventory, status (IN_STOCK, OUT_OF_STOCK, DISCONTINUED), optional imagePath, owner FK, timestamps
- No authentication/authorization (intentional)
- Seed script resets data for deterministic demos
- Images stored on disk in backend/uploads (not cloud storage)
- Prices and inventory cannot be negative; SKU must be unique
- Pagination and sort inputs are sanitized to avoid over-fetching or unsafe ordering