CadeOLeo!Ver is a versioning schema for your little ones.
- Node.js (LTS version recommended)
- npm
npm install
bower install
The project includes automated tests to validate date calculations and versioning:
# Run test suite
npm testThe tests validate:
- Correct calculation of days until next birthday
- Date handling across different timezones
- Edge cases (birthday today, after birthday)
After installing dependencies, you can:
- Execute
npm run devto start the local development server (Vite) - Access the app at
http://localhost:5173 - Use the date picker to calculate versions
- Check Leo's version and countdown
You can simulate specific dates by passing URL parameters:
http://localhost:5173/?d1=YYYY-MM-DD&d2=YYYY-MM-DDd1: Birth date (e.g.,2015-10-22)d2: Current date to simulate (e.g.,2025-10-22)
Examples:
- Test birthday day:
http://localhost:5173/?d1=2015-10-22&d2=2025-10-22 - Test one day before birthday:
http://localhost:5173/?d1=2015-10-22&d2=2025-10-21 - Test custom dates:
http://localhost:5173/?d1=2015-10-22&d2=2025-12-25
This is useful for:
- Testing the birthday popover message ("É hoje!" / "It's today!")
- Validating date calculations without changing system time
- E2E test development and debugging
This project is built as a Progressive Web App, providing offline functionality and app-like experience.
The service worker and PWA features are managed automatically via Vite and vite-plugin-pwa:
- Offline support and asset caching
- Automatic manifest and service worker generation
- No manual sw-precache or Bower required
For PWA installation support:
- Web Manifest: Generated automatically in
dist/assets/manifest-*.webmanifest - Icons: Generated using Real Favicon Generator
The app works offline after the first visit:
- Service worker caches all essential assets
- Date calculations work without network
- Previously loaded versions are available
- New visits require connectivity
The project is hosted on GitHub Pages:
- Execute
npm run buildto generate the production files indist/ - Push the contents of
dist/to thegh-pagesbranch or configure GitHub Pages to serve from/docsor/dist - All static assets, manifest, and service worker are generated and ready for deployment
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Install dependencies (
npm install) - Make your changes
- Run tests to ensure everything works (
npm test) - Commit your changes
- Push to your branch
- Open a Pull Request