Skip to content

EnmaSantos/SnackStack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SnackStack

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.

Product Overview

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.

Core Features

Team Storefront

  • 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.

Admin Operations

  • 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.

Demo And Mock-Friendly Behavior

  • 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.

Technology Stack

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

Architecture Notes

  • frontend/src/config.js centralizes the API base URL and demo-mode settings.
  • frontend/src/components contains the storefront, cart, profile, admin, analytics, request, and balance-management UI.
  • backend/Controllers exposes the API surface for auth, snacks, users, admin actions, and snack requests.
  • backend/Services/InventoryService.cs owns inventory-related business behavior.
  • backend/Services/GoogleSheetsService.cs is intentionally safe by default and only calls Google Sheets when explicit sample-replaced configuration is provided.
  • backend/Data and backend/Migrations define the SQLite persistence model.

Configuration

Use the provided examples as the only supported starting point:

  • frontend/.env.example
  • backend/.env.example

Important frontend values:

VITE_API_BASE_URL=http://localhost:5000
VITE_DEMO_MODE=true

Important backend values:

GoogleSheets__ApiKey=
GoogleSheets__SpreadsheetId=

Leaving the Google Sheets values blank keeps the app in sample-data mode.

Local Development

Backend:

cd backend
dotnet restore
dotnet run

Frontend:

cd frontend
npm ci
npm run dev

Build checks:

cd backend
dotnet build
cd frontend
npm ci
npm run build

Public-Safe Data Handling

This 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.

What This Demonstrates

  • 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.

About

Full-stack snack store management app with React, Vite, .NET, SQLite, and demo-safe integrations.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages