How ivandelacruz14/rainchem-fullstack works
Rainchem is a motorcycle-parts and lubricant storefront with a React client, Flask API, MySQL persistence, and an admin dashboard. The main customer journey is browsing products or services, building a cart, checking out, then tracking an order and viewing its receipt; admins manage orders and catalog content. The README also documents bulk pricing, payment options, Google sign-in, and a knowledge-base chatbot. Some route and service implementations were not excerpted, so uncertain backend call links are omitted or marked unverified.
Main entry points: client.js API client · App.jsx Route app · orders.py Order and payment API · order.py Domain models
Components 27
Customer storefront
- Route app
frontend/src/App.jsx - Browse catalog
frontend/src/pages/Services.jsx - Cart and pricing
frontend/src/context/CartContext.jsx - Checkout
frontend/src/pages/Checkout.jsx - Account journey
frontend/src/pages/account - Payment and receipt
frontend/src/pages/OrderSuccess.jsx - Customer authentication
frontend/src/context/AuthContext.jsx - API client
frontend/src/api/client.js
Admin operations
- Admin dashboard
frontend/src/admin/pages/Orders.jsx - Knowledge and chat monitor
frontend/src/admin/pages/Knowledge.jsx - Admin authentication
frontend/src/context/AdminAuthContext.jsx
Backend services
- Product API
backend/app/routes/products.py - Order and payment API
backend/app/routes/orders.py - Customer auth API
backend/app/routes/auth.py - Admin API
backend/app/routes/admin_orders.py - Chat API
backend/app/routes/chat.py - Pricing rules
backend/app/services/pricing.py - Knowledge retrieval
backend/app/services/rag.py - Payment integration
backend/app/services/paymongo.py - Receipt service
backend/app/services/receipt_service.py - Email notifications
backend/app/services/email_service.py - Google sign-in
backend/app/services/google_auth.py
Domain data
- Domain models
backend/app/models/order.py - MySQL database
Other components
- Customer
- Mailjet
- Google identity
Connections 31
- Customer → Route app: uses
frontend/src/App.jsx - Route app → Browse catalog: routes to
frontend/src/App.jsx - Route app → Checkout: routes to
frontend/src/App.jsx - Route app → Account journey: routes to
frontend/src/App.jsx - Route app → Payment and receipt: routes to
frontend/src/App.jsx - Route app → Admin dashboard: routes to
frontend/src/App.jsx - Route app → Knowledge and chat monitor: routes to
frontend/src/App.jsx - Browse catalog → API client: fetches products
frontend/src/pages/Services.jsx - Checkout → Cart and pricing: reads cart
frontend/src/pages/Checkout.jsx - Checkout → API client: submits order
frontend/src/pages/Checkout.jsx - Cart and pricing → Pricing rules: mirrors pricing
README.md - API client → Product API: requests products
- API client → Order and payment API: requests orders
- API client → Customer auth API: requests auth
- API client → Admin API: requests admin
- API client → Chat API: requests chat
- Customer authentication → API client: restores session
frontend/src/context/AuthContext.jsx - Admin dashboard → API client: loads admin data
frontend/src/admin/pages/Orders.jsx - Admin authentication → API client: requests auth
frontend/src/context/AdminAuthContext.jsx - Product API → Domain models: uses product data
- Order and payment API → Pricing rules: calculates totals
- Order and payment API → Payment integration: starts payment
- Order and payment API → Receipt service: creates receipt
- Order and payment API → Email notifications: sends notifications
- Admin API → Receipt service: generates receipt
- Chat API → Knowledge retrieval: retrieves answers
- Knowledge retrieval → Domain models: uses knowledge data
- Email notifications → Mailjet: sends email
backend/app/services/email_service.py - Google sign-in → Google identity: verifies identity
- Domain models → MySQL database: persists records
- Receipt service → Domain models: stores receipts
backend/app/services/receipt_service.py