2.6 KiB
2.6 KiB
v2.0 Research: Architecture Notes
Date: 2026-05-15
Integration Points
Auth
Add a provider layer beside backend/internal/auth:
internal/auth/oauth.goorinternal/identity/user_identitiestable:iduser_idprovider(google,apple)provider_subjectemailemail_verifiedcreated_atupdated_at- unique
(provider, provider_subject)
Keep users and sessions authoritative. Social sign-in should finish by using the same session store used by email/password login.
Chat
Add:
tablo_messagestable:idtablo_idauthor_user_idbodycreated_atedited_atdeleted_at
GET /tablos/{id}/messagesrenders current message tab/history.POST /tablos/{id}/messagescreates a message and returns a message fragment.GET /tablos/{id}/messages/streamholds an SSE connection and streams new message fragments or JSON payloads.
For a single-host v2, an in-process hub keyed by tablo_id is acceptable. The database remains the source of truth; the hub is only a delivery accelerator. If multi-instance deployment arrives later, replace hub fanout with Postgres LISTEN/NOTIFY or Redis.
Etapes
Add:
etapestable withid,tablo_id,title,description,position, timestamps.tasks.etape_id nullable references etapes(id) on delete set null.- Keep existing
tasks.statusandtasks.position; etape grouping is orthogonal to kanban status.
This matches the constraint: only tasks may reference an etape, and etapes do not reference each other.
Events / Planning
Add:
tablo_eventstable withid,tablo_id,created_by_user_id,title,description,location,starts_at,ends_at, timestamps.GET /planningrenders current user's event list/calendar-like agenda.GET /tablos/{id}/eventsrenders a tablo events tab.- Event ownership initially follows tablo ownership. If shared tablos arrive later, planning aggregation should include events from tablos the user can access.
Phase Order
- Social sign-in first, because it touches the existing auth/session foundation and should be isolated from collaboration schema changes.
- Etapes next, because they extend existing tasks and can be tested without real-time concerns.
- Events/planning next, because they add a new core domain with straightforward CRUD.
- Chat last or near-last, because real-time delivery needs extra browser/manual verification and careful deployment behavior.
For roadmap ergonomics, chat can also be split into persistence first and real-time second.