How hasanawas/scent-drip works
Scent Drip is a perfume storefront with an admin dashboard. Customers browse and filter stock, get note-based recommendations, build a bag, then place a cash-on-delivery order or start Stripe checkout; Stripe’s webhook updates payment state. Admins sign in to manage perfumes, inventory, and order statuses, with live order alerts. The browser uses Supabase for data, auth, and image storage; Cloudflare serves the site and payment endpoints. The README documents Resend order emails and optional Telegram alerts, but their implementation is not sampled, so those links are documented rather than source-verified.
Main entry points: shop.js Shop and cart · admin.js Admin dashboard · checkout.js Checkout endpoint · chatbot.js Scent recommender
Components 22
Customer storefront
- Shop and cart
js/shop.js - Scent recommender
js/chatbot.js - Fragrance catalog
js/notes-data.js - Storefront page
index.html
Admin operations
- Admin dashboard
js/admin.js - Admin page
admin.html - Order alerts
js/admin.js
Payment services
- Checkout endpoint
functions/api/checkout.js - Stripe checkout
- Webhook route
worker.js - Stripe webhook handler
functions/api/stripe-webhook.js - Resend email
- Telegram alerts
Data and hosting
- Shared browser setup
js/common.js - App configuration
js/config.js - Cloudflare Worker
worker.js - Supabase
- Database rules
supabase/schema.sql - Product photo storage
Other components
- Customer
- Admin
- Order inbox
Connections 27
- Customer → Storefront page: visits
README.md - Storefront page → Shop and cart: loads
README.md - Shop and cart → Supabase: reads stock
README.md - Shop and cart → Checkout endpoint: starts card checkout
js/shop.js - Shop and cart → Supabase: places COD orders
README.md - Storefront page → Scent recommender: offers guidance
README.md - Scent recommender → Fragrance catalog: matches notes
js/chatbot.js - Scent recommender → Shop and cart: adds or views
js/chatbot.js - Admin → Admin page: opens
README.md - Admin page → Admin dashboard: loads
README.md - Admin dashboard → Supabase: auth and manages
js/admin.js - Admin dashboard → Product photo storage: uploads photos
README.md - Admin dashboard → Order alerts: subscribes
js/admin.js - Order alerts → Admin: notifies
README.md - Shared browser setup → App configuration: reads settings
js/common.js - Shared browser setup → Supabase: creates client
js/common.js - Database rules → Supabase: defines rules
README.md - Checkout endpoint → Supabase: creates order
functions/api/checkout.js - Checkout endpoint → Stripe checkout: creates session
functions/api/checkout.js - Stripe checkout → Stripe webhook handler: sends events
README.md - Cloudflare Worker → Checkout endpoint: routes checkout
worker.js - Cloudflare Worker → Webhook route: routes webhook
worker.js - Webhook route → Stripe webhook handler: dispatches
worker.js - Stripe webhook handler → Supabase: updates payment
functions/api/stripe-webhook.js - Supabase → Resend email: triggers order email
README.md - Resend email → Order inbox: delivers email
README.md - Supabase → Telegram alerts: optional alert
README.md