A Flask and React dashboard for vendor identity resolution and marketplace relationship analysis.
- Windows PowerShell
- Python 3.11 or newer
- Node.js LTS and npm
- MySQL 8.x with the MySQL client (
mysql.exe)
Open PowerShell in the repository root. If MySQL uses a password other than the default expected by the backend, set it in this terminal before running setup:
$env:DB_PASSWORD="your_mysql_password"
.\setup.ps1The script will:
- Create
.venvif needed and install the root Python requirements. - Create
main_dbif needed. - Import the committed legacy data dump.
- Create normalized and runtime tables from
backend/database/schema.sql. - Migrate legacy vendor/profile/PGP data into the normalized identity tables.
- Install frontend packages with
npm ci.
The data dump is large. To provision only an empty database schema, skip importing it:
.\setup.ps1 -SkipDataImportShadowBay and NightMarket are generated synthetic marketplaces and are not included in the legacy dump. Generate them explicitly after the baseline setup:
.\setup.ps1 -SkipDataImport:$false -GenerateSyntheticDo not run that option if you do not want synthetic records added to the database.
If PowerShell blocks scripts, enable locally for your user:
Set-ExecutionPolicy -Scope CurrentUser RemoteSignedIf mysql.exe is installed but not on PATH, setup.ps1 checks the standard MySQL and XAMPP installation folders. Otherwise install the MySQL client or add its bin directory to PATH.
Start the backend in one terminal:
cd backend
..\.venv\Scripts\Activate.ps1
python app.pyThe backend API runs at http://localhost:5000.
Start the frontend in a second terminal:
cd frontend
npm run devOpen the Local URL printed by Vite, normally http://localhost:5173.
If another Vite application already uses port 5173, run this project on another port:
npm run dev -- --port 5174The backend reads these environment variables:
DB_HOST(defaultlocalhost)DB_USER(defaultroot)DB_PASSWORD(defaultroot)DB_NAME(defaultmain_db)
These variables must be set in the terminal that starts the backend. Do not commit real passwords.
# Check the backend
Invoke-RestMethod http://localhost:5000/
# Check marketplace data
$mysql = "C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe"
& $mysql -u root -p -e "USE main_db; SELECT market_id, COUNT(*) AS vendors FROM vendors GROUP BY market_id ORDER BY market_id;"Expected synthetic marketplace IDs are 101 for ShadowBay and 102 for NightMarket.
Backend tests, from backend:
python -m unittest discover -s testsFrontend build, from frontend:
npm run buildMore focused notes are available in backend/README.md and frontend/README.md.