cd xconfess-frontend
npm installnpm testExpected output:
PASS app/(dashboard)/admin/notifications/__tests__/page.test.tsx
PASS app/lib/api/__tests__/admin-notifications.test.ts
PASS app/lib/hooks/__tests__/useDebounce.test.ts
Test Suites: 3 passed, 3 total
Tests: 50+ passed, 50+ total
npm run dev- Open browser: http://localhost:3000
- Login as admin
- Navigate to: http://localhost:3000/admin/notifications
If backend is not running:
// In browser console
localStorage.setItem('adminMock', 'true');
// Refresh page- Sidebar with "Notifications" link
- Filter controls (Status, Date Range, Min Retries)
- Table with failed jobs
- Pagination controls
- Replay buttons
- Hamburger menu
- Stacked filters
- Card layout for jobs
- Touch-friendly buttons
- Change status dropdown
- Set date range
- Set minimum retries
- Watch results update (debounced)
- Click "Next" button
- Click "Previous" button
- See page numbers update
- Click "Replay" button
- Confirm in dialog
- Watch optimistic update
- See success feedback
- Disconnect network
- Try to load page
- See error message
- Click "Retry"
npm test -- page.test.tsxnpm test -- admin-notifications.test.tsnpm test -- useDebounce.test.tsnpm test -- --watchnpm test -- --coverage# Clear cache
npm test -- --clearCache
# Reinstall
rm -rf node_modules package-lock.json
npm install- Check backend is running
- Check API URL in .env.local
- Enable mock mode
- Check browser console
# Type check
npx tsc --noEmit
# Rebuild
npm run build-
Read Documentation
app/(dashboard)/admin/notifications/README.mdNOTIFICATIONS_DASHBOARD_IMPLEMENTATION.mdVISUAL_GUIDE.md
-
Review Code
- Start with
page.tsx - Check
admin.tsfor API methods - Look at test files for examples
- Start with
-
Customize
- Adjust filters
- Modify table columns
- Update styling
- Add features
-
Deploy
- Follow
DEPLOYMENT_CHECKLIST.md - Test on staging
- Deploy to production
- Follow
| File | Purpose |
|---|---|
page.tsx |
Main dashboard component |
admin.ts |
API client methods |
notification-jobs.ts |
Type definitions |
useDebounce.ts |
Debounce hook |
ConfirmDialog.tsx |
Confirmation dialog |
page.test.tsx |
Component tests |
- Use Mock Mode for frontend development
- Check Tests for usage examples
- Read Comments in code for context
- Use DevTools to debug issues
- Check Console for errors
- Dependencies installed
- Tests passing
- Dev server running
- Page loads successfully
- Can filter jobs
- Can paginate
- Can replay jobs
- No console errors
- Check browser console for errors
- Review test files for examples
- Read documentation files
- Enable mock mode to isolate issues
- Check
TROUBLESHOOTING.md(if exists)
The dashboard is now running and ready for development or testing.
Happy coding! 🚀
Time to Complete: ~5 minutes Difficulty: Easy Prerequisites: Node.js, npm, basic React knowledge