Skip to content

A wallpaper engine that turns life, year, and goal data into beautiful SVG/PNG wallpapers - built with Cloudflare Pages + Workers + resvg-wasm.

License

Notifications You must be signed in to change notification settings

aradhyacp/LifeGrid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

82 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

LifeGrid - Dynamic wallpapers that track your time, goals, and life progress

LifeGrid

Premium Dynamic Wallpapers for iOS and Android Lock Screens.

LifeGrid generates high-resolution, data-driven wallpapers that help you visualize your time, goals, and life progress directly on your iPhone or Android lock screen. Designed to sit perfectly between the time, widgets, and dynamic island.

Tech Stack

HTML5 CSS3 JavaScript Cloudflare Workers Zod

Features

  • Dynamic Visuals

    • Year Progress: 365 dots representing every day of the year. Active day highlighted.
    • Life Calendar: Every week of your life (up to 80+ years) in a single grid.
    • Goal Countdown: Circular progress tracker for your biggest targets.
  • Pixel-Perfect

    • Native resolution generation for all modern iPhones (13 mini to 16 Pro Max).
    • Smart layout adjustments for Notch vs Dynamic Island devices.
    • Retina-quality live previews (+10% contrast boost filter).
  • Architecture

    • Frontend: Lightweight Vanilla JS & CSS. No frameworks, instant load.
    • Backend: Serverless Cloudflare Worker with Rust-based SVG rendering (resvg).
    • Security: Strict Zod schema validation & XSS protection.

Screenshots

LifeGrid year progress wallpaper showing 365-day calendar grid LifeGrid life calendar wallpaper displaying weeks of life visualization
LifeGrid goal countdown wallpaper with circular progress tracker LifeGrid wallpaper customization interface on iPhone lock screen

Getting Started

Prerequisites

  • Node.js & npm
  • Cloudflare Wrangler CLI (npm install -g wrangler)

Backend Setup (Cloudflare Worker)

Navigate to the worker directory and install dependencies:

cd worker
npm install

Run locally:

npx wrangler dev

Deploy to Cloudflare:

npx wrangler deploy

Frontend Setup

The frontend is a static site. You can serve it with any static file server.

# From project root
npx serve .

Open http://localhost:3000 to see the wallpaper generator.

Security

All inputs are sanitized and validated before processing:

  • Zod Schema: Ensures dimensions, colors, and dates strictly adhere to safe formats.
  • Output Encoding: Text inputs are XML-escaped to prevent injection.
  • Resource Limits: Max dimensions and memory usage capped to prevent DoS.

Supported Devices

Automatically adjusts for:

  • Dynamic Island: iPhone 14 Pro/Pro Max, 15 series, 16 series.
  • Notch: iPhone 13 series, 14/14 Plus.
  • Compact: iPhone 13 mini.

πŸ“ Project Structure

lifegrid/
β”œβ”€β”€ index.html          # Frontend (Apple-inspired dark theme)
β”œβ”€β”€ styles.css          # Black & white aesthetic with ruler borders
β”œβ”€β”€ app.js              # Card selection, preview, URL generation
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ countries.js    # 65+ countries with timezones
β”‚   └── devices.js      # Device resolution presets
└── worker/
    β”œβ”€β”€ wrangler.toml   # Cloudflare Worker config
    β”œβ”€β”€ package.json    # Dependencies (resvg-wasm)
    └── src/
        β”œβ”€β”€ index.js    # Main entry point
        β”œβ”€β”€ timezone.js # Timezone utilities
        β”œβ”€β”€ svg.js      # SVG generation helpers
        └── generators/
            β”œβ”€β”€ year.js # Year progress calendar
            β”œβ”€β”€ life.js # Life calendar (dots)
            └── goal.js # Goal countdown (circle)

πŸ”— API Reference

GET /generate?country=us&type=year&bg=000000&accent=FFFFFF&width=1179&height=2556
Param Description
country ISO 2-letter code (us, in, gb)
type year, life, or goal
bg Background color (hex without #)
accent Accent color (hex without #)
width Image width in pixels
height Image height in pixels
dob Date of birth for life calendar
lifespan Expected years (default: 80)
goal Target date for countdown
goalName Name of your goal

πŸ“± iOS Shortcut

  1. Copy your generated URL
  2. Open Shortcuts app
  3. New Shortcut:
    • Get Contents of URL β†’ paste URL
    • Set Wallpaper β†’ Lock Screen
  4. Automate to run daily at 6 AM

πŸ“± Android Setup

  1. Copy URL: Configure your wallpaper above and copy the generated URL
  2. Prerequisites: Install MacroDroid from Google Play Store.
  3. Setup Macro: Trigger: Date/Time β†’ Day/Time (00:01:00) β†’ Active all weekdays
  4. Configure Actions:
    • 4.1 Download Image
      Web Interactions β†’ HTTP Request (GET)
      Paste URL. Enable "Block next actions"
      Tick "Save response" β†’ /Download/lifegrid.png
    • 4.2 Set Wallpaper
      Device Settings β†’ Set Wallpaper
      Select /Download/lifegrid.png
      ⚠️ Use exact same filename
  5. Finalize: Give macro a name β†’ Tap Create Macro

Contribution

Contributions are welcome! If you have ideas for new features or bug fixes, please follow these steps:

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature/your-feature-name.
  3. Make your changes and commit them: git commit -m 'Add some feature'.
  4. Push to the branch: git push origin feature/your-feature-name.
  5. Submit a pull request.

Please ensure your code follows the existing style and includes appropriate tests.

Author

GitHub

⭐ Star This Repo

If you find this project useful, please consider giving it a star! It helps others discover the project.

License: Apache License 2.0


Made with ❀️ for mindful living

#ios #iphone #wallpaper #productivity #motivation #calendar #year-progress #life-grid #goal-tracking #cloudflare-workers #serverless #javascript #svg #design #minimalism

About

A wallpaper engine that turns life, year, and goal data into beautiful SVG/PNG wallpapers - built with Cloudflare Pages + Workers + resvg-wasm.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 8