
Internet

S3 Bucket
Static Web Hosting
Hosts the static HTML, CSS, JS files
Example setup:
aws s3 website s3://my-bucket --index-document index.html

CloudFront CDN
Content Delivery Network
Caches static files globally for faster access
Example setup:
aws cloudfront create-distribution --origin-domain-name my-bucket.s3.amazonaws.com
Token Auth Worker
Token Authentication
Validates requests and generates tokens
Sample code:
async fetch(request, env, ctx) {
async function setTokenBin(tokens)
}
async function handleRequest(request) {
// Token validation logic
return new Response(JSON.stringify({ token }))
}
Form Processing Worker
Handles form submissions
Processes input, validates, and sends response
Example:
async fetch(request, env, ctx) {
const data = await request.json();
// Process data
return new Response(JSON.stringify({ success: true }))
}

Mail Server
SMTP Server
Sends notification emails
Example config:
smtpHost = 'smtp.example.com'
smtpPort = 587
smtpUser = 'user@example.com'
smtpPass = 'yourpassword'