This repository provides a lightweight starter implementation for the AI Product Trend Forecasting app described in Jobsss.txt. It includes:
- Node.js + Express mock API with watchlist limits, product search, and subscription tiers.
- Python Flask ML microservice that scores products using rank velocity, price momentum, and review growth.
- React Native (Expo) UI scaffolding with shared components for product display and trending dashboard.
cd backend
npm install
# Copy environment defaults
cp .env.example .env
npm run dev
# Run config tests
npm test
# Verify the health endpoint
curl http://localhost:4000/healthThe API exposes endpoints for health checks, mock authentication, subscription tiers, watchlist management, and product search/detail requests. Environment variables live in .env.example.
Key configuration flags:
PORT: Port used by the API (default4000).ALLOWED_ORIGINS: Comma-separated domains allowed by CORS. Leave blank to allow all during local development.WATCHLIST_*_LIMIT: Watchlist caps per subscription tier.MOCK_PRODUCT_COUNT: Number of mock products generated for demo search responses.
cd ml_service
python -m venv .venv --system-site-packages
source .venv/bin/activate
pip install -r requirements.txt # optional if dependencies are already available on the host
pytest
python app.pyThe /trend-score endpoint returns a computed score and label. /health reports service status.
cd mobile
npm install
npm startThe Expo app renders a dashboard of trending products using the ProductCard and TrendBadge components.
This codebase is a foundation and does not yet include production integrations (Stripe, Firebase, Redis, PostgreSQL, PA-API) or full scheduling. It is meant to illustrate the architecture, key endpoints, and UI building blocks for the full feature set in Jobsss.txt.
Run the bundled PowerShell script from an elevated (Administrator) terminal to install prerequisites with winget and set up each project workspace:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
./scripts/windows-installer.ps1Add -SkipMobile if you do not want to install the React Native / Expo dependencies on the first pass. After the script finishes you can start services with the standard commands shown in the output (e.g., cd backend && npm run dev, cd ml_service && .\.venv\Scripts\activate && python app.py).
If you want to validate the script from a non-Windows host or without making changes, use the dry-run mode:
./scripts/windows-installer.ps1 -DryRun -SkipMobile