BFC
But First Coffee
Project Status Report
PROJECT STATUS REPORT Report No. BFC-2026-07

But First Coffee
Delivery App — Status Report

Comprehensive feature audit of the BFC mobile-first ordering platform. Covers implementation status, completion percentages, source file references, and recommended next steps for pending functionality.

Report Date
Version
v0.1.0
Platform
React / PWA
Overall Status
In Progress
20
Features Complete
8
Features Pending
71%
Overall Complete
11
API Endpoints

Executive Summary

The But First Coffee (BFC) delivery app is a full-stack, mobile-first progressive web application built for the Philippines market. The core ordering pipeline — user authentication, menu browsing, cart management, order placement, and real-time order tracking — is fully operational. The platform successfully handles end-to-end order flows, WebSocket-driven live status updates, AI-assisted chat support, and geolocation-based address selection.

As of this report, 20 of 28 scoped features (71%) are complete and production-ready. The remaining 29% consists primarily of secondary authentication methods (Google/Facebook OAuth), home-page widget wiring, delivery fee logic, and password reset email delivery — none of which block the core ordering experience.

The app is deployed and accessible at bfc.webtour.ph, backed by apigateway.webtour.ph for REST and WebSocket services, and a local Express.js AI chat server (port 3002) for the BFC Assistant.

Status Breakdown
Total Features Scoped 28
✓ Implemented 20
✗ Not Functional (0–5%) 5
⚠ Partially Wired (10–30%) 3
Overall Completion 71%

Module Progress

Authentication 80%
  • Login & Register
  • Guest mode
  • JWT persistence
  • Forgot password email
  • Google / Facebook OAuth
Ordering Flow 90%
  • Menu browse + search
  • Cart CRUD (API-backed)
  • Order placement
  • Delivery fee calculation
  • Pickup vs. delivery choice
Realtime & Alerts 100%
  • Socket.io order updates
  • Toast notifications
  • Notification panel
  • Sound alerts
  • Dedup via seenKeys
Home Page 50%
  • Banner & layout
  • Bottom navigation
  • Points card (hardcoded 0)
  • Search bar (no logic)
  • Nearby stores (1 static)
Overall Project Completion 71% — 20 of 28 features
Complete (71%) Partial / Stubbed (11%) Not Started (18%)

Implemented Features

20 features fully implemented, tested, and API-connected.

🔐
User Login
Authentication
100%

Email/password login with JWT access + refresh tokens. Tokens persisted to localStorage. Auto-redirects authenticated users away from login page.

api/auth.ts store/authStore.ts
📝
User Registration
Authentication
100%

Full name, email, and password signup. Client-side validation (min 6 chars, password match check). Auto-login via JWT after successful registration.

pages/auth/Register.tsx
🧳
Guest Mode
Authentication
100%

Browse and order without an account. Guest flag stored in localStorage. Full app access granted with a guest user object (id: 0, name: "Guest").

store/authStore.ts
🛡️
Route Guards
Security
100%

ProtectedRoute redirects unauthenticated users to /login. GuestRoute redirects authenticated users away from auth pages back to home.

routes/ProtectedRoute.tsx routes/GuestRoute.tsx
Menu Browsing
Core Ordering
100%

Responsive grid of all menu items across 9 categories. Category tabs + real-time client-side search filtering via useMemo. No page reload required.

pages/Menu.tsx data/menu.ts
🛒
Add to Cart Modal
Core Ordering
100%

Bottom-sheet modal with size selector (S/M/L + price delta), quantity input, and sugar-level customization (0–100%). Sends full metadata to cart API.

components/menu/AddToCartModal.tsx
🛍️
Shopping Cart
Core Ordering
100%

Full CRUD via REST API (GET, POST, PATCH qty, DELETE item, DELETE /cart). Cart badge shows live item count. Two-column layout on desktop.

context/CartContext.tsx api/cart.ts
📦
Order Placement
Core Ordering
100%

POST /orders with full item payload and total. Shows loading spinner during API call. Clears cart on success and redirects to Order History.

pages/Cart.tsx api/orders.ts
🧾
Order History & Status
Core Ordering
100%

Accordion list of past orders fetched from GET /orders. Expandable to show item thumbnails, prices, and quantities. Status badges: pending → confirmed → preparing → ready → delivered → cancelled.

pages/Orders.tsx
Real-time Order Updates
WebSocket
100%

Socket.io client connects to apigateway.webtour.ph, joins user room, listens for order:updated/update/status events. Deduplication prevents double notifications.

lib/socket.ts context/OrdersContext.tsx
🔔
Notifications Panel
UI Component
100%

Slide-in panel from right. Bell icon shows unread badge. Mark as read / mark all / clear all actions. Color-coded info/success/warning types.

components/layout/NotificationsPanel.tsx
🔊
Toast & Sound Alerts
UX Feature
100%

Ephemeral toast stack auto-dismisses after 4.5s. Ready/delivered orders trigger a celebratory sound; other updates play a softer chime via Web Audio API.

