A simple Cloudflare Worker application that generates random usernames and collects basic visitor information.
This project implements a Cloudflare Worker that:
- Serves a web interface with username generation functionality
- Collects visitor information (IP, geolocation, etc.)
- Sends notifications to an ntfy.sh channel when visitors access the site
- Username Generation: Provides a simple interface to generate random usernames
- IP Information: Uses ipinfo.io API to gather information about visitor IP addresses
- Notification System: Sends visitor data to a configured ntfy.sh channel
- Bootstrap UI: Implements a clean, responsive interface using Bootstrap 5
- Cloudflare Workers: Serverless JavaScript runtime
- Wrangler CLI: Development and deployment tool for Cloudflare Workers
- Bootstrap 5: Frontend framework for responsive design
- GitHub Actions: CI/CD for automatic deployment
- Clone the repository
- Install dependencies:
npm install- Start local development server:
wrangler devTo deploy the application manually:
wrangler deployThe project uses GitHub Actions for continuous deployment. Any push to the main branch triggers automatic deployment to Cloudflare.
The following environment variables need to be configured in your Cloudflare Worker:
ipinfo_token: API token for ipinfo.io servicentfy_token: Authentication token for ntfy.sh notifications
npm run start: Run the application locally using Wranglernpm run deploy: Deploy the application to Cloudflarenpm run update: Update dependencies to their latest versions
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). Created and maintained by kuba86