SnackStack is a full-stack snack store system for small teams. It gives a shared office or student team a simple way to browse available snacks, check out items, manage balances, review purchasing activity, and keep inventory stocked without needing a heavy point-of-sale platform.
This public-safe edition keeps the product architecture and implementation patterns intact while replacing private school, user, payment, and spreadsheet details with placeholders and sample data.
The app is built around a practical team-store workflow:
- Team members can browse the snack catalog, add items to a cart, and complete checkout against their available balance.
- Users can view their profile, balance, and transaction history.
- Admins can manage snacks, update inventory, restock products, review user balances, distribute weekly credits, handle snack requests, and export a shopping list.
- Store activity is persisted through a .NET API and SQLite database, with React handling the interactive storefront and admin screens.
- Searchable snack list with prices, stock counts, image URLs, and availability states.
- Cart-based checkout flow that validates user balance and stock before committing a purchase.
- Transaction records for purchases and balance additions.
- Profile page with balance summary and purchase history.
- Snack request form so users can suggest new items for admins to review.
- Create, edit, and delete snack records.
- Restock existing snacks and update pricing as product cost changes.
- Track inventory batches so restocking is more than a simple number edit.
- Review all transactions across the store.
- Adjust user balances and toggle admin access.
- Distribute weekly credits from a Google Sheets-style schedule source when configured.
- Generate a shopping list document from needed items and request data.
- View store trends such as total credits distributed, revenue, best sellers, and stale inventory.
- The frontend supports a demo user through
VITE_DEMO_MODE=true. - The backend Google Sheets integration returns sample sheet names and sample hour data when no API key or spreadsheet ID is configured.
- Seed data makes the app reviewable without connecting to a live school system or private spreadsheet.
| Layer | Tools |
|---|---|
| Frontend | React 19, Vite 7, JavaScript, Material UI |
| Backend | ASP.NET Core / .NET 9 Web API |
| Data | Entity Framework Core, SQLite, EF migrations |
| Auth | Google authentication hooks, cookie-based API sessions, demo-mode fallback |
| Integrations | Optional Google Sheets API configuration for weekly credit distribution |
| Reporting | Markdown-to-PDF shopping list generation |
frontend/src/config.jscentralizes the API base URL and demo-mode settings.frontend/src/componentscontains the storefront, cart, profile, admin, analytics, request, and balance-management UI.backend/Controllersexposes the API surface for auth, snacks, users, admin actions, and snack requests.backend/Services/InventoryService.csowns inventory-related business behavior.backend/Services/GoogleSheetsService.csis intentionally safe by default and only calls Google Sheets when explicit sample-replaced configuration is provided.backend/Dataandbackend/Migrationsdefine the SQLite persistence model.
Use the provided examples as the only supported starting point:
frontend/.env.examplebackend/.env.example
Important frontend values:
VITE_API_BASE_URL=http://localhost:5000
VITE_DEMO_MODE=trueImportant backend values:
GoogleSheets__ApiKey=
GoogleSheets__SpreadsheetId=Leaving the Google Sheets values blank keeps the app in sample-data mode.
Backend:
cd backend
dotnet restore
dotnet runFrontend:
cd frontend
npm ci
npm run devBuild checks:
cd backend
dotnet buildcd frontend
npm ci
npm run buildThis repository was rebuilt with fresh Git history. Private institution names, internal domains, payment links, live Google Sheets identifiers, credentials, generated build output, and local environment files were removed or replaced with placeholders. The original work systems and production data are not included.
No open-source license is included because the original code was created for a job context.
- Modern JavaScript application development with React and Vite.
- Component-driven UI work across user and admin workflows.
- Full-stack integration between a React client and .NET API.
- Entity Framework Core modeling, migrations, and transactional database updates.
- Authentication-aware frontend behavior with a reviewable demo mode.
- Practical operations tooling: inventory, shopping lists, balances, credit distribution, analytics, and request management.