How bsitcmu-26-27/shuna-backend works
Shuna Backend is the CMU BSIT booth’s freedom-wall backend. Visitors submit text posts, optionally with an image; the backend verifies Turnstile, compresses and stores images, saves post data, and serves posts and reactions. Administrators can open the served admin page and use post-management endpoints. The sampled source shows the API and storage calls; README-listed frontend changes describe a separate client and are not mapped as backend components.
Main entry points: main.py Post endpoints · admin.py Admin page route · app.py Bottle application · captcha.py Turnstile verification
Components 13
HTTP API
- Bottle application
app.py - Post endpoints
main.py
Post Processing
- Turnstile verification
captcha.py - Image compression
image_compress.py - Runtime configuration
config.py
Persistence
- Image storage helper
storage.py - Post database
- S3 object storage
Administration
- Admin page route
routes/admin.py - Admin page template
index.html
Other components
- Visitor
- Administrator
- Cloudflare Turnstile
Connections 16
- Visitor → Bottle application: sends requests
- Bottle application → Post endpoints: dispatches routes
- Post endpoints → Turnstile verification: checks submissions
- Turnstile verification → Runtime configuration: reads secret
- Turnstile verification → Cloudflare Turnstile: verifies token
- Post endpoints → Image compression: compresses upload
- Post endpoints → Image storage helper: uploads image
- Image storage helper → S3 object storage: writes object
- Post endpoints → Post database: reads and writes posts
- Post endpoints → Image storage helper: builds image URL
- Administrator → Bottle application: requests admin
- Bottle application → Admin page route: dispatches route
- Admin page route → Admin page template: reads template
- Admin page route → Runtime configuration: reads backend URL
- Admin page route → Administrator: serves page
- Post endpoints → Visitor: returns post data