How hankyung-toss-delta/sallae-malrae works
살래말래 is an impulse-purchase “cooling-off” service: users register a contemplated purchase, wait through a chosen cooling-off period, then decide whether to buy or pass. Passing updates savings statistics and the user’s level; the repository also includes account/session flows, a dashboard, and share views. The README provides only a brief product description, so some UI-to-API and dashboard data links are shown as unverified rather than asserted as inspected calls.
Main entry points: db.js MariaDB access · page.jsx Cooling-off list · route.js Item registration and listing · auth.js Session verification
Components 33
User experience
- Landing experience
src/app/page.jsx - Landing day state
src/contexts/LandingDayContext.jsx - Navigation and logout
src/components/layout/Header.jsx
Accounts and sessions
- Signup screen
src/app/auth/signup/page.jsx - Login screen
src/app/auth/login/page.jsx - Client auth state
src/contexts/AuthContext.jsx - Account creation
src/app/api/auth/signup/route.js - Login and tokens
src/app/api/auth/login/route.js - Token refresh
src/app/api/auth/refresh/route.js - Logout
src/app/api/auth/logout/route.js - Token middleware
src/middleware.js
Cooling-off lifecycle
- New purchase entry
src/app/coolingoff/new/page.jsx - Cooling-off list
src/app/coolingoff/page.jsx - Entry and decision UI
src/components/coolingoff/list/CoolingOffDetailPanel.jsx - Pending items UI
src/components/coolingoff/list/PendingItemsSection.jsx - Item registration and listing
src/app/api/items/route.js - Item deletion
src/app/api/items/[id]/route.js - Purchase decision
src/app/api/items/[id]/status/route.js
Progress and sharing
- Progress dashboard
src/app/dashboard/page.jsx - Dashboard content
src/components/dashboard/DashboardContent.jsx - Share token creation
src/app/api/share/token/route.js - Shared progress view
src/app/share/[shareToken]/page.jsx - Share presentation
src/components/share/ShareView.jsx
Application services
- Item status definitions
src/constants/status.js - Level calculation
src/lib/level.js - Session verification
src/lib/auth.js - JWT operations
src/lib/jwt.js - MariaDB access
src/lib/db.js - Image upload adapter
src/lib/gcs.js
Other components
- Visitor
- Signed-in user
- MariaDB
- Google Cloud Storage
Connections 42
- Visitor → Landing experience: opens
src/app/page.jsx - Landing experience → Landing day state: uses state
src/app/page.jsx - Landing experience → Navigation and logout: renders
src/app/page.jsx - Signed-in user → Signup screen: creates account
- Signed-in user → Login screen: signs in
- Signup screen → Account creation: submits signup
- Login screen → Login and tokens: submits credentials
- Login and tokens → MariaDB access: reads and writes
src/app/api/auth/login/route.js - Login and tokens → JWT operations: issues tokens
src/app/api/auth/login/route.js - Account creation → MariaDB access: creates account
src/app/api/auth/signup/route.js - Account creation → Session verification: validates inputs
src/app/api/auth/signup/route.js - Token refresh → MariaDB access: rotates token
src/app/api/auth/refresh/route.js - Token refresh → JWT operations: verifies and issues
src/app/api/auth/refresh/route.js - Logout → MariaDB access: clears session
src/app/api/auth/logout/route.js - Navigation and logout → Client auth state: calls logout
src/components/layout/Header.jsx - Token middleware → JWT operations: verifies token
src/middleware.js - Signed-in user → New purchase entry: registers purchase
- New purchase entry → Item registration and listing: submits item
- Signed-in user → Cooling-off list: reviews items
- Cooling-off list → Pending items UI: renders
src/app/coolingoff/page.jsx - Cooling-off list → Entry and decision UI: renders
src/app/coolingoff/page.jsx - Cooling-off list → Level calculation: uses level data
src/app/coolingoff/page.jsx - Cooling-off list → Item registration and listing: loads items
- Item registration and listing → Session verification: checks session
src/app/api/items/route.js - Item registration and listing → MariaDB access: reads and writes
src/app/api/items/route.js - Item registration and listing → Image upload adapter: uploads image
src/app/api/items/route.js - Image upload adapter → Google Cloud Storage: stores image
- Item deletion → Session verification: checks session
src/app/api/items/[id]/route.js - Item deletion → MariaDB access: deletes item
src/app/api/items/[id]/route.js - Purchase decision → Session verification: checks session
src/app/api/items/[id]/status/route.js - Purchase decision → MariaDB access: updates transaction
src/app/api/items/[id]/status/route.js - Purchase decision → Level calculation: calculates level
src/app/api/items/[id]/status/route.js - Purchase decision → Item status definitions: checks status
src/app/api/items/[id]/status/route.js - Signed-in user → Progress dashboard: views progress
- Progress dashboard → Dashboard content: renders
- Signed-in user → Share token creation: requests share link
- Share token creation → Session verification: checks session
src/app/api/share/token/route.js - Share token creation → MariaDB access: reads and writes
src/app/api/share/token/route.js - Visitor → Shared progress view: opens shared view
- Shared progress view → Share presentation: renders
- Share presentation → Level calculation: uses level data
src/components/share/ShareView.jsx - MariaDB access → MariaDB: queries
src/lib/db.js