Affluence Dashboard

Affluence Dashboard

The operational backbone of Affluence Store — a sneaker and collectibles resale business in Strasbourg. Manages inventory lifecycle (intake → sale → payout), generates PDF receipts and gift cards client-side with jsPDF, reconciles the till register, and syncs stock to WooCommerce automatically. Each depositor has a personal view of their inventory and earnings. Notifications fire over Discord and email when a depositor's item sells. Built with Vue 3, Ant Design Vue 4, Chart.js, Node.js Express, and MongoDB (20 models, 12 route modules).

Overview

The Affluence Dashboard is the operational backbone of Affluence Store — a sneaker and collectibles resale business in Strasbourg. What started as a need to replace spreadsheets grew into a full business management platform covering every financial and inventory workflow: stock intake, in-store sales, depositor management, payouts, gift cards, till reconciliation, and customer receipts — all from a single authenticated web app.

The platform serves two distinct user groups: store staff who process daily operations (sales, receipts, stock), and depositors — sellers who place their items for sale in the store — who each have their own view of their inventory, pricing, and earnings. Notifications flow automatically via Discord webhooks and email whenever a depositor's item sells.

The backend manages 20 MongoDB models across 12 route modules, integrates with WooCommerce for e-commerce sync, StockX for pricing data, and generates PDFs for receipts and gift cards on the fly using jsPDF.

Screenshots

Dashboard home — overview
Inventory management table
Stats — Chart.js analytics
Receipt PDF preview
Till cash management
Gift card generation

Key Features

📦

Inventory Management

Full stock lifecycle tracking — intake, on-hold, sold, returned, withdrawn. Every state change is logged with timestamps and user attribution for a complete audit trail.

🧾

PDF Receipt Generation

In-store purchase receipts generated client-side with jsPDF. Branded templates with item details, price, date, and store information — ready to print or email instantly.

🎁

Gift Card System

Issue, track, and redeem gift cards. Usage history is maintained per card. PDF gift cards with QR codes or codes generated on demand for print or digital delivery.

💰

Depositor Payouts

When a depositor's item sells, the system calculates their earnings based on agreed commission, marks the payout, and sends a Discord + email notification automatically.

🏧

Till Cash Management

Track register float, cash-in, cash-out, and end-of-day reconciliation. Verification history lets managers audit discrepancies without paper records.

📊

Analytics & Stats

Chart.js-powered dashboards for sales volume, revenue trends, top-performing categories, and depositor performance. Data visualised across configurable time ranges.

🔗

WooCommerce Sync

Bidirectional sync with the WooCommerce storefront via REST API. Products added in the dashboard are queued and pushed to the online store automatically.

💹

StockX Integration

Live pricing data pulled from StockX API with token caching. Staff can check current market value of any sneaker directly in the dashboard while processing stock.

📧

Email Notifications

Nodemailer SMTP for transactional emails — sale confirmations to depositors, account verification, and password reset flows. Branded HTML email templates.

📱

PWA Support

Progressive Web App manifest and service worker — installable on iOS and Android for staff working on the shop floor without always opening a browser.

🔐

Auth — Email + Discord

Email/password with verification flow, plus Discord OAuth. Password reset via email. JWT cookies secure all authenticated routes. Role-based access controls.

📋

StockX CSV Tool

Import/export utility for bulk listing preparation on StockX. Converts internal inventory data to the CSV format required by StockX's bulk listing tool.

Tech Stack

Vue 3Composition API; lazy-loaded dashboard shell with 12 feature components conditionally rendered based on sidebar selection
Ant Design Vue 4Tables, forms, modals, notifications, date pickers — consistent enterprise UI with minimal custom CSS overhead
Chart.js + vue-chartjsLine, bar, and doughnut charts for the stats dashboard — configured with responsive options and custom tooltips
jsPDFClient-side PDF generation for receipts and gift cards — no server round-trip, no PDF library dependency on backend
Node.js + Express 5REST API with 12 route modules, JWT middleware, CORS configured per environment
MongoDB + Mongoose 920 models covering every business entity — products, transactions, payouts, gift cards, till state, WooCommerce sync queue
WooCommerce REST APIProduct sync with the public e-commerce storefront via official WooCommerce REST client
NodemailerSMTP email service for transactional emails with HTML templates for depositor notifications and auth flows

Data Model

Core
User
Product
Category
Inventory States
ProductSold
ProductOnHold
ProductReturn
ProductWithdraw
ProductEdit
Financial
Transaction
Payout
Purchase
GiftCard
GiftCardHistory
Till / Register
TillCash
TillCashHistory
TillCashVerification
Integrations
WcSyncQueue
StockXData
StockXToken

Architecture Highlights

Single-Shell Dashboard Pattern

The authenticated area renders a single /dashboard shell component that conditionally mounts feature components based on the selected sidebar category. Code splitting via Vite's manual chunk configuration separates the dashboard, login, and vendor bundles — users only download what they navigate to.

Client-Side PDF Without a Server

Receipts and gift cards are generated entirely in the browser using jsPDF. This eliminates a server round-trip, removes any PDF rendering dependency from the backend, and allows offline generation once the PWA is installed. Templates are implemented as JS functions that draw directly onto the jsPDF canvas.

Notification Service Layer

All outbound notifications (email, Discord webhook) are abstracted into a services/notification/ layer with separate modules for each channel. Discord embeds have dedicated admin and user template sets. Email uses HTML templates. Business logic calls the service, not the transport directly — swapping channels requires no changes to the feature code.

WooCommerce Sync Queue

Product updates to WooCommerce are queued in a MongoDB collection rather than fired synchronously. A background worker processes the queue and retries failed syncs. This prevents slow WooCommerce API responses from blocking the staff UI and ensures eventual consistency between the internal system and the online store.