Follow these steps in order to finalize the implementation and bring the new features live.
I have created the SQL migration file, but it must be applied to your live Supabase instance.
- Go to your Supabase Dashboard.
- Open your project:
haimjeaetrsaauitrhfy. - Go to the SQL Editor.
- Create a new query and paste the contents of:
supabase/migrations/20260411000000_niche_localization_trust.sql - Click Run.
This will secure the
verifiedcolumn and create the Group/Branch aggregation view.
We need to retroactively link your existing 194+ listings into Parent/Branch structures based on the brand names.
- Open your terminal in the root directory.
- Ensure your
.envfile hasSUPABASE_SERVICE_ROLE_KEY(required for bulk updates). - Run the following command:
python3 web/tstr-automation/fix_hierarchy.py
- Verify the output logs to see listings being linked to their respective Groups (e.g., SGS, Intertek).
The new dynamic routes (/company, /group, and the specialized PSEO routes) need to be built and deployed to Cloudflare.
- Navigate to the frontend directory:
cd web/tstr-frontend - Run a production build to verify there are no TypeScript or Astro errors:
npm run build
- Deploy to Cloudflare Pages (usually automatic via Git push, or use
npx wrangler pages deploy dist).
Once deployed, verify the following URLs on your live site:
- Group Page:
https://tstr.directory/group/sgs(Verify it shows branches). - Company Page:
https://tstr.directory/company/[any-slug](Verify the compliance matrix table). - PSEO Intersection:
https://tstr.directory/hydrogen-testing/ISO-17025/global(Verify it filters correctly). - Trust Badges: Ensure the "🛡️ TSTR Verified" badge appears only on labs where you have manually set
verified = truein the DB.
If any of the Python scripts fail due to missing dependencies, run:
pip install -r web/tstr-automation/requirements.txt