Skip to content

CadeOLeo/cadeoleo.github.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CadeOLeo!Ver

CadeOLeo!Ver is a versioning schema for your little ones.

Development

Prerequisites

  • Node.js (LTS version recommended)
  • npm

Installation

npm install
bower install

Testing

The project includes automated tests to validate date calculations and versioning:

# Run test suite
npm test

The tests validate:

  • Correct calculation of days until next birthday
  • Date handling across different timezones
  • Edge cases (birthday today, after birthday)

Running Locally

After installing dependencies, you can:

  1. Execute npm run dev to start the local development server (Vite)
  2. Access the app at http://localhost:5173
  3. Use the date picker to calculate versions
  4. Check Leo's version and countdown

Testing with Specific Dates

You can simulate specific dates by passing URL parameters:

http://localhost:5173/?d1=YYYY-MM-DD&d2=YYYY-MM-DD
  • d1: 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

Progressive Web App (PWA)

This project is built as a Progressive Web App, providing offline functionality and app-like experience.

Service Worker & PWA

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

Web Manifest & Assets

For PWA installation support:

  • Web Manifest: Generated automatically in dist/assets/manifest-*.webmanifest
  • Icons: Generated using Real Favicon Generator

Offline Support

The app works offline after the first visit:

  1. Service worker caches all essential assets
  2. Date calculations work without network
  3. Previously loaded versions are available
  4. New visits require connectivity

Building & Deployment

The project is hosted on GitHub Pages:

  1. Execute npm run build to generate the production files in dist/
  2. Push the contents of dist/ to the gh-pages branch or configure GitHub Pages to serve from /docs or /dist
  3. All static assets, manifest, and service worker are generated and ready for deployment

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Install dependencies (npm install)
  4. Make your changes
  5. Run tests to ensure everything works (npm test)
  6. Commit your changes
  7. Push to your branch
  8. Open a Pull Request

About

#CadeOLeo2015 #CadeOLeo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •