A mobile-responsive website for organizing and accessing past papers across multiple subjects and units, with PDF storage on Bunkr.
- Multiple subjects with unit organization (10+ subjects, ~6 units each)
- Mobile-first design with responsive PDF viewing
- Side-by-side papers and marking schemes
- Fast search and intuitive navigation
- Offline capabilities
- Performance monitoring
# Install dependencies
npm install
# Run development server
npm run dev
# Build for production
npm run build
# Start production server
npm start
We have comprehensive testing tools to ensure quality. See TESTING.md for detailed information.
# Run all tests and validations
npm run check-all
# Run specific test categories
npm run test:devices # Test device compatibility
npm run test:performance # Test performance metrics
npm run test:network # Test network conditions
npm run test:touch # Validate touch targets
npm run test:offline # Test offline functionality
# Simulate different network conditions
npm run network-sim 4g # Simulate 4G network
npm run network-sim slow-3g # Simulate slow 3G
# Validate implementation against requirements
npm run validate
- PDF load time < 3 seconds on 4G
- Maximum 2 taps to reach any paper
- Touch targets >= 44px
- Search response < 500ms
- Zero missing unit assignments
- 100% paper-scheme pairing accuracy
- Always run verification before committing:
npm run verify
- Test thoroughly on mobile devices:
- Touch interactions
- Swipe gestures
- Orientation changes
- Network conditions
- Offline mode
- Follow mobile-first approach:
- Design for mobile first
- Enhance for larger screens
- Test responsive breakpoints
- Verify touch targets
- Monitor performance:
- Use performance monitoring tools
- Check network requests
- Validate loading times
- Test under poor conditions
src/
├── app/ # Next.js app router
├── components/ # React components
├── lib/ # Data and utilities
├── hooks/ # Custom React hooks
├── types/ # TypeScript types
└── utils/ # Helper functions
scripts/
├── test-all.ts # Run all tests
├── verify.ts # Pre-commit verification
├── network-sim.ts # Network simulation
└── validate-implementation.ts # Requirements validation
tests/
└── **/*.test.tsx # Test files
- Update subject data in
src/lib/data/subjects.json
:
{
"subjects": {
"subject-id": {
"name": "Subject Name",
"units": [
{
"id": "unit1",
"name": "Unit Name",
"order": 1
}
],
"papers": [
{
"id": "paper-id",
"unitId": "unit1",
"year": 2024,
"session": "January",
"pdfUrl": "url-to-pdf",
"markingSchemeUrl": "url-to-scheme"
}
]
}
}
}
- Run validation:
npm run validate
The app includes built-in performance monitoring:
import { performanceMonitor } from "@/utils/performance";
// Log custom metrics
performanceMonitor.logMetric("custom-event", {
duration: 500,
details: "Additional info",
});
- Create a new branch
- Make changes
- Run verification:
npm run verify
- Run all tests:
npm run test:all
- Validate implementation:
npm run validate
- Submit pull request
- Always test on real mobile devices
- Verify touch target sizes (>= 44px)
- Test under various network conditions
- Check offline functionality
- Monitor performance metrics
- Keep PDF load times under 3 seconds
- Ensure proper error handling
- Maintain accessibility standards
If you encounter issues:
- Check test reports in
test-reports/
- Review console errors
- Verify network conditions
- Test on multiple devices
- Check performance metrics
- Read TESTING.md
This project is private and confidential.