๐งช Local Testing Guide¶
Test Documentation and Legal Features Locally
๐ Quick Test (2 Commands)¶
Step 1: Start MkDocs Documentation Server¶
Open Terminal 1:
Access at: http://localhost:8001
Step 2: Start Main Application¶
Open Terminal 2:
Access at: http://localhost:5180
โ Testing Checklist¶
Test MkDocs Documentation (http://localhost:8001)¶
Open http://localhost:8001 in your browser:
- Home page loads with MagicON AI branding
- Complete User Guide link in navigation works
- Search bar appears and works
- Light/Dark mode toggle works (top right)
- Navigation sidebar shows all sections
- Complete User Guide shows all your content
- Mobile responsive (resize browser window)
Tips: - Use search to find topics (e.g., search "alternatives") - Click "Complete User Guide" to see full USER_GUIDE.md content - Try dark mode toggle in header - Test on mobile (Chrome DevTools โ Toggle device toolbar)
Test Legal Modals (http://localhost:5180)¶
Open http://localhost:5180 in your browser:
A. Test Disclaimer (First Visit):¶
Clear storage first:
1. Press F12 (open developer console)
2. Type: localStorage.clear()
3. Press Enter
4. Press F5 (reload page)
Test: - [ ] Disclaimer modal appears automatically - [ ] Must scroll to bottom before "I Agree" enabled - [ ] Click "Terms of Service" link โ Terms modal opens - [ ] Click "Third-Party Notices" link โ Licenses modal opens - [ ] Click "I Agree" โ Disclaimer closes and doesn't reappear
B. Test Footer Links:¶
Scroll to bottom of page:
Documentation: - [ ] Click "Documentation" - [ ] Opens http://localhost:8001 in new tab - [ ] Shows MkDocs documentation home page
Support: - [ ] Click "Support" - [ ] Opens email client with support@pcbgenerator.com
Terms: - [ ] Click "Terms" button - [ ] Modal opens with Terms of Service - [ ] Can scroll and read content - [ ] Click X or outside to close - [ ] Click "User Guide" link โ Opens localhost:8001
Privacy: - [ ] Click "Privacy" button - [ ] Modal opens with Privacy Policy - [ ] Shows data collection, GDPR compliance, etc. - [ ] Can close modal
Licenses: - [ ] Click "Licenses" button - [ ] Modal opens with Third-Party Licenses - [ ] Shows KiCad, component data, etc. - [ ] Can close modal
C. Test Nested Modals:¶
- Open app at http://localhost:5180
- Clear localStorage:
localStorage.clear()in console - Reload page โ Disclaimer appears
- Click "Terms of Service" link in disclaimer
- Terms modal should open ON TOP of disclaimer
- Close Terms modal โ Back to disclaimer
- Click "Third-Party Notices" link
- Licenses modal should open ON TOP of disclaimer
- Close Licenses modal โ Back to disclaimer
- Click "I Agree"
- Disclaimer closes
Test Component Features:¶
In http://localhost:5180:
- Navigate to RF Module Designer tab
- Phase 1: Enter requirements (2.4 GHz, 30 dBm, WiFi)
- Click "Continue to Phase II"
- Phase 2: Enable AI component selection
- Wait for chain to generate
- Test Info Icons:
- Hover VCO info icon โ Tooltip appears
- Hover Driver info icon โ Tooltip appears
- Hover PA info icon โ Tooltip appears
- Test Component Details:
- Click PA component
- See Specs, Reasoning, Alternatives tabs
- Check alternatives show pros/cons
- Expand "Scoring Details"
๐ง Troubleshooting¶
"MkDocs not found"¶
"Port 8001 already in use"¶
# Stop MkDocs
# Press Ctrl+C in the MkDocs terminal
# Or change port
mkdocs serve --dev-addr=localhost:8002
"Documentation link doesn't work"¶
- Make sure MkDocs server is running (http://localhost:8001)
- Check browser console for errors
- Try hard refresh (Ctrl + Shift + R)
"Legal modals don't open"¶
- Check browser console (F12) for errors
- Verify LegalPageModal.tsx exists
- Make sure Chakra UI Modal components are available
"Disclaimer doesn't show"¶
- Clear localStorage:
localStorage.clear() - Reload page
- Should appear immediately
"Changes not appearing"¶
- MkDocs: Auto-reloads (just save file)
- React app: Auto-reloads (just save file)
- If stuck: Hard refresh (Ctrl + Shift + R)
๐ What's Running¶
When both servers are running:
| Service | Port | URL | Purpose |
|---|---|---|---|
| MkDocs Docs | 8001 | http://localhost:8001 | Documentation preview |
| React Frontend | 5180 | http://localhost:5180 | Main application |
| FastAPI Backend | 8000 | http://localhost:8000 | API & exports |
๐ฏ Quick Test¶
Start the docs preview and the app in separate terminals:
# Terminal 1 โ MkDocs docs preview (port 8001)
mkdocs serve -a localhost:8001
# Terminal 2 โ main application (FastAPI 8000 + frontend 5180)
.\start-all-servers-windowed.ps1
Then open both URLs: - http://localhost:8001 (docs) - http://localhost:5180 (app)
๐ก Pro Tips¶
- Use two browser tabs:
- Tab 1: http://localhost:8001 (docs)
- Tab 2: http://localhost:5180 (app)
-
Test footer link jumps between them
-
Use incognito for disclaimer:
- Regular tab: Already accepted disclaimer
-
Incognito: Fresh session, shows disclaimer
-
Console is your friend:
F12โ Console tablocalStorage.clear()โ Reset disclaimer-
Check for any errors
-
Live reload works:
- Edit any .md file in docs/
- MkDocs auto-reloads
- Edit any .tsx file
- React auto-reloads
โ Ready to Test?¶
Run these in order:
-
Terminal 1:
Wait for: "Serving on http://localhost:8001/" -
Terminal 2:
Wait for: All servers started -
Browser:
- Visit http://localhost:5180
- Test legal modals (footer buttons)
- Click "Documentation" โ Opens localhost:8001
- Test all features!
That's it! Everything testable in local development! ๐
Using Claude Sonnet 4.5