How ckstudentcouncil/souvenir works
CKSC Online Souvenir is a merchandise storefront with staff operations and financial reporting. Buyers browse products, build a cart, and submit an order; the server rechecks pricing and stores it, after which buyers can track it and receive email confirmation. Staff review and manage orders, send notifications, and handle survey and in-person sales workflows; super admins also manage accounts and view sales analytics. Several secondary subsystems are included from README capabilities, but their internal call paths were not sampled, so those links are documented rather than inferred.
Main entry points: index.js Order creation · SalesAnalyticsPage.vue Financial report · orderService.js Order access · CartPage.vue Cart and checkout
Components 29
Storefront
- Product catalog
functions/shared/catalog.js - Product pages
src/pages/ProductPage.vue - Cart and checkout
src/pages/CartPage.vue - Cart state
src/stores/cart.js - Routes and gate
src/router/index.js
Orders
- Order creation
functions/index.js - Pricing rules
functions/shared/pricing.js - Order validation
functions/lib/orders.js - Order access
src/services/orderService.js - Order history
src/pages/OrdersPage.vue - Order details
src/pages/OrderDetailPage.vue
Staff operations
- Order administration
src/pages/AdminPage.vue - Survey workflows
src/pages/SurveyAdminPage.vue - Stand sales
src/pages/StandSalesPage.vue - Staff accounts
src/pages/AccountPage.vue
Cloud backend
- Firestore
- Firebase authentication
src/services/staffAuth.js - Confirmation email
functions/index.js - Email delivery
functions/lib/mailer.js - Bulk notifications
functions/lib/notifications.js - Mail queue
functions/lib/mailQueue.js - Queue processing
functions/lib/mailQueueCore.js
Sales reporting
- Financial report
src/pages/SalesAnalyticsPage.vue - Analytics data
src/composables/useSalesAnalytics.js - Past sales archive
src/services/salesArchiveService.js - Report charts
src/components/analytics/LineChart.vue - PDF export
src/utils/pdf.js
Other components
- Buyer
- Staff user
Connections 34
- Buyer → Product pages: browses
- Product pages → Product catalog: uses catalog
- Buyer → Cart and checkout: checks out
- Cart and checkout → Cart state: uses state
- Cart and checkout → Order creation: submits order
- Order creation → Pricing rules: rechecks prices
- Order creation → Order validation: validates order
functions/index.js - Order creation → Firestore: writes order
functions/index.js - Order validation → Product catalog: validates items
functions/lib/orders.js - Order validation → Pricing rules: calculates price
functions/lib/orders.js - Order access → Firestore: reads and writes
- Order history → Order access: loads orders
- Order details → Order access: loads order
- Buyer → Order history: tracks orders
- Order creation → Confirmation email: triggers email
functions/index.js - Confirmation email → Email delivery: sends message
functions/index.js - Confirmation email → Firestore: watches new order
functions/index.js - Staff user → Routes and gate: opens staff area
src/router/index.js - Routes and gate → Firebase authentication: checks role
src/router/index.js - Staff user → Order administration: manages orders
- Order administration → Order access: updates orders
- Staff user → Bulk notifications: requests notices
- Bulk notifications → Mail queue: enqueues batches
functions/lib/notifications.js - Mail queue → Queue processing: delegates queue
functions/lib/mailQueue.js - Queue processing → Email delivery: sends messages
functions/lib/mailQueue.js - Staff user → Survey workflows: reviews surveys
- Staff user → Stand sales: records sales
- Staff user → Staff accounts: manages accounts
- Staff user → Financial report: views report
- Financial report → Analytics data: loads metrics
- Analytics data → Firestore: reads live orders
- Analytics data → Past sales archive: loads past sales
- Financial report → Report charts: renders charts
- Financial report → PDF export: exports PDF