• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
khennie

khennie

Maendeleo_Badge_Generator

Public
Like
Maendeleo_Badge_Generator
Home
Code
3
frontend
1
README.md
H
index.ts
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
5/17/2025
Viewing readonly version of main branch: v7
View latest version
README.md

Badge Creator

A mobile-friendly web application that allows users to create custom badges by uploading their photos and placing them in a circular frame over a background image.

Features

  • Upload a photo (e.g., a face)
  • Display the uploaded photo in a circular frame
  • Automatically place the circular photo exactly where the green-bordered circle appears in the background image
  • Show a live preview of the final badge
  • Download the final composed image as a PNG

Technical Details

  • Built with HTML, CSS, and JavaScript
  • Uses HTML5 Canvas API for image composition
  • Mobile-responsive design
  • Served via Hono framework on Val Town
  • Dynamically positions the circular photo to match the green-bordered circle in the background image

How to Use

  1. Visit the application URL
  2. Click "Upload Your Photo" and select an image from your device
  3. See the live preview of your badge with your photo in a circular frame
  4. Click "Download Badge" to save the final image as a PNG

Implementation Notes

  • The circular image is positioned to exactly match the green-bordered circle in the background image
  • The position and size are calculated using relative coordinates to ensure proper alignment regardless of screen size
  • The preview adjusts automatically when the window is resized
  • The downloaded image maintains the exact positioning of the circular photo on the background image
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.