How shashwat230710/rift-mart works
1. Repository shape
RiftMart is split into three meaningful areas: a React/Vite frontend that presents the retro terminal experience, a Python payment service that handles wallet/receipt state, and two currently empty placeholders (backend/, agent/) for future services.
2. User-facing application
The active UI lives in frontend/. It is a client-side React app built with Vite and styled as a Windows XP / terminal-inspired interface. This is the main entry point for the shopping journey.
3. Frontend runtime and composition
frontend/src/App.jsx and main.jsx boot the app, while the UI is decomposed into stage-like components:
BootScreen, AsciiLogo, Conversation, Terminal, ShopAgent, PaymentModule, Receipt, and Shutdown.
The component names suggest a linear, state-driven experience that simulates an “OS” booting into an autonomous shopping session and then shutting down.
4. Frontend domain flow
The frontend is not a normal browse-and-click storefront. It is designed around a guided autonomous workflow:
boot → conversation/input → shopping agent activity → payment handoff → receipt display → shutdown.
The user provides only the shopping goal and budget; the rest of the interaction is presented as agent-driven progress.
5. Agent orchestration boundary
The Conversation, Terminal, and ShopAgent components form the UI boundary for the “AI agent” experience. They likely manage session state, log output, and step-by-step progress updates, even though no standalone agent implementation is present in the repo yet.
6. Payment subsystem
The only substantive backend-like code is in payment/. This is a Python service area with:
- api.py for the HTTP/API layer
- wallet.py for wallet/account logic
- receipt_generator.py for receipt creation
- requirements.txt for Python dependencies
This subsystem is separate from the frontend and appears to own transaction completion and record keeping.
7. Persistent payment state
payment/wallet.json and payment/transactions.json indicate local file-based persistence rather than a database server. This makes the payment layer stateful and lightweight, with receipts written to payment/receipts/ as text files.
8. Receipt/output artifact flow
Receipts are materialized as files such as RIFT-20260712-....txt. That suggests the payment flow ends in a durable transaction artifact that can be displayed back in the frontend via the Receipt component.
9. Backend placeholders
The backend/ directory is empty, so there is no implemented general-purpose application server in this snapshot. Any architecture diagram should show this as planned or absent, not as an active service.
10. Missing agent implementation
The agent/ directory is also empty, despite the README describing an autonomous shopping agent. So the repo currently contains the UI simulation of the agent workflow, but not a separate executable agent service.
11. Integration boundary
The intended integration line is between the frontend experience and the Python payment module. The frontend presents the autonomous shopping journey, and the payment service is the place where balances, transaction history, and receipts are created and stored.
12. Technology summary
The implemented stack is:
- React + Vite for the frontend
- Python + FastAPI for payment/API logic
- JSON/text files for local persistence of wallet, transactions, and receipts
No relational database or external commerce platform is present in the repository snapshot.
13. Architecture takeaway
For a diagram, the safest representation is: single-page retro shopping UI on the left, local Python payment/receipt service on the right, with empty placeholders for future backend/agent services. The project is currently more of a polished autonomous-commerce prototype than a fully wired multi-service system.
Main entry points: main.jsx App boot · api.py API layer · receipt_generator.py Receipt builder · BootScreen.jsx Boot screen
Components 16
Frontend
React/Vite terminal-style shopping experience
- App boot · Bootstraps the client app from main.jsx and App.jsx
frontend/src/main.jsx - Boot screen · Startup/boot sequence shown before the shopping flow
frontend/src/components/BootScreen.jsx - ASCII logo · Retro terminal branding and visual identity
frontend/src/components/AsciiLogo.jsx - Conversation · Captures the user goal and drives the guided interaction
frontend/src/components/Conversation.jsx - Terminal · Displays step-by-step progress and log-like output
frontend/src/components/Terminal.jsx - Shop agent · Represents autonomous shopping progress inside the UI
frontend/src/components/ShopAgent.jsx - Payment handoff · Front-end bridge into the payment subsystem
frontend/src/components/PaymentModule.jsx - Receipt view · Shows the completed transaction receipt to the user
frontend/src/components/Receipt.jsx - Shutdown · Ends the session with a terminal shutdown sequence
frontend/src/components/Shutdown.jsx
Payment
Python service for wallet state and receipts
- API layer · HTTP interface for wallet and transaction operations
payment/api.py - Wallet logic · Manages balances and account-like payment state
payment/wallet.py - Receipt builder · Creates receipt text artifacts from completed transactions
payment/receipt_generator.py - Local storage · JSON-backed persistence for wallet and transaction history
payment/wallet.json - Receipts files · Generated receipt text files saved on disk
payment/receipts
Connections 15
- App boot → Boot screen: starts · App entry begins the booted experience
- Boot screen → ASCII logo: shows · Boot sequence renders branding
- ASCII logo → Conversation: advances to · After boot, the user enters the guided flow
- Conversation → Terminal: logs into · Conversation feeds terminal-style session output
- Terminal → Shop agent: drives · Session state presents autonomous shopping progress
- Shop agent → Payment handoff: handoff · Shopping completion leads into checkout
- Payment handoff → API layer: calls · Frontend hands payment operations to the Python service
- API layer → Wallet logic: uses · API delegates balance and transaction logic
- Wallet logic → Local storage: persists · Wallet data is stored in JSON files
- API layer → Receipt builder: generates · Completed transactions are turned into receipt artifacts
- Receipt builder → Receipts files: writes · Receipts are saved as text files on disk
- Receipt builder → Receipt view: returns · Receipt output is surfaced back in the UI
- Receipt view → Shutdown: ends · The displayed receipt closes the session
- App boot → Backend: no implementation · General backend service is currently absent
- App boot → Agent: no implementation · Standalone agent service is currently absent