Add public session discovery endpoint (HAR-93)#40
Open
Conversation
GET /api/v1/sessions/public — no auth required, returns active sessions that hosts have marked as public via the "Public Access" toggle. Uses the existing permissions table (user_id='public') to discover sessions. Rate-limited by IP address. Includes join_url for direct participant access. Enables My Community / Community Admin integration to surface Harmonica sessions as participation opportunities. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
GET /api/v1/sessions/publicendpoint — no auth requiredpermissionstable foruser_id='public'entries, joins withhost_dbfor active sessionsjoin_urlfor direct participant access (/chat?s={id})?q=search and pagination (limit,offset)Why
Enables My Community / Community Admin Chrome extensions to discover Harmonica sessions as "participation opportunities" without requiring an API key (HAR-93).
Files changed
src/lib/db.ts— newlistPublicSessions()functionsrc/lib/api-types.ts— newPublicSessionListItemtypesrc/app/api/v1/_lib/mappers.ts— newtoPublicSessionListItem()mappersrc/app/api/v1/sessions/public/route.ts— new endpointdocs/api-spec.yaml— OpenAPI spec updatedTest plan
curl /api/v1/sessions/publicreturns the session withjoin_url?q=keywordfilters by topic/goallimit,offset,total)🤖 Generated with Claude Code