GOOBY - Closing Store Marketplace
Defines a full-stack marketplace app for discovering closing retail stores in NY/NJ/CT/PA, with automated closure scanning and admin review.
What this file does
Defines a full-stack marketplace app for discovering closing retail stores in NY/NJ/CT/PA, with automated closure scanning and admin review.
When to use it
- Building a regional marketplace for distressed inventory
- Creating an automated store-closure discovery system using news and social media
- Starting a React + Express project with Base44 backend and multiple third-party integrations
Assumes this stack
GOOBY - Closing Store Marketplace
A marketplace platform for discovering and purchasing inventory from closing retail stores, focused on the NY, NJ, CT, and PA areas.
Tech Stack
- Frontend: React 18 + Vite 6
- Styling: Tailwind CSS + shadcn/ui (Radix UI)
- Routing: React Router v6
- State/Data Fetching: TanStack Query v5
- Backend/Auth/DB: Base44 SDK (managed platform)
- Backend API Server: Express.js (port 3001)
- AI: xAI/Grok (via OpenAI-compatible API)
- SMS: Twilio
- Email: Resend
- News: NewsAPI
- Scheduling: node-cron (automated scans)
- Maps: React Leaflet
- Payments: Stripe
- Animations: Framer Motion
Project Structure
├── server/ # Express.js backend server
│ ├── index.js # Main server entry, API routes
│ ├── xai.js # xAI/Grok integration (chat, vision)
│ ├── closureScanner.js # Automated store closure discovery (news, X, web)
│ ├── twilio.js # Twilio SMS integration
│ ├── resend.js # Resend email integration
│ └── newsapi.js # NewsAPI integration
├── functions/ # Base44 serverless/edge functions (TypeScript)
├── src/
│ ├── api/
│ │ ├── base44Client.js # Base44 SDK config
│ │ └── services.js # Frontend API client for backend services
│ ├── components/ # React components (admin, buyer, seller, ui)
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Auth context, query client, utils
│ ├── pages/ # Route-level page components
│ └── utils/ # Helper functions
├── public/ # Static assets (gooby-logo.png)
├── index.html
├── vite.config.js
├── tailwind.config.js
└── package.json
Development
- Start:
npm run dev(runs backend on port 3001 + Vite frontend on port 5000) - Build:
npm run build - Vite proxies
/api/*requests to the backend server
API Endpoints
GET /api/health- Health checkPOST /api/xai/chat- xAI/Grok chat (body:{messages, model?, maxTokens?})POST /api/xai/analyze-image- xAI vision (body:{imageUrl, prompt?})POST /api/twilio/sms- Send SMS (body:{to, body})POST /api/resend/email- Send email (body:{from?, to, subject, html?, text?})GET /api/news/search?q=...- Search news articlesGET /api/news/headlines- Get top headlinesPOST /api/scanner/run- Trigger a manual closure scanGET /api/scanner/status- Get scanner status and historyGET /api/scanner/results- Get last scan results
Required Secrets
XAI_API_KEY- xAI/Grok API keyGROK_API_KEY- Grok API key (alias)TWILIO_ACCOUNT_SID- Twilio Account SID (must start with "AC")TWILIO_AUTH_TOKEN- Twilio Auth TokenTWILIO_PHONE_NUMBER- Twilio phone numberRESEND_API_KEY- Resend API keyNEWSAPI_KEY- NewsAPI key
Replit Configuration
- Frontend server:
0.0.0.0:5000withallowedHosts: truefor proxy compatibility - Backend server:
localhost:3001 - Workflow: "Start application" →
npm run dev - Deployment: Autoscale (build:
npm run build, run:node server/index.js)
Notes
- This app uses the Base44 platform for authentication, database entities, and serverless functions
- The Base44 SDK requires the app to be registered on the Base44 platform for full functionality
- 404 errors from the SDK in development are expected when not connected to a Base44 app context
- Twilio initialization is lazy - it only validates credentials when an SMS is actually sent
- Frontend uses
src/api/services.jsto call backend API endpoints - Automated closure scanning runs daily: full scan at 7am EST (12:00 UTC), partial scan at 12pm EST (17:00 UTC)
- Full scan: all NewsAPI queries + all 5 X queries + all 4 Facebook queries + 5 web queries; Partial scan: news + 2 X queries + 1 Facebook query + 2 web queries
- Scanner searches NewsAPI, X (Twitter), Facebook Marketplace, and general web via Grok for store closures in NY/NJ/CT/PA
- Manual scans via POST /api/scanner/run with optional
{ mode: "full" | "partial" } - Discovered closures are returned via API (not auto-saved to DB — admin review step)
What's inside
Project structure, tech stack, 12 API endpoints, 8 required secrets, and cron schedule for automated scans
Change this for your project
- Replace
TheCiege23/goobywith your own repository name - Replace
gooby-logo.pngwith your own logo filename - Replace
NY, NJ, CT, and PAwith your target regions - Replace
7am EST (12:00 UTC)and12pm EST (17:00 UTC)with your desired scan times
Where it goes
Keep it in your repository where the agent or team that needs it will read it.
Worth borrowing
- Lazy initialization of third-party SDKs (Twilio) to avoid errors during development
- Separating automated scanner logic from API routes for maintainability
- Using a proxy in Vite config to forward API requests to the backend server
Related Documents
Lua Code Obfuscator/Deobfuscator
Provides a full-stack web app for obfuscating and deobfuscating Roblox Lua scripts with a Monaco editor and PostgreSQL storage.
GREEN NODE - Project Overview
Describes a full-stack recycling platform with three runtime modes, provider architecture, and development scripts for Cochabamba, Bolivia.
ADN Systems DMR Peer Server
Documents a forked FreeDMR server for amateur radio DMR voice/data routing with bridges, proxies, scheduled voice announcements, and centralized security.