lib/sound.ts context/OrdersContext.tsx
🤖
AI Chat Assistant
AI Feature
100%

BFC Assistant — local AI chat server (Express.js, port 3002). Answers menu, price, and delivery questions. Chat modal with typing indicator, accessible from the header.

components/ai/AIChatModal.tsx server/index.js :3002
📍
Address Picker
Location
100%

Photon/OSM autocomplete (PH-biased bbox), 500ms debounce. Two-step flow: search results → map preview → confirm. Recent addresses saved in context.

components/location/AddressPickerModal.tsx
🗺️
GPS & Map Preview
Location
100%

Browser Geolocation API auto-fills address via Nominatim reverse geocoding. OpenStreetMap iframe embed previews the selected location with a marker. No API key needed.

AddressPickerModal → MapPreview + reverseGeocode
👤
User Profile & Avatar
User Management
100%

Profile page shows name, email, and avatar. Avatar upload via PATCH /users/:id/avatar (multipart/form-data). Full CDN URL built from relative path. Zustand store updated on success.

pages/Profile.tsx api/upload.ts
Rewards & Points
Loyalty
100%

GET /rewards returns total points + history. Points summary card (1 pt per ₱10 spent). Transaction history list with descriptions and timestamps.

pages/Rewards.tsx api/rewards.ts
🧭
Bottom Navigation
UI / Layout
100%

Fixed bottom nav: Home, Menu, Cart, Profile. Active route highlighting. Cart badge with live count. Max-width 1200px, centered on desktop.

components/layout/BottomNavigation.tsx
💾
Token Persistence
Security
100%

Access token, refresh token, and user object stored via a typed storage service wrapper. Axios interceptor attaches Bearer token to every API request automatically.

services/storage.ts api/axios.ts

Pending / Incomplete Features

8 features stubbed, commented out, or hardcoded — not yet functional in production.

🔑
Forgot Password
Authentication
0%

Form UI exists but the API call is a TODO comment. Handler always shows a success message — no email is sent. forgotPasswordApi(email) must be implemented.

// TODO:
// await forgotPasswordApi(email);
pages/auth/ForgotPassword.tsx:40
🔴
Google OAuth Login
Authentication
5%

Button renders in Register but handler only calls console.log("Google Login"). Completely commented out in Login page. No Google SDK or OAuth flow.

const handleGoogleLogin = () => {"{"} console.log("Google Login"); {"}"};
pages/auth/Register.tsx
🔵
Facebook OAuth Login
Authentication
5%

Button renders in Register only. Handler calls console.log("Facebook Login"). No Facebook SDK, no OAuth redirect, no token exchange.

const handleFacebookLogin = () => {"{"} console.log("Facebook Login"); {"}"};
pages/auth/Register.tsx
🚴
Delivery Fee Calculation
Ordering
0%

Delivery fee hardcoded to ₱0 in CartSummary. No distance-based tiers, no minimum order threshold, no free delivery logic.

<CartSummary deliveryFee={"{0}"} />
{/* hardcoded — must be dynamic */}
pages/Cart.tsx
🏠
Delivery Options Card
Ordering
0%

DeliveryCard renders in Cart but onClick only calls console.log("Delivery"). No pickup vs. delivery toggle, no time-slot booking, no address confirmation.

<DeliveryCard
  onClick={() => console.log("Delivery")}
/>
pages/Cart.tsx
🔍
Home Page Search
Home Page
10%

SearchBar renders on Home but onSearch only calls console.log(value). No navigation to Menu with pre-filled search query.

<SearchBar
  onSearch={(v) => console.log(v)}
/>
pages/Home.tsx
💎
Points Card (Home)
Home Page
30%

PointsCard renders on Home with points hardcoded to 0. onClick logs to console rather than navigating to /rewards. Not connected to GET /rewards.

<PointsCard
  points={"{0}"} {/* must fetch */}
  onClick={() => console.log("Rewards")}
/>
pages/Home.tsx
🏪
Nearby Stores
Home Page
30%

"What's Nearby" shows a single hardcoded BFC Makati card (3.3 km). No API call, no geolocation-based distance sort, no dynamic branch list.

<StoreCard
  name="BFC (Makati)"
  distance="3.3 km" {/* hardcoded */}
/>
pages/Home.tsx

Tech Stack & Architecture

Frontend
  • React 19 + TypeScript
  • Vite (build tool + dev proxy)
  • Tailwind CSS v4
  • Zustand (global auth state)
  • React Context (cart, orders, address, chat)
  • React Router v7
  • react-icons (Font Awesome 6)
Backend & APIs
  • Express.js AI server (port 3002)
  • apigateway.webtour.ph (REST + WS)
  • Axios (REST client + Bearer auth interceptor)
  • Socket.io Client v4
  • Local AI Chat Server (CLI, port 3002)
Third-party Services
  • Photon / Komoot (address autocomplete)
  • Nominatim / OSM (reverse geocoding)
  • OpenStreetMap (map embed iframe)
  • Browser Geolocation API
  • Unsplash (product images)
