Flagship study · self-hosted automation

Course deadlines arrive once, with the source kept in view.

A small asyncio service joins structured Classroom coursework with schema-checked extraction from free-text announcements, then tracks reminder windows in SQLite.

Classification
Studio automation system · production self-hosted daemon
Our role
Python systems architecture, bounded AI parsing and delivery automation
Surface
Google Classroom API · SQLite · Telegram bot · systemd
Boundary
Single-owner bot with an allowlist; not a multi-tenant SaaS product.

Evidence at a glance

Measured and documented scope.

24/7

Headless polling daemon

Stage 2 flagship case study §6.A, §6.D

30 min

Sync and reminder interval

Stage 2 flagship case study §6.A–B

24h + 2h

Reminder windows tracked per deadline

Stage 2 flagship case study §6.A, §6.D

7 scopes

Read-only Google OAuth permissions

Stage 2 flagship case study §6.A

The production and single-owner boundaries, reminder schedule, and OAuth allowlist are drawn from the Stage 2 case study. The service is a self-hosted daemon, not a multi-tenant web application.

The situation

From a broken hand-off to a bounded workflow.

Before

  • Announcements and due dates were scattered across multiple Classroom identities.
  • Expired OAuth tokens could stall unattended scripts that expected a browser login.
  • Repeated polling or unstructured model output could produce duplicate or inaccurate reminders.

After

  • A headless poller collects coursework and announcements across tracked accounts.
  • Official due-date fields are parsed deterministically; only free-text announcements reach Gemini with a JSON Schema.
  • SQLite reminder flags make each 24-hour or 2-hour alert one-time and actionable.

Executive snapshot

Classroom Sentinel: where the work sits today.

01

Operational problem

Course deadlines and announcements arrive across accounts, while unattended authentication and repeated polling can interrupt or duplicate reminders.

02

What we built

A headless poller, schema-constrained parser, and idempotent dispatcher route course deadlines into Telegram.

03

Release boundary

A self-hosted Google Classroom-to-Telegram daemon combines deterministic parsing of structured API dates with schema-constrained parsing for free-text announcements.

System architecture

Structured dates stay deterministic; AI only handles free-text announcements.

An auth guard protects the headless poller, while SQLite is the state boundary for deadline and reminder delivery.

100%
Google Classroom account tokens pass through a headless refresh guard into a 30-minute asyncio poller. Structured coursework goes to a deterministic parser; free-text announcements go to Gemini with schema constraints. SQLite stores deduplication and reminder flags before the allowlisted Telegram bot sends alerts.structuredfree textGoogle Classroom APIMultiple OAuth account tokensRefresh guard + pollerHeadless auth · asyncio · 30mCoursework parserNative title and due fieldsGemini classifierFree text only · JSON SchemaSQLite sentinel.dbDeduplication · reminder flagsTelegram botAllowlisted reminders and digests
Read the architecture in text

Google Classroom account tokens pass through a headless refresh guard into a 30-minute asyncio poller. Structured coursework goes to a deterministic parser; free-text announcements go to Gemini with schema constraints. SQLite stores deduplication and reminder flags before the allowlisted Telegram bot sends alerts.

  1. Google Classroom API: Multiple OAuth account tokens
  2. Refresh guard + poller: Headless auth · asyncio · 30m
  3. Coursework parser: Native title and due fields
  4. Gemini classifier: Free text only · JSON Schema
  5. SQLite sentinel.db: Deduplication · reminder flags
  6. Telegram bot: Allowlisted reminders and digests

Decisions that matter later

Three choices tied to the operating outcome.

01

Keep official coursework dates out of the language model

Structured assignment deadlines do not drift through generated date guesses.

02

Guard OAuth refresh for background execution

An expired token alerts the operator instead of opening a phantom browser or freezing the service.

03

Persist deduplication and reminder thresholds

Overlapping polling cycles do not send repeated alerts, and marking a task done silences later reminders.

Evidence record

What supports the published claims.

  • Privately verified

    The documented deployment is a single-owner daemon secured by a Telegram chat allowlist.

    Stage 2 flagship case study, section 6; honest release boundary.

A similar operational challenge?

Start with a scoped project review.

Choose an engagement and share the workflow, constraints and target timeline.

Discuss a project