Complete Forgejo discussion MVP
This commit is contained in:
parent
d84a885fdb
commit
51706d2d11
17 changed files with 1708 additions and 127 deletions
11
README.md
11
README.md
|
|
@ -44,6 +44,9 @@ export FORGEJO_BASE_URL="https://aksal.cloud"
|
|||
export FORGEJO_OAUTH_CLIENT_ID="your-forgejo-oauth-client-id"
|
||||
export FORGEJO_OAUTH_CLIENT_SECRET="your-forgejo-oauth-client-secret"
|
||||
export FORGEJO_OAUTH_SCOPES="openid profile"
|
||||
export FORGEJO_GENERAL_DISCUSSION_REPO="Robot-U/general_forum"
|
||||
export FORGEJO_WEBHOOK_SECRET="shared-webhook-secret"
|
||||
export FORGEJO_CACHE_TTL_SECONDS="60.0"
|
||||
export CALENDAR_FEED_URLS="webcal://example.com/calendar.ics,https://example.com/other.ics"
|
||||
```
|
||||
|
||||
|
|
@ -55,7 +58,13 @@ http://kacper-dev-pod:8800/api/auth/forgejo/callback
|
|||
|
||||
`AUTH_SECRET_KEY` is required for Forgejo OAuth sign-in. It encrypts the `HttpOnly` browser session cookie that carries the signed-in user's Forgejo token and identity. Set `AUTH_COOKIE_SECURE=true` when serving over HTTPS.
|
||||
|
||||
`FORGEJO_TOKEN` is optional. When set, it is a read fallback for local development. Browser OAuth requests only identity scopes, then the backend uses the signed-in user's Forgejo identity from the encrypted session cookie for public repo reads and public issue replies. The backend must verify repositories are public before reading discussion data or writing comments.
|
||||
`FORGEJO_TOKEN` is optional. When set, it is a read fallback for the public content cache. Browser OAuth requests only identity scopes, then the backend uses the signed-in user's Forgejo identity from the encrypted session cookie for public discussion creation and replies. The backend must verify repositories are public before reading discussion data or writing issues/comments.
|
||||
|
||||
`FORGEJO_CACHE_TTL_SECONDS` controls how long the server reuses the public Forgejo content scan for `/api/prototype`. Set it to `0` to disable caching while debugging discovery behavior.
|
||||
|
||||
`FORGEJO_GENERAL_DISCUSSION_REPO` should point at the public `owner/repo` used for general discussion threads. Post- and lesson-linked discussions are created in the same repo as the content being discussed.
|
||||
|
||||
`FORGEJO_WEBHOOK_SECRET` is optional but recommended. Configure Forgejo webhooks to POST to `/api/forgejo/webhook`; matching webhook events invalidate the public content cache and notify open browsers over `/api/events/stream`.
|
||||
|
||||
Or put those values in `.env`:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue