What's next for Feed the Sheople, NOT wasting the FOOD

FreshTrack London - Food Waste Reduction Platform

Overview

FreshTrack London is a comprehensive food waste reduction platform specifically designed for London, Ontario restaurants and grocery stores to manage their food inventory, track expiration dates, and facilitate food donations to local food banks and organizations. The application helps establishments minimize waste while contributing to the London community through efficient food donation coordination with real local food banks.

System Architecture

Frontend Architecture

  • Framework: React 18 with TypeScript
  • Routing: Wouter for client-side routing
  • State Management: TanStack React Query for server state management
  • UI Framework: shadcn/ui components built on Radix UI primitives
  • Styling: Tailwind CSS with custom design tokens
  • Build Tool: Vite for fast development and optimized builds

Backend Architecture

  • Runtime: Node.js with Express.js server
  • Language: TypeScript with ES modules
  • API Design: RESTful APIs with JSON responses
  • Data Storage: In-memory storage with interface for future database integration
  • Session Management: Express sessions with PostgreSQL session store (configured but not yet implemented)

Data Storage Solutions

  • Current: In-memory storage using Maps for development
  • Planned: PostgreSQL database with Drizzle ORM
  • Session Store: PostgreSQL-backed sessions using connect-pg-simple
  • Migrations: Drizzle Kit for schema migrations

Key Components

Database Schema (Drizzle ORM)

  • Food Items: Core inventory tracking with expiration dates, categories, and donation status
  • Organizations: Partner organizations for food donations with contact information
  • Restaurants: Multi-tenant support for different restaurant locations
  • Schema Validation: Zod schemas for type-safe data validation

Frontend Components

  • Dashboard: Main interface showing statistics, food items, and quick actions
  • Food Items Management: CRUD operations for inventory items with filtering and search
  • Donation Opportunities: Integration with local organizations for food donation
  • Statistics Cards: Real-time metrics on waste reduction and donations
  • Quick Actions: Streamlined workflows for common tasks

API Endpoints

  • Food Items: GET, POST, PATCH, DELETE operations for inventory management
  • Organizations: Management of donation partner organizations
  • Restaurants: Multi-tenant restaurant support
  • Statistics: Aggregated data for dashboard metrics

Data Flow

  1. Inventory Management: Restaurant staff add food items with expiration dates
  2. Status Tracking: System automatically categorizes items as fresh, expiring, or expired
  3. Donation Coordination: Expiring items are matched with suitable organizations
  4. Reporting: Analytics track waste reduction and donation impact
  5. Multi-tenant Support: Each restaurant maintains separate inventory and statistics

External Dependencies

UI and Styling

  • Radix UI: Accessible component primitives
  • Tailwind CSS: Utility-first CSS framework
  • Material Icons: Google's icon library for consistent iconography
  • Class Variance Authority: Type-safe CSS class management

Development Tools

  • Vite: Fast build tool with HMR support
  • TypeScript: Type safety across the entire stack
  • ESBuild: Fast JavaScript bundler for production builds
  • PostCSS: CSS processing with Tailwind

Database and ORM

  • Drizzle ORM: Type-safe SQL ORM with PostgreSQL support
  • Neon Database: Serverless PostgreSQL (configured for production)
  • Drizzle Kit: Schema management and migrations

Form Handling

  • React Hook Form: Performant form management
  • Zod: Schema validation and type inference

Deployment Strategy

Development Environment

  • Dev Server: Vite development server with Express API proxy
  • Hot Reloading: Full-stack HMR for rapid development
  • Error Handling: Runtime error overlay for debugging

Production Build

  • Frontend: Static assets built with Vite and served by Express
  • Backend: ESBuild bundles server code for Node.js deployment
  • Environment: Production mode with optimized builds and error handling

Database Setup

  • Development: In-memory storage for rapid prototyping
  • Production: PostgreSQL with Drizzle ORM migrations
  • Session Management: PostgreSQL-backed session storage

London, Ontario Integration

Partner Food Banks

  • London Food Bank - Main distribution center at 926 Leathorne Street
  • Glen Cairn Community Resource Centre - Community resource center
  • Crouch Neighbourhood Resource Centre - Neighbourhood center
  • The Salvation Army - Community & family services
  • South London Neighbourhood Resource Centre - Community center
  • Northwest London Resource Centre - Community resource center
  • ELUCO (East London United Church Outreach) - Church outreach program
  • Fanshawe College - The Sharing Shop - Student food assistance

Participating Establishments

  • Major grocery chains: Loblaws, Metro, FreshCo, Sobeys
  • Restaurant chains: Swiss Chalet, Boston Pizza
  • Local restaurants: Garlic's of London, The Squire Pub & Grill

Built With

  • amond-know-how
Share this project:

Updates

posted an update

This Proof of Concept (PoC) is a draft because of time being invited and closing date was less than 48 hours. That being said and NOT using Bolt rather then Replit as the base tool along with my own set of A.I. Agent toolsbox (MCP & ADK A2A). I think I'm pleased about the out come of this draft PoC...

Log in or sign up for Devpost to join the conversation.