feat(notes): add per-user transcript, summary & live-recording storage tables - #6
Open
Rahulkaushik01 wants to merge 3 commits into
Open
feat(notes): add per-user transcript, summary & live-recording storage tables#6Rahulkaushik01 wants to merge 3 commits into
Rahulkaushik01 wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
notesDjango app with the database schema to store meeting titles,AI summaries, and live-recording transcripts server-side, scoped per user.
DB layer only — no API/endpoints or runtime behavior change yet; purely additive.
Why
Today transcripts are fetched live from Attendee and never persisted for the desktop
app's users, and meeting "titles" are just URLs. We need durable, per-user storage so a
user sees their meetings on any device, plus a home for LLM-generated titles/summaries
and for live-recording transcripts (which never go through Attendee bots).
What we built — 4 tables (new
notesapp)Bot(bot only), summary_state, soft-delete.Utterance).Bot transcripts are pointed to (
Meeting.bot), not copied — only new data (titles,summaries, live transcripts) is stored.
Key decision — real FK to
AppUservs a plain/composite user keyMeeting.owner → AppUser(FK,ON DELETE CASCADE) instead of a plainuser_idcolumn ora composite
(user_id, meeting_id)key. Why it's better:vanish automatically (the "user removed → no leftover data" guarantee, enforced by the DB,
not by app code).
owner_idis an indexed integer — identical query speed to a plain column.would force every child row (incl. high-volume
LiveUtterance) to carryuser_id, bloatingstorage/indexes and joins.
Conventions followed
notesapp — additive only; no existing table is altered.object_id+ prefix (usr_/mtg_/sum_) via the samesave()generator,created_at/updated_at,IntegerChoices(states) /TextChoices(types); the line model
LiveUtterancehas noobject_id(likeUtterance).Edge cases handled at the schema level
source_uuidunique per meeting (a client session-idcollision across meetings can't overwrite another meeting's line).
(meeting, timestamp_ms, id)tiebreaker (mic + system share one clock).(owner, bot)uniqueness excludes soft-deleted rows, so are-fired webhook doesn't hit a unique violation.
transcription/text+failure_data.delete_data—Meeting.botisSET_NULL(row + summary remain).(App-logic edge cases — upsert order, summary-job lifecycle, etc. — come with the follow-up
endpoint PR.)
Files changed
notes/models.py— the 4 modelsnotes/migrations/0001_initial.py— initial migration (depends onbots 0087)notes/apps.py,notes/admin.py,notes/__init__.py,notes/migrations/__init__.pyattendee/settings/base.py— add"notes"toINSTALLED_APPSversion.json—1.49.0 → 1.50.0(minor, per Conventional Commitsfeat)Testing & safety
Applying notes.0001_initial… OK.CreateModel/AddIndex/AddConstraint; noAlterField/DeleteModel/RunSQL, so it cannot affect existingbots/accountsdata.manage.py migrate --noinput,k8s/app/web/deployment.yaml).Risk / backwards compatibility
botsmigrations through0087(present ondev/prod).Follow-up (not in this PR)
Auth-server integration:
AppUserupsert-on-login, Attendee webhook →Meetingingestion,POST /stt/transcribe(live audio → ElevenLabs →LiveUtterance), read endpoints, LLM summary job.Checklist
version.jsonbumped (minor)