BLT-Sizzle

BLT Sizzle - Daily Check-in App πŸ“

A simple, secure daily check-in application built as a Cloudflare Python Worker. Track your progress, plan your day, and share your mood with your team via Slack or email notifications.

✨ Features

⚠️ Security Note: The current implementation uses base64 encoding as a placeholder for encryption. For production use with sensitive data, implement proper AES-GCM encryption using the Web Crypto API. See SECURITY.md for details.

πŸš€ Quick Deploy to Cloudflare Workers

Deploy to Cloudflare Workers

πŸ“‹ Prerequisites

πŸ› οΈ Manual Setup

1. Install Wrangler

npm install -g wrangler

2. Login to Cloudflare

wrangler login

3. Create D1 Database

wrangler d1 create checkin-db

Note the database ID from the output and update it in wrangler.toml:

[[d1_databases]]
binding = "DB"
database_name = "checkin-db"
database_id = "your-database-id-here"

4. Initialize Database Schema

wrangler d1 execute checkin-db --file=./schema.sql

5. Create KV Namespace (Optional)

wrangler kv:namespace create "KV"

Update the KV namespace ID in wrangler.toml:

[[kv_namespaces]]
binding = "KV"
id = "your-kv-id-here"

6. Set Encryption Key

Generate a secure encryption key and add it to your wrangler.toml:

[vars]
ENCRYPTION_KEY = "your-secure-random-key-here"

Or use secrets for production:

wrangler secret put ENCRYPTION_KEY

7. Deploy

wrangler deploy

Your app will be live at: https://blt-sizzle-checkin.your-subdomain.workers.dev

πŸ”§ Configuration

Slack Integration

  1. Go to your Slack workspace settings
  2. Create an Incoming Webhook
  3. Copy the webhook URL
  4. In the app, go to Settings and paste the webhook URL
  5. Set your preferred notification time and timezone
  6. Test the notification to ensure it works!

Email Notifications

Email notifications require additional setup with an email service provider. Configure your email service settings in the worker environment variables:

Supported providers:

πŸ“± Usage

Daily Check-in

  1. Visit your deployed app URL
  2. Fill out the form:
    • Previous Work: What you accomplished (auto-filled from last check-in)
    • Today’s Plan: What you plan to do today
    • Blockers: Any obstacles or challenges
    • Mood: Select an emoji that represents how you feel
  3. Submit and you’re done!

Notifications

The app will send you a reminder at your configured time with a link directly to the check-in form. Simply click the link and fill out your check-in!

πŸ”’ Security

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Browser Client β”‚
β”‚  (HTML/JS/CSS)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Python Worker  β”‚
β”‚  (index.py)     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β–Ό              β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ D1 Database  β”‚  β”‚ Slack/Email  β”‚
β”‚  (Encrypted) β”‚  β”‚ Notificationsβ”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“Š Database Schema

Users Table

Check-ins Table

πŸ›£οΈ API Endpoints

πŸ”„ Scheduled Notifications

To enable automatic daily notifications, add a cron trigger to your wrangler.toml:

[triggers]
crons = ["0 9 * * *"]  # Run at 9 AM UTC daily

Then implement the scheduled handler in your worker to check user notification times and send reminders.

πŸ§ͺ Development

Local Development

wrangler dev

This starts a local development server at http://localhost:8787

Testing

  1. Visit http://localhost:8787 in your browser
  2. Fill out a check-in form
  3. Check the settings page
  4. Test Slack notifications (requires valid webhook URL)

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“„ License

This project is part of OWASP BLT and follows the same license terms.

πŸ› Troubleshooting

Database not initializing

Slack notifications not working

Data not persisting

πŸ“ž Support

For issues and questions, please open an issue on GitHub or contact the OWASP BLT team.


Made with ❀️ by OWASP BLT