80bae5c3025f91115865be28e67f90461a4f49a1
Daily Form
Shared daily check-in form. Answers are global (no per-session state). Auto-snapshots to MongoDB at 10:00 AM Riga time.
Setup
1. MongoDB Atlas (free)
- Go to https://cloud.mongodb.com → create account → create a free M0 cluster
- Create a database user (Database Access → Add New User)
- Allow access from anywhere (Network Access → Add IP Address →
0.0.0.0/0) - Get connection string (Connect → Drivers) — looks like:
mongodb+srv://user:pass@cluster.mongodb.net/
2. Configure
cp .env.example .env
# Edit .env and paste your MongoDB URI
3. Run on saturn
# Copy files to saturn
scp -r . armandins@saturn:/opt/dailyform
# SSH in
ssh armandins@saturn
cd /opt/dailyform
docker compose up -d
Then add to Nginx Proxy Manager pointing to port 5000.
4. Editing questions
Edit questions.yaml and restart the container:
docker compose restart
The questions.yaml is mounted as a read-only volume so you edit it on the host, no rebuild needed.
Question types
| Type | Description | Extra fields |
|---|---|---|
yesno |
Yes / No buttons | — |
scale |
Slider | min, max, step |
number |
Number input | min, max |
duration |
H : MM input (stored as minutes) | — |
counter |
Big − / + buttons | min, max, step |
text |
Single line | — |
textarea |
Multi-line | — |
choice |
Single select pills | options: [...] |
multichoice |
Multi select pills | options: [...] |
Snapshots
Snapshots are stored in the snapshots MongoDB collection. View last 30:
GET /api/snapshots
Or browse directly in MongoDB Atlas UI → Collections → dailyform → snapshots.
Description
Languages
HTML
50%
CSS
37.5%
Python
10.3%
JavaScript
1.8%
Dockerfile
0.4%