Deployment
Quick Start (5 minutes)
Step 1: Create Google Sheet
- Navigate to https://sheets.google.com
- Create a new spreadsheet
- Name it:
Church Service Production – [VENUE] [YEAR]- Example:
Church Service Production – EXAMPLE CHURCH 2025
- Example:
Step 2: Open Apps Script Editor
- In your Google Sheet, select: Extensions > Apps Script
- You will see the Script Editor with an empty
Code.gsfile
Step 3: Copy the Script Files
-
Delete the default
Code.gs(click the bin icon) -
Create 6 new files (click + next to Files):
File 1: Config.gs
1. Click + > Script2. Name it "Config"3. Copy the ENTIRE contents from Config.gs4. PasteFile 2: Database.gs
1. Click + > Script2. Name it "Database"3. Copy the ENTIRE contents from Database.gs4. PasteFile 3: Views.gs
1. Click + > Script2. Name it "Views"3. Copy the ENTIRE contents from Views.gs4. PasteFile 4: UI.gs
1. Click + > Script2. Name it "UI"3. Copy the ENTIRE contents from UI.gs4. PasteFile 5: Triggers.gs
1. Click + > Script2. Name it "Triggers"3. Copy the ENTIRE contents from Triggers.gs4. PasteFile 6: Sync.gs
1. Click + > Script2. Name it "Sync"3. Copy the ENTIRE contents from Sync.gs4. Paste -
Save the project: Ctrl+S (or Cmd+S on Mac)
-
Name the project: Click on “Untitled project” at the top, name it
Church Service System
Step 4: First Run
- Close Script Editor (return to Google Sheet)
- Reload the page: Press F5
- After 5–10 seconds, you will see new menus at the top:
- 📋 System
- 📝 Posts
- 👥 People
- 🎬 Production
- 🔗 Integration
- ⚙️ Settings
Step 5: Bootstrap Database
- Select: 📋 System > 🚀 Bootstrap Database
- A dialogue appears: “This will create/reset the database structure…”
- Click Yes
- Wait 10–20 seconds
- You will see: “Success! Database initialised successfully.”
Step 6: Generate Views
- Select: 📋 System > 🔄 Generate All Views
- Wait 5–10 seconds
- You will see: “All views generated successfully!”
Complete
You now have:
- 7 hidden database sheets (
_DB_*) - 4 programme views (
Program 1–4) - 1 recording schedule
- 1 overview dashboard
- 1 credits list
Next Steps: Initial Configuration
Configure Programme Metadata
- Select: ⚙️ Settings > 📝 Edit Programme Metadata
- The sheet
_DB_Programopens (now visible) - Fill in rows 2–5 (Programmes 1–4):
| program_nr | location | start_date | broadcast_date | church_year | prod_nr | target_length_sec | start_time | notes |
|---|---|---|---|---|---|---|---|---|
| 1 | EXAMPLE CHURCH | 2025-01-30 | 2025-03-01 | 2nd Sunday in Lent | PROD-2025-001 | 2610 | 09:00:00 | |
| 2 | EXAMPLE CHURCH | 2025-01-30 | 2025-03-08 | 3rd Sunday in Lent | PROD-2025-002 | 2610 | 09:00:00 | |
| 3 | EXAMPLE CHURCH | 2025-01-30 | 2025-03-15 | 4th Sunday in Lent | PROD-2025-003 | 2610 | 09:00:00 | |
| 4 | EXAMPLE CHURCH | 2025-01-30 | 2025-03-22 | 5th Sunday in Lent | PROD-2025-004 | 2610 | 09:00:00 |
-
target_length_sec = target duration in seconds
- 43:30 = 2610 seconds
- 60:00 = 3600 seconds
-
When complete: Right-click on the sheet → Hide sheet
Add Your First Person
- Select: 👥 People > ➕ Add Person
- A dialogue opens (HTML form)
- Fill in:
- Name: Maria Löfgren
- Role: preacher, liturgist
- Contact: maria@example.com
- Type: contributor
- Click Create Person
Create Your First Post
- Navigate to the sheet Program 1
- Select: 📝 Posts > ➕ Add New Post
- Dialogue opens
- Fill in:
- Programme: 1 (already selected)
- Post type: Sermon
- Content: Sermon on hope and the future
- Contributors: Maria Löfgren
- Location: pulpit
- Recording day: Day 1 – Scripture Readings & Sermons
- Click Create Post
Your First Post Is Now Visible
- In the
Program 1sheet - Automatically assigned post ID: P1:1
- Default duration: 07:00 (7 minutes for a sermon)
- Rolling time: 07:00
Common Problems and Solutions
Problem: Custom menu does not appear after Bootstrap
Solution:
- Reload the page (F5)
- If still nothing: Go to Script Editor, select
onOpenfunction, click Run - Return to the Sheet and reload
Problem: “Database not initialised” error
Solution: Run 📋 System > 🚀 Bootstrap Database again
Problem: Views show no data
Solution:
- Verify that posts exist in
_DB_Posts - Run 📋 System > 🔄 Generate All Views
- Check that QUERY formulae in the views reference the correct sheets
Problem: Edits in views do not update the database
Solution:
- Check that triggers are installed
- Open Script Editor > Triggers (clock icon on the left)
- Verify that edit triggers exist
Problem: Authorisation prompt appears repeatedly
Solution:
- Clear browser cache
- Remove and re-authorise the script
- Check that you are using the same Google account
Deploying the API
Enable Web App Deployment
- Open Script Editor
- Click Deploy > New deployment
- Select type: Web app
- Configure:
- Description: Church Service API v1.0
- Execute as: Me
- Who has access: Anyone (for Companion) or Anyone with link
- Click Deploy
- Copy the Web app URL
Configure API Authentication
- In Script Editor, go to Project Settings (gear icon)
- Scroll to Script Properties
- Add property:
- Property:
API_SECRET - Value: Generate a strong random key
- Property:
- Save
Test the API
# Health check (no auth required)curl "YOUR_WEB_APP_URL?action=status"
# Get posts (requires auth)curl "YOUR_WEB_APP_URL?action=posts&program=1&api_key=YOUR_API_KEY"Setting Up Automatic Backups
- Select: 📋 System > 💾 Backup & Restore > ⏰ Enable Automatic Backup
- Backups will run at 03:00, 11:00 and 19:00 daily
- Files are saved to Google Drive folder:
Gudstjänst_Backups - Last 30 backups are retained
Deploying the 2026 Architecture
For teams requiring the advanced hybrid architecture (Supabase + Cloudflare Worker + iPad PWA), see ARCHITECTURE-2026.md.
Checklist
Pre-Production
- Database bootstrapped
- Views generated
- Programme metadata configured
- Contributors added
- Posts created for all programmes
- Recording days assigned
- API deployed (if using Companion)
- Automatic backups enabled
Recording Day
- Recording schedule printed/displayed
- All contributors present in system
- Status tracking tested
- Companion buttons configured (if applicable)
Post-Production
- All posts marked as recorded or approved
- Final backup taken
- Programme archived (optional)
Support
GitHub Issues: https://github.com/FiLORUX/the-public-service/issues
Documentation:
- README.md – Overview and user guide
- API.md – API documentation
- ARCHITECTURE-2026.md – Advanced architecture
- FAQ.md – Frequently asked questions