Development Cycle
Estudo Organizado follows the PDCA Cycle (Plan-Do-Check-Act) not just as a feature, but as a development philosophy:- Plan - Identify what needs to be changed
- Do - Make the changes in your code editor
- Check - Test in the browser
- Act - Debug and refine
Making Changes
Quick Iteration Process
Refresh Browser
Since there’s no build process, simply refresh your browser (F5 or Ctrl/Cmd+R) to see changes immediately.
For Service Worker changes in
sw.js, you may need to:- Open DevTools > Application > Service Workers
- Click “Unregister” and refresh
- Or use “Update on reload” during development
Hot Reload Alternative
While the app doesn’t have built-in hot reload, you can use browser extensions:- LiveReload for Chrome/Firefox
- Live Server VS Code extension
Testing Strategies
Browser DevTools Testing
Console Debugging
Console Debugging
Use the Console tab to:
Network Tab
Network Tab
Monitor network activity:
- XHR/Fetch requests to external APIs (Google Drive, Cloudflare)
- Static assets loading (CSS, JS, images)
- Service Worker cache hits vs. network requests
Look for failed requests (red status codes) or slow-loading resources.
Application Tab
Application Tab
Inspect PWA features:
- Manifest - Verify PWA configuration
- Service Workers - Check registration and cache
- Storage > IndexedDB - Inspect local database
- Storage > Local Storage - View settings and tokens
- Cache Storage - See cached assets
Sources Tab
Sources Tab
Debug JavaScript:
- Set breakpoints by clicking line numbers
- Use debugger statement in code
- Step through code execution
- Inspect variable values in scope
Testing IndexedDB Operations
To test data persistence:Testing Responsive Design
Open Device Toolbar
Press
Ctrl+Shift+M (Windows/Linux) or Cmd+Shift+M (Mac) to toggle device emulation.Test Different Viewports
Select from preset devices:
- Mobile: iPhone SE, Samsung Galaxy
- Tablet: iPad, iPad Pro
- Desktop: Responsive mode with custom dimensions
Debugging Common Issues
Service Worker Not Updating
Problem: Changes tosw.js not reflecting in browser.
Solution:
Unregister & Refresh
Click “Unregister” next to the service worker, then hard refresh (Ctrl+Shift+R)
IndexedDB Data Corruption
Problem: Application shows errors related to database operations. Solution:Modal Not Opening
Problem: Clicking buttons doesn’t open modals. Solution:- Check Console for JavaScript errors
- Verify event delegation is working (check
data-actionattributes) - Inspect CSS - modal might be hidden by
display: noneorz-indexissues
Styles Not Applying
Problem: CSS changes not visible. Solution:- Hard refresh (Ctrl+Shift+R) to bypass cache
- Check CSS specificity - more specific selectors override general ones
- Verify CSS custom properties are defined in
:root - Use Computed tab in DevTools to see final applied styles
Testing Features End-to-End
Study Session Flow
Start Session
- Click “Study Organizer” in sidebar
- Click “Iniciar Estudo” button
- Fill in event details (subject, duration, type)
- Start timer
Cloudflare Sync Testing
Requires Cloudflare Worker setup. See
docs/CLOUDFLARE-SETUP.md in the source.Monitor Network
DevTools > Network tab:
- Watch for POST requests to Worker URL
- Check request/response payloads
- Verify sync status updates
Performance Testing
Lighthouse Audit
Review Metrics
Check PWA score:
- Performance: Should be 90+
- Accessibility: Should be 90+
- Best Practices: Should be 90+
- SEO: Should be 80+
- PWA: Should pass all checks
Performance Profiling
Git Workflow
Recommended Branching
Commit Message Conventions
Follow the project’s style:Best Practices
Use Console Logs Sparingly
Remove debug logs before committing. Use a consistent prefix for easy cleanup:
Test Offline Mode
Always test PWA offline functionality:
- DevTools > Network > “Offline”
- Refresh page
- Verify app still loads
Respect Vanilla JS
Don’t introduce frameworks or heavy dependencies. Keep the app lightweight and framework-free.
Check Browser Compatibility
Test on multiple browsers:
- Chrome/Edge (Chromium)
- Firefox
- Safari (if available)
Code Style Guidelines
JavaScript
- Use ES6+ features (arrow functions, destructuring, async/await)
- Prefer const over let, avoid var
- Use template literals for strings with variables
- Follow camelCase for variables and functions
CSS
- Use CSS custom properties for theming
- Follow BEM-like naming for classes
- Keep selectors low specificity
Next Steps
You’re now ready to contribute! Check out:- Project Structure - Deep dive into the codebase
- Environment Setup - Get your environment ready
- GitHub Issues - Find tasks to work on