API Endpoints
POST/auth/signin
POST/auth/signup
GET/orders
POST/orders
GET/cart
POST/cart
PATCH/cart/:id
DELETE/cart · /cart/:id
GET/rewards
PATCH/users/:id/avatar
POST/api/chat (port 3002)
App Routes
/Home (protected)
/menuMenu browse + search (protected)
/cartCart & checkout (protected)
/ordersOrder history (protected)
/rewardsPoints & rewards (protected)
/profileUser profile (protected)
/loginLogin (guest-only)
/registerRegister (guest-only)
/forgot-passwordReset (guest-only)
State Management
  • Zustand — authStore
    user, tokens, login / register / logout / updateAvatar
  • CartContext
    cart items, totalItems, totalPrice
  • OrdersContext
    orders, socket, notifications, toasts
  • AddressContext
    selected address, recent addresses, picker state
  • ChatContext
    isChatOpen, openChat, closeChat

1-Week Development Timeline

Jul 21 – Jul 27, 2026  ·  Sprint goal: close all P1 & P2 gaps, ship P3 OAuth

MON 21
Day 1 — Project Audit & Report
Complete source code audit across all pages & contexts
Generate & publish BFC Project Status Report
Confirm working features (20) vs. pending (8)
Define sprint priorities P1 → P4
TUE 22
Day 2 — P1: Delivery Fee & Options Card CRITICAL
Implement distance-based delivery fee tiers (flat ₱49 <3km, ₱79 3–7km, ₱99 7km+)
Replace deliveryFee=0 in CartSummary with dynamic value from AddressContext
Wire DeliveryCard onClick to a bottom-sheet modal (pickup vs. delivery toggle)
Add order type field to POST /orders payload
WED 23
Day 3 — P1: Forgot Password Email CRITICAL
Confirm backend POST /auth/forgot-password endpoint is live on apigateway
Implement forgotPasswordApi(email) in api/auth.ts
Replace TODO comment in ForgotPassword.tsx with real API call & error handling
Show distinct success vs. error states (invalid email, not registered)
THU 24
Day 4 — P2: Home Page — Search & Points HIGH PRIORITY
Replace Home SearchBar console.log with navigate("/menu", { state: { q } })
Read search state in Menu.tsx and pre-fill the filter input on load
Fetch GET /rewards on Home mount, pass real points to PointsCard
Wire PointsCard onClick to navigate("/rewards")
FRI 25
Day 5 — P2: Nearby Stores + QA Pass HIGH PRIORITY
Create data/branches.ts with BFC branch list (lat/lng per branch)
Sort branches by Haversine distance from AddressContext → render top 3
Full QA: order flow end-to-end on mobile viewport (375px)
Smoke-test all WebSocket events (order:updated, order:status)
SAT 26
Day 6 — P3: Google & Facebook OAuth MEDIUM
Add Google Sign-In SDK to index.html (one-tap or redirect flow)
Implement POST /auth/google token exchange on apigateway, return BFC JWT
Add Facebook JS SDK, implement FB.login() in Register.tsx
Restore Google/Facebook buttons on Login.tsx (currently commented out)
SUN 27
Day 7 — Integration Test & Sprint Close DEPLOY
Full regression test across all 28 features on staging
Verify delivery fee calculation in a real end-to-end order
Deploy to bfc.webtour.ph — rebuild Vite, update Apache
Publish sprint close report — update feature status percentages
Sprint Completion Target (Jul 21–27)
3
P1 Closed
Tue–Wed
3
P2 Closed
Thu–Fri
2
P3 Closed
Sat
100%
Target
by Sun Jul 27

Recommended Next Steps

P1 Critical — Blocks Revenue
  • Implement delivery fee calculation
    Wire distance from AddressContext → fee tiers API → CartSummary. Replace hardcoded deliveryFee=0.
  • Implement forgot password email
    Uncomment await forgotPasswordApi(email) in ForgotPassword.tsx and wire the backend email endpoint.
  • Wire Delivery Options Card
    Replace console.log("Delivery") with a bottom sheet for pickup vs. delivery toggle and time-slot selection.
P2 High — UX Improvement
  • Wire Home search → Menu page
    Replace console.log with navigate("/menu", { state: { q: value } }) and read state in Menu.
  • Connect PointsCard on Home to API
    Call GET /rewards on mount, pass data.totalPoints to PointsCard. Wire onClick to navigate("/rewards").
  • Dynamic nearby stores
    Call a /branches API (or static JSON with geo-sort) using current address from AddressContext to render real proximity.
P3 Medium — Auth Enhancement
  • Implement Google OAuth
    Add Google Sign-In SDK, implement the OAuth redirect flow, exchange code for BFC JWT on the backend.
  • Implement Facebook OAuth
    Add Facebook JS SDK, implement the login flow similarly to Google. Consider using a unified social login endpoint on the backend.
P4 Low — Nice to Have
  • Order tracking map
    Add a live map on the Orders page that shows rider location as the order moves from preparing → delivered.
  • Reorder from history
    Add a "Reorder" button to each order in history that adds all items from a past order directly back to the cart.