Food Ordering App
A production-focused food ordering application with protected routes, media upload for restaurant images, Stripe Checkout integration, and reliable order lifecycle management. Customers can search restaurants, add items to cart, checkout via Stripe, and track order status. Restaurant owners can create and manage restaurants and menus, and view incoming orders.
The Problem
Keeping order status accurate when payment confirmation is asynchronous (Stripe webhooks) is challenging. The platform also requires secure authentication, authenticated API routes, reliable media uploads, and robust order creation logic.
The Solution
Built a full-stack solution: Auth0 for authentication and protected routes, an Express API split by domains (user, restaurant, order), MongoDB/Mongoose persistence, Cloudinary for image upload, Stripe Checkout + webhook handling to transition orders from 'pending_payment' to 'paid', and a React frontend using React Query for server state.
Technical Architecture
Two-app architecture: a React + Vite frontend handling auth flows, search, checkout triggers and order tracking; and a Node.js + Express backend validating tokens, enforcing business rules, persisting data in MongoDB, and processing Stripe webhooks. Backend is organized into routes, controllers, middleware (JWT validation, payload validation), and Mongoose models. Order flow: create checkout session -> create order with status 'pending_payment' -> Stripe Checkout -> webhook confirms payment -> backend updates order to 'paid'.