Compare commits
No files matched your search
@@ -53,7 +53,22 @@ ADMIN_PASSWORD=
|
||||
# Demo users should not be created on a production instance,
|
||||
# because their passwords are public. Defaults to "false".
|
||||
# Also see: https://doc.owncloud.com/ocis/latest/deployment/general/general-info.html#demo-users-and-groups
|
||||
# When enabled, this also seeds admin's personal space and a "Demo Space" project
|
||||
# space with demo content on first startup, and adds the demo users (einstein,
|
||||
# marie, moss, richard, katherine) as editors of the Demo Space - see
|
||||
# demo-content-init.yml. That seeding needs PROXY_ENABLE_BASIC_AUTH (below), which
|
||||
# defaults to following this setting.
|
||||
DEMO_USERS=
|
||||
# Basic auth is disabled by default since OpenID Connect is the recommended way to
|
||||
# authenticate. Defaults to following DEMO_USERS above (the demo-content-init.yml
|
||||
# provisioning script needs it, since oCIS's OIDC has no password grant); set this
|
||||
# explicitly to override that, e.g. force it off even with demo users enabled.
|
||||
PROXY_ENABLE_BASIC_AUTH=
|
||||
# Seeds demo content (a "Demo Space" project space + files in admin's personal
|
||||
# space, see demo-content/) whenever DEMO_USERS is enabled above. Harmless to
|
||||
# leave enabled even when demo users are off - the script no-ops in that case.
|
||||
# Note: the leading colon is required to enable the service.
|
||||
DEMO_CONTENT=:demo-content-init.yml
|
||||
# Define the oCIS loglevel used.
|
||||
# For more details see:
|
||||
# https://doc.owncloud.com/ocis/latest/deployment/services/env-vars-special-scope.html
|
||||
@@ -127,7 +142,8 @@ SMTP_INSECURE=
|
||||
# manually defined for startup:
|
||||
# IMPORTANT: The notification service is MANDATORY, do not delete!
|
||||
# IMPORTANT: Add any services to the startup list comma separated like "notifications,antivirus" etc.
|
||||
START_ADDITIONAL_SERVICES="notifications"
|
||||
# IMPORTANT: If you enable WORKFLOWS below, you also MUST add 'auth-app' to this list.
|
||||
START_ADDITIONAL_SERVICES="notifications,auth-app"
|
||||
|
||||
|
||||
## oCIS Web Extensions ##
|
||||
@@ -135,25 +151,25 @@ START_ADDITIONAL_SERVICES="notifications"
|
||||
# For more details see https://github.com/owncloud/web-extensions/blob/main/README.md
|
||||
# Note: the leading colon is required to enable the service.
|
||||
# Enable this to create a new named volume
|
||||
#EXTENSIONS=:web_extensions/extensions.yml
|
||||
EXTENSIONS=:web_extensions/extensions.yml
|
||||
# Enable the desired extensions by uncommenting the following lines.
|
||||
# Note: the leading colon is required to enable the service.
|
||||
# Note: if you want to remove a web extension, you must delete the ocis-apps volume. It will be properly recreated on docker compose startup.
|
||||
#UNZIP=:web_extensions/unzip.yml
|
||||
#DRAWIO=:web_extensions/drawio.yml
|
||||
#JSONVIEWER=:web_extensions/jsonviewer.yml
|
||||
#PROGRESSBARS=:web_extensions/progressbars.yml
|
||||
#EXTERNALSITES=:web_extensions/externalsites.yml
|
||||
UNZIP=:web_extensions/unzip.yml
|
||||
DRAWIO=:web_extensions/drawio.yml
|
||||
JSONVIEWER=:web_extensions/jsonviewer.yml
|
||||
PROGRESSBARS=:web_extensions/progressbars.yml
|
||||
EXTERNALSITES=:web_extensions/externalsites.yml
|
||||
# External Sites needs additional config, see the following files for more details.
|
||||
# - config/ocis/apps.yaml
|
||||
# - ocis.yml (the apps_yaml config block)
|
||||
# - config/ocis/csp.yaml
|
||||
# Photo-addon provides a photo gallery with timeline view, EXIF metadata display, and map view.
|
||||
# Important, the Photo-addon requires that TIKA is enabled
|
||||
#PHOTOADDON=:web_extensions/photo-addon.yml
|
||||
# Important, the Photo-addon requires that TIKA is enabled
|
||||
PHOTOADDON=:web_extensions/photo-addon.yml
|
||||
# Advanced-search provides comprehensive search filtering with the KQL query builder.
|
||||
# Important, Advanced-search requires that TIKA is enabled
|
||||
#ADVANCEDSEARCH=:web_extensions/advanced-search.yml
|
||||
#IMPORTER=:web_extensions/importer.yml
|
||||
# Important, Advanced-search requires that TIKA is enabled
|
||||
ADVANCEDSEARCH=:web_extensions/advanced-search.yml
|
||||
IMPORTER=:web_extensions/importer.yml
|
||||
# The importer needs additional COMPANION config, see the following lines for more details.
|
||||
## The docker image to be used for uppy companion.
|
||||
# owncloud has built a container with public link import support.
|
||||
@@ -164,6 +180,73 @@ COMPANION_DOMAIN=
|
||||
# Empty by default, which disables providers.
|
||||
COMPANION_ONEDRIVE_KEY=
|
||||
COMPANION_ONEDRIVE_SECRET=
|
||||
CHATWITHFILE=:web_extensions/chat-with-file.yml
|
||||
FILECOMMENTS=:web_extensions/file-comments.yml
|
||||
GROUPMANAGEMENT=:web_extensions/group-management.yml
|
||||
VERSIONCHANGELOG=:web_extensions/version-changelog.yml
|
||||
# Note: cast (Google Cast integration) is intentionally NOT included here - it
|
||||
# loads a third-party Google script (gstatic.com) at runtime.
|
||||
# The following ai-* extensions require AI_LLM_PROXY to be enabled and
|
||||
# configured below, see ocis.yml (the apps_yaml config block) for their llm endpoint config.
|
||||
AIDOCSUMMARY=:web_extensions/ai-doc-summary.yml
|
||||
AIIMAGEALTTEXT=:web_extensions/ai-image-alt-text-sidebar.yml
|
||||
AIDATAINSIGHTS=:web_extensions/ai-data-insights-sidebar.yml
|
||||
AISENSITIVEDATASCANNER=:web_extensions/ai-sensitive-data-scanner.yml
|
||||
AIFOLDERBRIEF=:web_extensions/ai-folder-brief-sidebar.yml
|
||||
# The following extensions have no published docker image (their upstream
|
||||
# release CI runs failed at owncloud/web-extensions - startup_failure with no
|
||||
# jobs ever created). These build directly from the web-extensions git repo
|
||||
# instead (verified working with `docker compose build <name>-init`). Revisit
|
||||
# once ownCloud publishes real images for these.
|
||||
VIMNAV=:web_extensions/vim-nav.yml
|
||||
AIFOLDERREADME=:web_extensions/ai-folder-readme-generator.yml
|
||||
AIMULTIDOCSYNTH=:web_extensions/ai-multi-doc-synthesizer.yml
|
||||
AIQUICKDRAFT=:web_extensions/ai-quick-draft-creator.yml
|
||||
AISMARTCOLLECTIONS=:web_extensions/ai-smart-collections-nav.yml
|
||||
AISMARTTAGGER=:web_extensions/ai-smart-file-tagger-qa.yml
|
||||
# App Tokens (community web app by mschlachter, from the awesome-ocis catalog) - lets users
|
||||
# create/manage app-specific tokens for third-party API/CLI access. Requires auth-app
|
||||
# (already enabled above for Workflows).
|
||||
OCIS_APP_TOKENS=:web_extensions/ocis-app-tokens.yml
|
||||
|
||||
## oCIS AI LLM Proxy ##
|
||||
# Required by the ai-* web extensions above (owncloud/web-extensions ai-llm-proxy package).
|
||||
# NOTE: no published docker image exists yet for ai-llm-proxy; this builds
|
||||
# directly from the web-extensions git repository (verified working with
|
||||
# `docker compose build ai-llm-proxy`).
|
||||
# Note: the leading colon is required to enable the service.
|
||||
AI_LLM_PROXY=:web_extensions/ai-llm-proxy.yml
|
||||
# OpenAI-compatible LLM backend endpoint. Defaults to a local Ollama instance.
|
||||
AI_LLM_ENDPOINT=
|
||||
# API key for the LLM backend, if required. Empty by default.
|
||||
AI_LLM_API_KEY=
|
||||
# Default model name requested by the ai-* web extensions (see ocis.yml, the apps_yaml config block).
|
||||
AI_LLM_MODEL_DEFAULT=
|
||||
# Model name requested by the vision-capable ai-image-alt-text-sidebar extension.
|
||||
AI_LLM_MODEL_VISION=
|
||||
# Model name to force for ALL LLM calls, overriding whatever model the client
|
||||
# requested above (e.g. to pin everything to a single locally pulled Ollama
|
||||
# model). Empty uses the client's requested model (AI_LLM_MODEL_DEFAULT /
|
||||
# AI_LLM_MODEL_VISION).
|
||||
AI_LLM_MODEL=
|
||||
# How long (ms) the proxy waits for the LLM to finish a completion before aborting.
|
||||
# Defaults to 600000 (10 min) - local/self-hosted reasoning models on modest hardware
|
||||
# can take minutes to generate a few hundred tokens, with significant run-to-run
|
||||
# variance (measured 195s-296s for near-identical output length on the same
|
||||
# machine); the upstream ai-llm-proxy default (60s, hardcoded) is far too short.
|
||||
AI_LLM_TIMEOUT_MS=
|
||||
|
||||
## oCIS Workflows ##
|
||||
# Visual AI workflow builder (owncloud/ocis-workflows).
|
||||
# NOTE: no published docker image exists yet; this builds directly from the
|
||||
# ocis-workflows git repository (verified working with `docker compose build
|
||||
# workflows-init workflows-backend`).
|
||||
# IMPORTANT: also add 'auth-app' to START_ADDITIONAL_SERVICES above when enabling this.
|
||||
# Note: the leading colon is required to enable the service.
|
||||
WORKFLOWS=:workflows.yml
|
||||
# Required: a stable base64-encoded 32-byte key so scheduled workflow automation
|
||||
# survives restarts. Generate with: openssl rand -base64 32
|
||||
WORKFLOWS_ENCRYPTION_KEY=
|
||||
|
||||
|
||||
### Keycloak Settings ###
|
||||
@@ -301,4 +384,4 @@ MAIL_SERVER_DOCKER_TAG=v1.29.3
|
||||
# This MUST be the last line as it assembles the supplemental compose files to be used.
|
||||
# ALL supplemental configs must be added here, whether commented or not.
|
||||
# Each var must either be empty or contain :path/file.yml
|
||||
COMPOSE_FILE=docker-compose.yml${OCIS:-}${TIKA:-}${S3NG:-}${S3NG_MINIO:-}${COLLABORA:-}${IMPORTER:-}${CLAMAV:-}${ONLYOFFICE:-}${EXTENSIONS:-}${UNZIP:-}${DRAWIO:-}${JSONVIEWER:-}${PROGRESSBARS:-}${EXTERNALSITES:-}${PHOTOADDON:-}${ADVANCEDSEARCH:-}${MAIL_SERVER:-}${MONITORING:-}${KEYCLOAK:-}${VAULT_STORAGE:-}
|
||||
COMPOSE_FILE=docker-compose.yml${OCIS:-}${TIKA:-}${S3NG:-}${S3NG_MINIO:-}${COLLABORA:-}${IMPORTER:-}${CLAMAV:-}${ONLYOFFICE:-}${EXTENSIONS:-}${UNZIP:-}${DRAWIO:-}${JSONVIEWER:-}${PROGRESSBARS:-}${EXTERNALSITES:-}${PHOTOADDON:-}${ADVANCEDSEARCH:-}${CHATWITHFILE:-}${FILECOMMENTS:-}${GROUPMANAGEMENT:-}${VERSIONCHANGELOG:-}${AIDOCSUMMARY:-}${AIIMAGEALTTEXT:-}${AIDATAINSIGHTS:-}${AISENSITIVEDATASCANNER:-}${AIFOLDERBRIEF:-}${VIMNAV:-}${AIFOLDERREADME:-}${AIMULTIDOCSYNTH:-}${AIQUICKDRAFT:-}${AISMARTCOLLECTIONS:-}${AISMARTTAGGER:-}${OCIS_APP_TOKENS:-}${AI_LLM_PROXY:-}${WORKFLOWS:-}${MAIL_SERVER:-}${MONITORING:-}${KEYCLOAK:-}${VAULT_STORAGE:-}${DEMO_CONTENT:-}
|
||||
@@ -1,23 +0,0 @@
|
||||
importer:
|
||||
config:
|
||||
companionUrl: https://${COMPANION_DOMAIN|companion.owncloud.test}
|
||||
supportedClouds:
|
||||
- WebdavPublicLink
|
||||
#- OneDrive # needs a client id and secret
|
||||
#- GoogleDrive # needs a client id and secret and an addition to the DNS zone
|
||||
external-sites:
|
||||
config:
|
||||
sites:
|
||||
# For settings see: https://github.com/owncloud/web-extensions/tree/main/packages/web-app-external-sites
|
||||
- name: ownCloud
|
||||
url: "https://owncloud.dev"
|
||||
target: embedded
|
||||
color: "#0D856F"
|
||||
icon: cloud
|
||||
priority: 50
|
||||
- name: Wikipedia
|
||||
url: "https://www.wikipedia.org"
|
||||
target: external
|
||||
color: "#0D856F"
|
||||
icon: book
|
||||
priority: 51
|
||||
@@ -21,7 +21,7 @@ directives:
|
||||
frame-src:
|
||||
- '''self'''
|
||||
- 'blob:'
|
||||
- 'https://embed.diagrams.net/'
|
||||
- 'https://${DRAWIO_DOMAIN|drawio.owncloud.test}/'
|
||||
# In contrary to bash and docker the default is given after the | character
|
||||
- 'https://${ONLYOFFICE_DOMAIN|onlyoffice.owncloud.test}/'
|
||||
- 'https://${COLLABORA_DOMAIN|collabora.owncloud.test}/'
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
# Overrides oCIS's built-in bundled web-app list (Web.Apps in
|
||||
# services/web/pkg/config), which otherwise defaults to:
|
||||
# files, search, text-editor, pdf-viewer, external, admin-settings,
|
||||
# epub-reader, preview, app-store
|
||||
# (see services/web/pkg/config/defaults/defaultconfig.go upstream).
|
||||
# Adding html-editor here since it's bundled with oCIS but not enabled by default.
|
||||
web:
|
||||
config:
|
||||
apps:
|
||||
- files
|
||||
- search
|
||||
- text-editor
|
||||
- pdf-viewer
|
||||
- external
|
||||
- admin-settings
|
||||
- epub-reader
|
||||
- preview
|
||||
- app-store
|
||||
- html-editor
|
||||
@@ -0,0 +1,113 @@
|
||||
#!/bin/sh
|
||||
# Seeds admin's personal space and a "Demo Space" project space with demo
|
||||
# content, and adds the standard demo users as editors of the Demo Space.
|
||||
# No-ops immediately unless DEMO_USERS is "true".
|
||||
|
||||
echo "[demo-content-init] starting"
|
||||
|
||||
if [ "${DEMO_USERS:-false}" != "true" ]; then
|
||||
echo "[demo-content-init] DEMO_USERS is not 'true', nothing to do."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
apk add --no-cache curl jq >/dev/null 2>&1
|
||||
|
||||
BASE="http://ocis:9200"
|
||||
AUTH="admin:${ADMIN_PASSWORD:-admin}"
|
||||
CONTENT_DIR="/demo-content"
|
||||
EDITOR_ROLE="58c63c02-1d89-4572-916a-870abc5a1b7d"
|
||||
DEMO_USERNAMES="einstein marie moss richard katherine"
|
||||
|
||||
curl_g() {
|
||||
curl -s -u "$AUTH" "$@"
|
||||
}
|
||||
|
||||
echo "[demo-content-init] waiting for oCIS to become ready..."
|
||||
i=0
|
||||
while true; do
|
||||
code=$(curl -s -o /dev/null -w '%{http_code}' -u "$AUTH" "$BASE/graph/v1.0/me")
|
||||
[ "$code" = "200" ] && break
|
||||
i=$((i + 1))
|
||||
if [ "$i" -ge 60 ]; then
|
||||
echo "[demo-content-init] oCIS did not become ready in time (last status: $code), giving up."
|
||||
exit 1
|
||||
fi
|
||||
sleep 5
|
||||
done
|
||||
echo "[demo-content-init] oCIS is ready."
|
||||
|
||||
upload_tree() {
|
||||
local_dir="$1"
|
||||
space_id="$2"
|
||||
base_url="$BASE/dav/spaces/$space_id"
|
||||
|
||||
find "$local_dir" -type d | sed "s|^$local_dir||" | sed '/^$/d' | sort | while read -r d; do
|
||||
code=$(curl -s -o /dev/null -w '%{http_code}' -u "$AUTH" -X MKCOL "$base_url$d")
|
||||
echo " MKCOL $code $d"
|
||||
done
|
||||
|
||||
find "$local_dir" -type f | while read -r f; do
|
||||
rel="${f#$local_dir}"
|
||||
code=$(curl -s -o /dev/null -w '%{http_code}' -u "$AUTH" -X PUT "$base_url$rel" --data-binary "@$f")
|
||||
echo " PUT $code $rel"
|
||||
done
|
||||
}
|
||||
|
||||
echo "[demo-content-init] resolving admin's personal space..."
|
||||
PERSONAL_ID=$(curl_g "$BASE/graph/v1.0/me/drives" | jq -r '.value[] | select(.driveType=="personal") | .id')
|
||||
echo "[demo-content-init] personal space id: $PERSONAL_ID"
|
||||
|
||||
echo "[demo-content-init] uploading personal-space demo content..."
|
||||
upload_tree "$CONTENT_DIR/personal" "$PERSONAL_ID"
|
||||
|
||||
echo "[demo-content-init] resolving Demo Space..."
|
||||
DEMO_SPACE_ID=$(curl_g "$BASE/graph/v1.0/me/drives" | jq -r '.value[] | select(.driveType=="project" and .name=="Demo Space") | .id' | head -1)
|
||||
|
||||
if [ -z "$DEMO_SPACE_ID" ]; then
|
||||
echo "[demo-content-init] Demo Space not found, creating it..."
|
||||
DEMO_SPACE_ID=$(curl -s -u "$AUTH" -X POST "$BASE/graph/v1beta1/drives?template=default" \
|
||||
-H 'Content-Type: application/json' --data '{"name":"Demo Space","driveType":"project"}' | jq -r '.id')
|
||||
fi
|
||||
echo "[demo-content-init] Demo Space id: $DEMO_SPACE_ID"
|
||||
|
||||
echo "[demo-content-init] uploading Demo Space content..."
|
||||
upload_tree "$CONTENT_DIR/project" "$DEMO_SPACE_ID"
|
||||
|
||||
if [ -f "$CONTENT_DIR/space-readme.md" ]; then
|
||||
code=$(curl -s -o /dev/null -w '%{http_code}' -u "$AUTH" -X PUT "$BASE/dav/spaces/$DEMO_SPACE_ID/.space/readme.md" --data-binary "@$CONTENT_DIR/space-readme.md")
|
||||
echo " PUT $code .space/readme.md"
|
||||
fi
|
||||
|
||||
echo "[demo-content-init] adding demo users as Demo Space editors..."
|
||||
EXISTING_PERMS=$(curl_g "$BASE/graph/v1beta1/drives/$DEMO_SPACE_ID/root/permissions")
|
||||
|
||||
for uname in $DEMO_USERNAMES; do
|
||||
USER_ID=""
|
||||
i=0
|
||||
while [ -z "$USER_ID" ]; do
|
||||
USER_ID=$(curl_g "$BASE/graph/v1.0/users?\$search=$uname" | jq -r --arg u "$uname" '.value[] | select(.onPremisesSamAccountName==$u) | .id' | head -1)
|
||||
if [ -z "$USER_ID" ]; then
|
||||
i=$((i + 1))
|
||||
if [ "$i" -ge 30 ]; then
|
||||
echo "[demo-content-init] user $uname never showed up after waiting, skipping."
|
||||
break
|
||||
fi
|
||||
echo "[demo-content-init] waiting for user $uname to exist..."
|
||||
sleep 5
|
||||
fi
|
||||
done
|
||||
[ -z "$USER_ID" ] && continue
|
||||
|
||||
ALREADY=$(echo "$EXISTING_PERMS" | jq -r --arg id "$USER_ID" '.value[]? | select(.grantedToV2.user.id==$id) | .id')
|
||||
if [ -n "$ALREADY" ]; then
|
||||
echo "[demo-content-init] $uname is already a member."
|
||||
continue
|
||||
fi
|
||||
|
||||
code=$(curl -s -o /dev/null -w '%{http_code}' -u "$AUTH" -X POST "$BASE/graph/v1beta1/drives/$DEMO_SPACE_ID/root/invite" \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data "{\"recipients\":[{\"objectId\":\"$USER_ID\",\"@libre.graph.recipient.type\":\"user\"}],\"roles\":[\"$EDITOR_ROLE\"]}")
|
||||
echo " invite $code $uname"
|
||||
done
|
||||
|
||||
echo "[demo-content-init] done."
|
||||
@@ -0,0 +1,32 @@
|
||||
---
|
||||
# Seeds admin's personal space and a "Demo Space" project space with demo
|
||||
# content whenever DEMO_USERS is enabled, and adds the standard demo users
|
||||
# (einstein, marie, moss, richard, katherine) as editors of the Demo Space.
|
||||
# The container always exists in the compose graph, but demo-content-init.sh
|
||||
# no-ops immediately unless DEMO_USERS is "true" - so this is harmless to
|
||||
# leave enabled even when demo users are off.
|
||||
#
|
||||
# Requires PROXY_ENABLE_BASIC_AUTH (see ocis.yml, defaults to follow
|
||||
# DEMO_USERS), since oCIS's OIDC does not support the password grant that a
|
||||
# script like this would otherwise need, and talks to oCIS directly over the
|
||||
# internal docker network (http://ocis:9200) rather than through Traefik, so
|
||||
# it never has to deal with the self-signed certificate.
|
||||
services:
|
||||
demo-content-init:
|
||||
image: alpine:3.22
|
||||
user: root
|
||||
networks:
|
||||
ocis-net:
|
||||
depends_on:
|
||||
ocis:
|
||||
condition: service_started
|
||||
environment:
|
||||
DEMO_USERS: "${DEMO_USERS:-false}"
|
||||
ADMIN_PASSWORD: "${ADMIN_PASSWORD:-admin}"
|
||||
volumes:
|
||||
- ./demo-content:/demo-content:ro
|
||||
- ./demo-content-init.sh:/demo-content-init.sh:ro
|
||||
entrypoint: ["/bin/sh", "/demo-content-init.sh"]
|
||||
restart: "no"
|
||||
logging:
|
||||
driver: ${LOG_DRIVER:-local}
|
||||
@@ -0,0 +1,5 @@
|
||||
# My Notes — Aurora
|
||||
|
||||
- Remember to follow up with design on wireframe feedback (due 2026-07-31)
|
||||
- Check whether the audit log needs to capture IP address or just user + timestamp
|
||||
- Ask product about the mobile layout question raised in kickoff
|
||||
@@ -0,0 +1,6 @@
|
||||
# Todo
|
||||
|
||||
- [ ] Review updated wireframes
|
||||
- [ ] Approve final API contract for decision endpoint
|
||||
- [ ] Confirm pilot team list with product
|
||||
- [ ] Schedule design walkthrough for engineering
|
||||
@@ -0,0 +1,49 @@
|
||||
# Customer Intake Form — SYNTHETIC TEST DATA ONLY
|
||||
|
||||
> **This entire document is fabricated for testing purposes.**
|
||||
> No field below refers to a real person, account, or institution.
|
||||
> Names, numbers, and addresses use standard "reserved for fictional use" ranges
|
||||
> (555 phone exchange, example.com/example.org email domains, test card numbers, etc.).
|
||||
|
||||
## Personal Information
|
||||
|
||||
- Full Name: Jane Q. Testperson
|
||||
- Date of Birth: 1985-03-14
|
||||
- Social Security Number: 000-12-3456 *(000 prefix is never issued — invalid by design)*
|
||||
- Driver's License: D1234567 (State of Sampleland)
|
||||
- Passport Number: X00000001 (fictional format)
|
||||
|
||||
## Contact Details
|
||||
|
||||
- Home Address: 123 Fictional Lane, Apt 4B, Testville, CA 90210
|
||||
- Phone (mobile): (555) 010-2938 *(555-01xx is reserved for fiction per NANP)*
|
||||
- Phone (work): (555) 010-4471
|
||||
- Email: jane.testperson@example.com
|
||||
- Emergency Contact: John Testperson, (555) 010-8842, john.testperson@example.org
|
||||
|
||||
## Financial Information
|
||||
|
||||
- Bank Name: First Sample National Bank
|
||||
- Account Number: 0000000000
|
||||
- Routing Number: 000000000
|
||||
- Credit Card (Visa test number): 4111 1111 1111 1111, Exp 01/30, CVV 000
|
||||
- Credit Card (Mastercard test number): 5555 5555 5555 4444, Exp 01/30, CVV 000
|
||||
|
||||
## Health Information (fictional)
|
||||
|
||||
- Patient ID: PT-000001
|
||||
- Primary Physician: Dr. Alice Sampleton, Sampleland General Hospital
|
||||
- Diagnosis Note: "Patient presents with fictional-condition-A, prescribed placebo 10mg daily."
|
||||
- Insurance Policy Number: INS-0000-0000
|
||||
|
||||
## Employment
|
||||
|
||||
- Employer: Acme Test Corporation
|
||||
- Employee ID: EMP-000123
|
||||
- Salary: $000,000.00 (fictional figure)
|
||||
|
||||
## Notes
|
||||
|
||||
Use this file to exercise PII-detection features (e.g. the `ai-sensitive-data-scanner`
|
||||
web extension) against a document that should trigger every major category:
|
||||
name, SSN, DOB, address, phone, email, financial account/card numbers, and health data.
|
||||
@@ -0,0 +1,5 @@
|
||||
# Welcome
|
||||
|
||||
This is your personal space. The `Demo-Project-Notes` folder holds your working
|
||||
notes for the **Aurora** project — the shared project files themselves live in
|
||||
the "New space" project space.
|
||||
@@ -0,0 +1,32 @@
|
||||
# Project Charter — Aurora
|
||||
|
||||
## Problem Statement
|
||||
|
||||
Document reviews currently happen over email with no tracking, no visibility into
|
||||
status, and no consistent record of who approved what. Reviewers regularly lose
|
||||
track of pending items, and there is no way to audit past decisions.
|
||||
|
||||
## Objectives
|
||||
|
||||
1. Provide a self-service review queue for reviewers
|
||||
2. Automate routing of documents to the correct reviewer
|
||||
3. Record every decision (approve/reject/comment) with a timestamp
|
||||
|
||||
## Scope
|
||||
|
||||
**In scope:** internal document review, notifications, audit log
|
||||
**Out of scope:** external/customer-facing review flows (phase 2)
|
||||
|
||||
## Stakeholders
|
||||
|
||||
| Role | Name | Responsibility |
|
||||
|---|---|---|
|
||||
| Sponsor | [Add name] | Budget, priorities |
|
||||
| Product Owner | [Add name] | Requirements, acceptance |
|
||||
| Tech Lead | [Add name] | Architecture, delivery |
|
||||
|
||||
## Success Criteria
|
||||
|
||||
- [ ] Average review turnaround under 24 hours
|
||||
- [ ] 100% of reviews have an audit trail
|
||||
- [ ] Positive feedback from at least 3 pilot teams
|
||||
@@ -0,0 +1,6 @@
|
||||
Phase,Start,End,Owner,Status
|
||||
Discovery,2026-06-01,2026-06-12,Product,Done
|
||||
Design,2026-06-15,2026-07-10,Design,Done
|
||||
Development,2026-07-13,2026-08-21,Engineering,In Progress
|
||||
Pilot Rollout,2026-08-24,2026-09-04,Product,Not Started
|
||||
General Availability,2026-09-07,2026-09-11,Product,Not Started
|
||||
|
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mxfile host="app.diagrams.net">
|
||||
<diagram name="Aurora Architecture" id="aurora-arch-1">
|
||||
<mxGraphModel dx="800" dy="600" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0" />
|
||||
<mxCell id="1" parent="0" />
|
||||
<mxCell id="reviewer" value="Reviewer Portal (Web)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
|
||||
<mxGeometry x="80" y="80" width="180" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="api" value="Review API" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
|
||||
<mxGeometry x="340" y="80" width="180" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="queue" value="Routing Queue" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;" vertex="1" parent="1">
|
||||
<mxGeometry x="340" y="200" width="180" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="store" value="Document Store" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" vertex="1" parent="1">
|
||||
<mxGeometry x="600" y="80" width="180" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="audit" value="Audit Log" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" vertex="1" parent="1">
|
||||
<mxGeometry x="600" y="200" width="180" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="e1" style="edgeStyle=orthogonalEdgeStyle;html=1;" edge="1" parent="1" source="reviewer" target="api">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="e2" style="edgeStyle=orthogonalEdgeStyle;html=1;" edge="1" parent="1" source="api" target="store">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="e3" style="edgeStyle=orthogonalEdgeStyle;html=1;" edge="1" parent="1" source="api" target="queue">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="e4" style="edgeStyle=orthogonalEdgeStyle;html=1;" edge="1" parent="1" source="queue" target="audit">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
||||
@@ -0,0 +1,19 @@
|
||||
# Wireframe Notes — Reviewer Portal
|
||||
|
||||
## Review Queue (landing page)
|
||||
|
||||
- Table of pending documents: title, submitter, due date, priority
|
||||
- Filter by status (Pending / In Review / Approved / Rejected)
|
||||
- Sort by due date by default
|
||||
|
||||
## Document Detail View
|
||||
|
||||
- Inline preview (PDF/Office) on the left
|
||||
- Decision panel on the right: Approve / Reject / Request Changes
|
||||
- Comment thread below the preview, threaded by section
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Do we need bulk-approve for low-risk documents?
|
||||
- [ ] Should rejected documents auto-notify the submitter's manager?
|
||||
- [ ] Mobile layout — read-only or full decision support?
|
||||
@@ -0,0 +1,16 @@
|
||||
# Changelog
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- Initial routing queue implementation
|
||||
- Reviewer portal skeleton with mock data
|
||||
|
||||
### Changed
|
||||
- Switched document preview from custom viewer to embedded PDF viewer
|
||||
|
||||
## [0.1.0] - 2026-06-20
|
||||
|
||||
### Added
|
||||
- Project scaffolding
|
||||
- CI pipeline (lint + unit tests)
|
||||
@@ -0,0 +1,24 @@
|
||||
# Aurora — Engineering README
|
||||
|
||||
## Stack
|
||||
|
||||
- Backend: Review API (Go)
|
||||
- Frontend: Reviewer Portal (Vue)
|
||||
- Storage: oCIS Infinite Scale (this space)
|
||||
|
||||
## Local Development
|
||||
|
||||
1. Clone the repo
|
||||
2. `[Add setup instructions here]`
|
||||
3. `[Add run instructions here]`
|
||||
|
||||
## Conventions
|
||||
|
||||
- Branch naming: `feature/<short-description>`, `fix/<short-description>`
|
||||
- All PRs require one review before merge
|
||||
- CI must be green before merge
|
||||
|
||||
## Current Focus
|
||||
|
||||
See `04-Meeting-Notes/` for the latest standup notes and `01-Planning/Timeline.csv`
|
||||
for the phase schedule.
|
||||
@@ -0,0 +1,21 @@
|
||||
# Kickoff Meeting — 2026-07-20
|
||||
|
||||
**Attendees:** [Add names]
|
||||
|
||||
## Agenda
|
||||
|
||||
1. Review project charter
|
||||
2. Confirm scope for phase 1
|
||||
3. Assign workstream owners
|
||||
|
||||
## Notes
|
||||
|
||||
- Agreed: phase 1 covers internal reviewers only, external/customer review is phase 2
|
||||
- Design to start immediately; engineering starts once wireframes are approved
|
||||
- Weekly standup every Friday 10:00
|
||||
|
||||
## Action Items
|
||||
|
||||
- [ ] [Add name] — circulate charter for sign-off
|
||||
- [ ] [Add name] — draft initial wireframes
|
||||
- [ ] [Add name] — set up CI pipeline
|
||||
@@ -0,0 +1,16 @@
|
||||
# Standup — 2026-07-24
|
||||
|
||||
## Design
|
||||
- Wireframes for review queue and detail view done, see `02-Design/Wireframes-Notes.md`
|
||||
- Next: get feedback from 2 pilot reviewers
|
||||
|
||||
## Engineering
|
||||
- Routing queue skeleton merged
|
||||
- Blocked on: final API contract for decision endpoint
|
||||
|
||||
## Product
|
||||
- Confirmed pilot teams: [Add team names]
|
||||
- Drafting rollout communication
|
||||
|
||||
## Next Standup
|
||||
2026-07-31, same time.
|
||||
@@ -0,0 +1,29 @@
|
||||
# Review API Reference (draft)
|
||||
|
||||
## `GET /reviews`
|
||||
|
||||
Returns the current user's pending reviews.
|
||||
|
||||
**Response**
|
||||
```json
|
||||
[
|
||||
{ "id": "string", "title": "string", "submitter": "string", "dueDate": "string", "status": "pending|in_review|approved|rejected" }
|
||||
]
|
||||
```
|
||||
|
||||
## `POST /reviews/{id}/decision`
|
||||
|
||||
Submit a decision for a review.
|
||||
|
||||
**Request**
|
||||
```json
|
||||
{ "decision": "approve|reject|request_changes", "comment": "string (optional)" }
|
||||
```
|
||||
|
||||
**Response:** `204 No Content`
|
||||
|
||||
## `GET /reviews/{id}/audit`
|
||||
|
||||
Returns the full decision history for a document.
|
||||
|
||||
[Add authentication details here]
|
||||
@@ -0,0 +1,21 @@
|
||||
# Aurora Reviewer Portal — User Guide
|
||||
|
||||
## Signing In
|
||||
|
||||
Sign in with your usual company credentials. You'll land on the **Review Queue**.
|
||||
|
||||
## Reviewing a Document
|
||||
|
||||
1. Click a document in the queue to open the detail view.
|
||||
2. Read the document in the inline preview.
|
||||
3. Choose **Approve**, **Reject**, or **Request Changes**.
|
||||
4. Optionally leave a comment explaining your decision.
|
||||
|
||||
## Tracking Status
|
||||
|
||||
Your decisions are recorded immediately and visible to the submitter. Use the
|
||||
**Status** filter on the queue to see documents by state.
|
||||
|
||||
## Getting Help
|
||||
|
||||
[Add support contact / channel here]
|
||||
@@ -0,0 +1,350 @@
|
||||
# Code Languages Showcase
|
||||
|
||||
Short, valid snippets in a broad set of highlight.js-supported languages
|
||||
(https://highlightjs.readthedocs.io/en/latest/supported-languages.html),
|
||||
each implementing the same idea: check whether a review decision is approved.
|
||||
|
||||
## JavaScript
|
||||
|
||||
```javascript
|
||||
function isApproved(review) {
|
||||
return review.status === 'approved'
|
||||
}
|
||||
```
|
||||
|
||||
## TypeScript
|
||||
|
||||
```typescript
|
||||
interface Review {
|
||||
id: string
|
||||
status: 'pending' | 'approved' | 'rejected'
|
||||
}
|
||||
|
||||
function isApproved(review: Review): boolean {
|
||||
return review.status === 'approved'
|
||||
}
|
||||
```
|
||||
|
||||
## Python
|
||||
|
||||
```python
|
||||
def is_approved(review: dict) -> bool:
|
||||
return review.get("status") == "approved"
|
||||
```
|
||||
|
||||
## Go
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
func isApproved(status string) bool {
|
||||
return status == "approved"
|
||||
}
|
||||
```
|
||||
|
||||
## Rust
|
||||
|
||||
```rust
|
||||
fn is_approved(status: &str) -> bool {
|
||||
status == "approved"
|
||||
}
|
||||
```
|
||||
|
||||
## Java
|
||||
|
||||
```java
|
||||
class Review {
|
||||
static boolean isApproved(String status) {
|
||||
return "approved".equals(status);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## C
|
||||
|
||||
```c
|
||||
#include <string.h>
|
||||
|
||||
int is_approved(const char *status) {
|
||||
return strcmp(status, "approved") == 0;
|
||||
}
|
||||
```
|
||||
|
||||
## C++
|
||||
|
||||
```cpp
|
||||
#include <string>
|
||||
|
||||
bool is_approved(const std::string &status) {
|
||||
return status == "approved";
|
||||
}
|
||||
```
|
||||
|
||||
## C#
|
||||
|
||||
```csharp
|
||||
class Review {
|
||||
public static bool IsApproved(string status) => status == "approved";
|
||||
}
|
||||
```
|
||||
|
||||
## Ruby
|
||||
|
||||
```ruby
|
||||
def approved?(status)
|
||||
status == "approved"
|
||||
end
|
||||
```
|
||||
|
||||
## PHP
|
||||
|
||||
```php
|
||||
<?php
|
||||
function isApproved(string $status): bool {
|
||||
return $status === "approved";
|
||||
}
|
||||
```
|
||||
|
||||
## Swift
|
||||
|
||||
```swift
|
||||
func isApproved(_ status: String) -> Bool {
|
||||
return status == "approved"
|
||||
}
|
||||
```
|
||||
|
||||
## Kotlin
|
||||
|
||||
```kotlin
|
||||
fun isApproved(status: String) = status == "approved"
|
||||
```
|
||||
|
||||
## Scala
|
||||
|
||||
```scala
|
||||
object Review {
|
||||
def isApproved(status: String): Boolean = status == "approved"
|
||||
}
|
||||
```
|
||||
|
||||
## Haskell
|
||||
|
||||
```haskell
|
||||
isApproved :: String -> Bool
|
||||
isApproved status = status == "approved"
|
||||
```
|
||||
|
||||
## Elixir
|
||||
|
||||
```elixir
|
||||
defmodule Review do
|
||||
def approved?(status), do: status == "approved"
|
||||
end
|
||||
```
|
||||
|
||||
## Erlang
|
||||
|
||||
```erlang
|
||||
is_approved(Status) -> Status =:= "approved".
|
||||
```
|
||||
|
||||
## Clojure
|
||||
|
||||
```clojure
|
||||
(defn approved? [status]
|
||||
(= status "approved"))
|
||||
```
|
||||
|
||||
## Lua
|
||||
|
||||
```lua
|
||||
local function is_approved(status)
|
||||
return status == "approved"
|
||||
end
|
||||
```
|
||||
|
||||
## Perl
|
||||
|
||||
```perl
|
||||
sub is_approved {
|
||||
my ($status) = @_;
|
||||
return $status eq "approved";
|
||||
}
|
||||
```
|
||||
|
||||
## R
|
||||
|
||||
```r
|
||||
is_approved <- function(status) {
|
||||
status == "approved"
|
||||
}
|
||||
```
|
||||
|
||||
## SQL
|
||||
|
||||
```sql
|
||||
SELECT id, title
|
||||
FROM reviews
|
||||
WHERE status = 'approved'
|
||||
ORDER BY due_date;
|
||||
```
|
||||
|
||||
## Bash
|
||||
|
||||
```bash
|
||||
is_approved() {
|
||||
[[ "$1" == "approved" ]]
|
||||
}
|
||||
```
|
||||
|
||||
## PowerShell
|
||||
|
||||
```powershell
|
||||
function Test-Approved {
|
||||
param([string]$Status)
|
||||
$Status -eq "approved"
|
||||
}
|
||||
```
|
||||
|
||||
## YAML
|
||||
|
||||
```yaml
|
||||
review:
|
||||
id: r-1024
|
||||
status: approved
|
||||
reviewer: alice
|
||||
```
|
||||
|
||||
## JSON
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "r-1024",
|
||||
"status": "approved",
|
||||
"reviewer": "alice"
|
||||
}
|
||||
```
|
||||
|
||||
## XML
|
||||
|
||||
```xml
|
||||
<review id="r-1024">
|
||||
<status>approved</status>
|
||||
<reviewer>alice</reviewer>
|
||||
</review>
|
||||
```
|
||||
|
||||
## HTML
|
||||
|
||||
```html
|
||||
<article class="review" data-status="approved">
|
||||
<h2>Review r-1024</h2>
|
||||
<p>Reviewer: alice</p>
|
||||
</article>
|
||||
```
|
||||
|
||||
## CSS
|
||||
|
||||
```css
|
||||
.review[data-status="approved"] {
|
||||
border-left: 4px solid green;
|
||||
}
|
||||
```
|
||||
|
||||
## SCSS
|
||||
|
||||
```scss
|
||||
.review {
|
||||
&[data-status="approved"] {
|
||||
border-left: 4px solid $color-success;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Markdown
|
||||
|
||||
```markdown
|
||||
# Review r-1024
|
||||
|
||||
**Status:** approved
|
||||
```
|
||||
|
||||
## Dockerfile
|
||||
|
||||
```dockerfile
|
||||
FROM alpine:3.22
|
||||
COPY review-api /usr/local/bin/review-api
|
||||
CMD ["review-api"]
|
||||
```
|
||||
|
||||
## Makefile
|
||||
|
||||
```makefile
|
||||
build:
|
||||
go build -o review-api ./cmd/review-api
|
||||
|
||||
test:
|
||||
go test ./...
|
||||
```
|
||||
|
||||
## INI
|
||||
|
||||
```ini
|
||||
[review]
|
||||
status = approved
|
||||
reviewer = alice
|
||||
```
|
||||
|
||||
## TOML
|
||||
|
||||
```toml
|
||||
[review]
|
||||
id = "r-1024"
|
||||
status = "approved"
|
||||
reviewer = "alice"
|
||||
```
|
||||
|
||||
## Diff
|
||||
|
||||
```diff
|
||||
- status: pending
|
||||
+ status: approved
|
||||
```
|
||||
|
||||
## GraphQL
|
||||
|
||||
```graphql
|
||||
query GetReview($id: ID!) {
|
||||
review(id: $id) {
|
||||
id
|
||||
status
|
||||
reviewer
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Protocol Buffers
|
||||
|
||||
```protobuf
|
||||
message Review {
|
||||
string id = 1;
|
||||
string status = 2;
|
||||
string reviewer = 3;
|
||||
}
|
||||
```
|
||||
|
||||
## Nginx
|
||||
|
||||
```nginx
|
||||
location /reviews/ {
|
||||
proxy_pass http://review-api:8080;
|
||||
}
|
||||
```
|
||||
|
||||
## Apache
|
||||
|
||||
```apache
|
||||
<Location /reviews>
|
||||
ProxyPass http://review-api:8080
|
||||
</Location>
|
||||
```
|
||||
@@ -0,0 +1,54 @@
|
||||
# File Format Coverage
|
||||
|
||||
This folder aims to carry one sample file per document/spreadsheet/presentation/
|
||||
image/archive format that oCIS, Collabora, and ONLYOFFICE encounter in the wild.
|
||||
This note tracks what's covered and what's deliberately left out.
|
||||
|
||||
## Covered
|
||||
|
||||
Word processing: doc**x**, doc**m**, dot**x**, dot**m**, docxf, odt, ott, oth,
|
||||
fodt, rtf
|
||||
Spreadsheets: xlsx, xlsm, xltx, xltm, ods, ots, fods, csv, tsv, dif, slk, dbf,
|
||||
gnumeric, gsheet
|
||||
Presentations: pptx, pptm, potx, potm, ppsx, ppsm, odp, otp, fodp, gslides
|
||||
Drawings/CAD: odg, otg, fodg, svg, dxf
|
||||
PDF: pdf, a PDF/A-flavored variant (`Sample-Archival-PDFA.pdf`)
|
||||
Text/markup: txt, md, html, htm, xhtml, mhtml, xml, json
|
||||
E-books: epub, fb2
|
||||
Extensions: oxt (LibreOffice extension package)
|
||||
Legacy binary (hand-built, byte-for-byte): dbf, pdb, emf, wmf
|
||||
Images/video/other: jpg, jpeg, png, gif, bmp, tiff, webp, ico, url, avi, mkv,
|
||||
mov, mp4, webm
|
||||
|
||||
## Deliberately skipped
|
||||
|
||||
The formats below need their originating proprietary application (or a
|
||||
converter we don't have available, e.g. LibreOffice/`soffice` headless
|
||||
conversion) to produce a genuinely valid file. Rather than ship a file that
|
||||
merely has the right extension but invalid/garbage internal structure, they're
|
||||
left out:
|
||||
|
||||
- **Legacy OLE binary Microsoft Office** (pre-2007): doc, dot, xls, xlsb, xlt,
|
||||
ppt, pot, pps, pub, wri
|
||||
- **CorelDRAW**: cdr
|
||||
- **WordPerfect**: wpd
|
||||
- **Hangul Word Processor**: hwp, hwp2
|
||||
- **Adobe PageMaker**: p65
|
||||
- **Lotus Ami Pro**: mw
|
||||
- **Sony BroadBand eBook (Librie/LRF)**: lrf
|
||||
- **DjVu**: djvu
|
||||
- **Adobe Flash**: swf
|
||||
- **Apple iWork** (proprietary zip/IWA bundle): key, numbers
|
||||
- **CGM (Computer Graphics Metafile)**: cgm
|
||||
- **Microsoft Visio** (legacy binary and modern OOXML-based): vsd, vsdm, vsdx,
|
||||
vss, vssm, vssx, vstm, vstx
|
||||
- **Microsoft XPS / OpenXPS**: xps, oxps
|
||||
- **ONLYOFFICE form (built from docxf)**: oform
|
||||
- **Kingsoft/WPS Office legacy binary**: et, ett, dps, dpt, wps, wpt
|
||||
- **LibreOffice Base**: odb
|
||||
- **OpenDocument chart / master document (and its template)**: odc, odm, otm
|
||||
- **StarOffice 5/6 legacy XML family**: sxw, sxc, sxi, sxd, sxg, stw, stc,
|
||||
sti, std
|
||||
- **HEIF/HEIC**: heif (no HEIF encoder available in this environment)
|
||||
|
||||
Generated 2026-07-29 for the oCIS format showcase.
|
||||
@@ -0,0 +1,198 @@
|
||||
# Markdown Feature Showcase
|
||||
|
||||
A demo of every object type supported by the md-editor-v3 syntax
|
||||
(https://imzbf.github.io/md-editor-v3/en-US/syntax).
|
||||
|
||||
## Headings
|
||||
|
||||
# H1
|
||||
## H2
|
||||
### H3
|
||||
#### H4
|
||||
##### H5
|
||||
###### H6
|
||||
|
||||
## Emphasis
|
||||
|
||||
**bold text**, _italic text_, ~~strikethrough~~, <u>underline</u>, plain text.
|
||||
|
||||
Combined: **_bold and italic_**, **~~bold and strikethrough~~**.
|
||||
|
||||
Superscript: text^[1]^ Subscript: text~[2]~
|
||||
|
||||
## Blockquote
|
||||
|
||||
> A single-line blockquote.
|
||||
>
|
||||
> A blockquote with multiple paragraphs.
|
||||
> > A nested blockquote.
|
||||
|
||||
## Lists
|
||||
|
||||
Unordered:
|
||||
|
||||
- Item one
|
||||
- Item two
|
||||
- Nested item
|
||||
- Another nested item
|
||||
- Item three
|
||||
|
||||
Ordered:
|
||||
|
||||
1. First step
|
||||
2. Second step
|
||||
1. Sub-step A
|
||||
2. Sub-step B
|
||||
3. Third step
|
||||
|
||||
Task list:
|
||||
|
||||
- [x] Write project charter
|
||||
- [x] Finish wireframes
|
||||
- [ ] Finalize API contract
|
||||
- [ ] Run pilot with 3 teams
|
||||
|
||||
## Links and Images
|
||||
|
||||
[ownCloud Infinite Scale](https://owncloud.dev/ocis/ "oCIS developer docs")
|
||||
|
||||

|
||||
|
||||
Reference-style link: [oCIS repo][ocis-repo]
|
||||
|
||||
[ocis-repo]: https://github.com/owncloud/ocis "owncloud/ocis on GitHub"
|
||||
|
||||
## Code
|
||||
|
||||
Inline code: `const x = 42`
|
||||
|
||||
Block code:
|
||||
|
||||
```javascript
|
||||
function reviewDecision(status) {
|
||||
return status === 'approved' ? '✅' : '❌'
|
||||
}
|
||||
```
|
||||
|
||||
Code tabs (same snippet, two languages):
|
||||
|
||||
```javascript [id:js]
|
||||
console.log('Hello from JavaScript')
|
||||
```
|
||||
|
||||
```python [id:py]
|
||||
print("Hello from Python")
|
||||
```
|
||||
|
||||
Foldable code block (collapsed by default):
|
||||
|
||||
```json ::close
|
||||
{
|
||||
"id": "aurora",
|
||||
"phase": "development",
|
||||
"reviewers": ["alice", "bob"]
|
||||
}
|
||||
```
|
||||
|
||||
## Table
|
||||
|
||||
| Phase | Owner | Status |
|
||||
|---|:---:|---:|
|
||||
| Discovery | Product | Done |
|
||||
| Design | Design | Done |
|
||||
| Development | Engineering | In Progress |
|
||||
| Pilot | Product | Not Started |
|
||||
|
||||
## Horizontal Rule
|
||||
|
||||
---
|
||||
|
||||
## Math (KaTeX)
|
||||
|
||||
Inline math: the review SLA is $t_{review} \leq 24h$.
|
||||
|
||||
Block math:
|
||||
|
||||
$$
|
||||
\text{Turnaround} = \frac{\sum_{i=1}^{n} (t_{decision,i} - t_{submitted,i})}{n}
|
||||
$$
|
||||
|
||||
## Mermaid Diagram
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
A[Document Submitted] --> B{Routing Queue}
|
||||
B --> C[Reviewer Assigned]
|
||||
C --> D{Decision}
|
||||
D -->|Approve| E[Published]
|
||||
D -->|Reject| F[Returned to Submitter]
|
||||
```
|
||||
|
||||
See `Mermaid-Diagrams.md` in this folder for the full diagram-type gallery.
|
||||
|
||||
## Alerts / Admonitions
|
||||
|
||||
!!! note Note
|
||||
A plain note callout.
|
||||
!!!
|
||||
|
||||
!!! tip Tip
|
||||
Use the routing queue filter to focus on your own team's documents.
|
||||
!!!
|
||||
|
||||
!!! warning Warning
|
||||
Rejected documents are not automatically resubmitted.
|
||||
!!!
|
||||
|
||||
!!! danger Danger
|
||||
Do not delete the audit log table in production.
|
||||
!!!
|
||||
|
||||
!!! success Success
|
||||
Pilot rollout completed with zero SLA breaches.
|
||||
!!!
|
||||
|
||||
!!! info Info
|
||||
The API reference lives in `05-Documentation/API-Reference.md`.
|
||||
!!!
|
||||
|
||||
!!! bug Bug
|
||||
Mobile layout currently clips the decision panel on small screens.
|
||||
!!!
|
||||
|
||||
!!! example Example
|
||||
See `sample-request.json` in the API reference for a full payload example.
|
||||
!!!
|
||||
|
||||
!!! question Question
|
||||
Should bulk-approve be limited to low-risk documents only?
|
||||
!!!
|
||||
|
||||
!!! quote Quote
|
||||
"Move the decision, not the document." — Aurora design principle
|
||||
!!!
|
||||
|
||||
!!! hint Hint
|
||||
Keyboard shortcut `g` then `r` jumps to the review queue.
|
||||
!!!
|
||||
|
||||
!!! caution Caution
|
||||
Changing the routing rules affects in-flight reviews immediately.
|
||||
!!!
|
||||
|
||||
!!! error Error
|
||||
`413 Payload Too Large` — attachment exceeds the 25MB limit.
|
||||
!!!
|
||||
|
||||
!!! attention Attention
|
||||
Auth App Service must be enabled for App Tokens to work.
|
||||
!!!
|
||||
|
||||
!!! abstract Abstract
|
||||
This document showcases every markdown object type used across the Aurora
|
||||
demo project space.
|
||||
!!!
|
||||
|
||||
!!! failure Failure
|
||||
Build #482 failed: missing `WORKFLOWS_ENCRYPTION_KEY`.
|
||||
!!!
|
||||
@@ -0,0 +1,190 @@
|
||||
# Mermaid Diagram Gallery
|
||||
|
||||
One example of each standard Mermaid.js diagram type, themed around the Aurora
|
||||
review workflow.
|
||||
|
||||
## Flowchart
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
A[Document Submitted] --> B{Routing Queue}
|
||||
B --> C[Reviewer Assigned]
|
||||
C --> D{Decision}
|
||||
D -->|Approve| E[Published]
|
||||
D -->|Reject| F[Returned to Submitter]
|
||||
D -->|Request Changes| C
|
||||
```
|
||||
|
||||
## Sequence Diagram
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant S as Submitter
|
||||
participant A as Review API
|
||||
participant R as Reviewer
|
||||
S->>A: Submit document
|
||||
A->>R: Notify: new review assigned
|
||||
R->>A: POST /reviews/{id}/decision
|
||||
A->>S: Notify: decision recorded
|
||||
```
|
||||
|
||||
## Class Diagram
|
||||
|
||||
```mermaid
|
||||
classDiagram
|
||||
class Review {
|
||||
+string id
|
||||
+string title
|
||||
+string status
|
||||
+submit()
|
||||
+decide(decision)
|
||||
}
|
||||
class Reviewer {
|
||||
+string name
|
||||
+approve(Review)
|
||||
+reject(Review)
|
||||
}
|
||||
Reviewer "1" --> "many" Review : decides
|
||||
```
|
||||
|
||||
## State Diagram
|
||||
|
||||
```mermaid
|
||||
stateDiagram-v2
|
||||
[*] --> Pending
|
||||
Pending --> InReview: assigned
|
||||
InReview --> Approved: approve
|
||||
InReview --> Rejected: reject
|
||||
InReview --> Pending: request changes
|
||||
Approved --> [*]
|
||||
Rejected --> [*]
|
||||
```
|
||||
|
||||
## Entity Relationship Diagram
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
REVIEWER ||--o{ REVIEW : decides
|
||||
SUBMITTER ||--o{ REVIEW : submits
|
||||
REVIEW ||--o{ COMMENT : has
|
||||
REVIEW {
|
||||
string id
|
||||
string status
|
||||
date dueDate
|
||||
}
|
||||
```
|
||||
|
||||
## User Journey
|
||||
|
||||
```mermaid
|
||||
journey
|
||||
title Reviewer's Day
|
||||
section Morning
|
||||
Check review queue: 5: Reviewer
|
||||
Read new document: 3: Reviewer
|
||||
section Afternoon
|
||||
Approve document: 5: Reviewer
|
||||
Leave feedback comment: 4: Reviewer
|
||||
```
|
||||
|
||||
## Gantt Chart
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
title Aurora Delivery Plan
|
||||
dateFormat YYYY-MM-DD
|
||||
section Design
|
||||
Wireframes :done, des1, 2026-06-15, 2026-06-25
|
||||
Review & sign-off :done, des2, after des1, 5d
|
||||
section Engineering
|
||||
API implementation :active, dev1, 2026-07-13, 25d
|
||||
Frontend integration :dev2, after dev1, 15d
|
||||
section Rollout
|
||||
Pilot :2026-08-24, 12d
|
||||
```
|
||||
|
||||
## Pie Chart
|
||||
|
||||
```mermaid
|
||||
pie title Reviews by Outcome (last 30 days)
|
||||
"Approved" : 62
|
||||
"Rejected" : 15
|
||||
"Changes Requested" : 23
|
||||
```
|
||||
|
||||
## Quadrant Chart
|
||||
|
||||
```mermaid
|
||||
quadrantChart
|
||||
title Reach vs Effort
|
||||
x-axis Low Effort --> High Effort
|
||||
y-axis Low Reach --> High Reach
|
||||
quadrant-1 Do First
|
||||
quadrant-2 Plan
|
||||
quadrant-3 Deprioritize
|
||||
quadrant-4 Delegate
|
||||
Bulk Approve: [0.3, 0.8]
|
||||
Mobile Layout: [0.7, 0.4]
|
||||
Audit Export: [0.5, 0.6]
|
||||
```
|
||||
|
||||
## Requirement Diagram
|
||||
|
||||
```mermaid
|
||||
requirementDiagram
|
||||
requirement auditTrail {
|
||||
id: 1
|
||||
text: every decision must be recorded
|
||||
risk: high
|
||||
verifymethod: test
|
||||
}
|
||||
element reviewAPI {
|
||||
type: service
|
||||
}
|
||||
reviewAPI - satisfies -> auditTrail
|
||||
```
|
||||
|
||||
## Git Graph
|
||||
|
||||
```mermaid
|
||||
gitGraph
|
||||
commit id: "init"
|
||||
branch feature/routing-queue
|
||||
checkout feature/routing-queue
|
||||
commit id: "add queue skeleton"
|
||||
commit id: "add tests"
|
||||
checkout main
|
||||
merge feature/routing-queue
|
||||
commit id: "release 0.1.0" tag: "v0.1.0"
|
||||
```
|
||||
|
||||
## Mindmap
|
||||
|
||||
```mermaid
|
||||
mindmap
|
||||
root((Aurora))
|
||||
Planning
|
||||
Charter
|
||||
Timeline
|
||||
Design
|
||||
Wireframes
|
||||
Architecture
|
||||
Engineering
|
||||
Review API
|
||||
Routing Queue
|
||||
Rollout
|
||||
Pilot
|
||||
GA
|
||||
```
|
||||
|
||||
## Timeline
|
||||
|
||||
```mermaid
|
||||
timeline
|
||||
title Aurora Roadmap
|
||||
2026-06 : Discovery
|
||||
2026-06 to 2026-07 : Design
|
||||
2026-07 to 2026-08 : Development
|
||||
2026-08 : Pilot Rollout
|
||||
2026-09 : General Availability
|
||||
```
|
||||
@@ -0,0 +1,68 @@
|
||||
%PDF-1.3
|
||||
%“Œ‹ž ReportLab Generated PDF document (opensource)
|
||||
1 0 obj
|
||||
<<
|
||||
/F1 2 0 R
|
||||
>>
|
||||
endobj
|
||||
2 0 obj
|
||||
<<
|
||||
/BaseFont /Helvetica /Encoding /WinAnsiEncoding /Name /F1 /Subtype /Type1 /Type /Font
|
||||
>>
|
||||
endobj
|
||||
3 0 obj
|
||||
<<
|
||||
/Contents 7 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 6 0 R /Resources <<
|
||||
/Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ]
|
||||
>> /Rotate 0 /Trans <<
|
||||
|
||||
>>
|
||||
/Type /Page
|
||||
>>
|
||||
endobj
|
||||
4 0 obj
|
||||
<<
|
||||
/PageMode /UseNone /Pages 6 0 R /Type /Catalog
|
||||
>>
|
||||
endobj
|
||||
5 0 obj
|
||||
<<
|
||||
/Author (anonymous) /CreationDate (D:20260729080141+02'00') /Creator (anonymous) /Keywords () /ModDate (D:20260729080141+02'00') /Producer (ReportLab PDF Library - \(opensource\))
|
||||
/Subject (unspecified) /Title (Sample Archival PDF) /Trapped /False
|
||||
>>
|
||||
endobj
|
||||
6 0 obj
|
||||
<<
|
||||
/Count 1 /Kids [ 3 0 R ] /Type /Pages
|
||||
>>
|
||||
endobj
|
||||
7 0 obj
|
||||
<<
|
||||
/Filter [ /ASCII85Decode /FlateDecode ] /Length 215
|
||||
>>
|
||||
stream
|
||||
Gar?*bmT+g&B4,;(%8)`+"MqLq_Ea5JU?ahkq!abDWk^)hmZaD+9in2]_T5YL;Xgr[FW-^,;'j9$800#-j)\Ca#u@ohpjhXOX/j'IO4V\&Ph(9?A2:6aUH[l1%egNDZfJZpu3CAM\!P"Sd&UD,0^,B'$TK7]c/OS`n!7e0bVe2Kgm#EFG=(q2pS`s='P@9,ZNC>&b?\!+SrVUmfbK+5(!~>endstream
|
||||
endobj
|
||||
xref
|
||||
0 8
|
||||
0000000000 65535 f
|
||||
0000000061 00000 n
|
||||
0000000092 00000 n
|
||||
0000000199 00000 n
|
||||
0000000402 00000 n
|
||||
0000000470 00000 n
|
||||
0000000742 00000 n
|
||||
0000000801 00000 n
|
||||
trailer
|
||||
<<
|
||||
/ID
|
||||
[<01ff35e56a175f29dd2c4fecfc16304b><01ff35e56a175f29dd2c4fecfc16304b>]
|
||||
% ReportLab generated PDF document -- digest (opensource)
|
||||
|
||||
/Info 5 0 R
|
||||
/Root 4 0 R
|
||||
/Size 8
|
||||
>>
|
||||
startxref
|
||||
1106
|
||||
%%EOF
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<FictionBook xmlns="http://www.gribuser.ru/xml/fictionbook/2.0" xmlns:l="http://www.w3.org/1999/xlink">
|
||||
<description>
|
||||
<title-info>
|
||||
<genre>compjournalism</genre>
|
||||
<author><first-name>oCIS</first-name><last-name>Demo</last-name></author>
|
||||
<book-title>Sample FictionBook</book-title>
|
||||
<lang>en</lang>
|
||||
</title-info>
|
||||
<document-info>
|
||||
<author><nickname>oCIS Format Showcase</nickname></author>
|
||||
<id>sample-fb2-showcase</id>
|
||||
<version>1.0</version>
|
||||
</document-info>
|
||||
</description>
|
||||
<body>
|
||||
<section>
|
||||
<title><p>Sample Chapter</p></title>
|
||||
<p>This is a sample FictionBook (.fb2) document generated for the oCIS format showcase.</p>
|
||||
</section>
|
||||
</body>
|
||||
</FictionBook>
|
||||
@@ -0,0 +1,3 @@
|
||||
name,role,department
|
||||
Ada Lovelace,Engineer,R&D
|
||||
Grace Hopper,Admiral,Navy
|
||||
|
@@ -0,0 +1,20 @@
|
||||
TABLE
|
||||
0,1
|
||||
"Sample Data"
|
||||
VECTORS
|
||||
0,1
|
||||
""
|
||||
TUPLES
|
||||
0,2
|
||||
""
|
||||
DATA
|
||||
0,0
|
||||
""
|
||||
BOT
|
||||
1,0
|
||||
"Name"
|
||||
BOT
|
||||
1,0
|
||||
"Ada Lovelace"
|
||||
-1,0
|
||||
EOD
|
||||
@@ -0,0 +1,9 @@
|
||||
ID;PWXL;N;E
|
||||
P;PGeneral
|
||||
F;P0;DG0G8;M255
|
||||
B;Y2;X2
|
||||
C;Y1;X1;K"Name"
|
||||
C;Y1;X2;K"Role"
|
||||
C;Y2;X1;K"Ada Lovelace"
|
||||
C;Y2;X2;K"Engineer"
|
||||
E
|
||||
@@ -0,0 +1,3 @@
|
||||
name role department
|
||||
Ada Lovelace Engineer R&D
|
||||
Grace Hopper Admiral Navy
|
||||
|
@@ -0,0 +1,20 @@
|
||||
0
|
||||
SECTION
|
||||
2
|
||||
HEADER
|
||||
0
|
||||
ENDSEC
|
||||
0
|
||||
SECTION
|
||||
2
|
||||
TABLES
|
||||
0
|
||||
ENDSEC
|
||||
0
|
||||
SECTION
|
||||
2
|
||||
ENTITIES
|
||||
0
|
||||
ENDSEC
|
||||
0
|
||||
EOF
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
|
||||
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
|
||||
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
|
||||
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
|
||||
office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
|
||||
<office:body>
|
||||
<office:text>
|
||||
<text:p>Sample flat ODF text document (.fodt), generated for the oCIS format showcase.</text:p>
|
||||
</office:text>
|
||||
</office:body>
|
||||
</office:document>
|
||||
@@ -0,0 +1,15 @@
|
||||
{\rtf1\ansi\ansicpg1252\deff0\nouicompat{\fonttbl{\f0\fswiss\fcharset0 Helvetica;}}
|
||||
{\colortbl;\red13\green133\blue111;}
|
||||
\viewkind4\uc1
|
||||
\pard\sa200\sl276\slmult1\qc\b\fs32\cf1 Aurora - Sample RTF Document\b0\fs22\par
|
||||
\pard\sa200\sl276\slmult1\qj\cf0
|
||||
This .rtf file is part of the file-type coverage set for the Demo Space.\par
|
||||
\par
|
||||
\b Status Summary\b0\par
|
||||
Design: complete\par
|
||||
Engineering: in progress\par
|
||||
\par
|
||||
\b Next Steps\b0\par
|
||||
- Finalize the API contract for the decision endpoint.\par
|
||||
- Confirm pilot team list with product.\par
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
|
||||
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
|
||||
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
|
||||
office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.graphics">
|
||||
<office:body>
|
||||
<office:drawing>
|
||||
<draw:page draw:name="page1">
|
||||
<draw:frame draw:layer="layout"><draw:text-box><text:p>Sample flat ODF drawing (.fodg)</text:p></draw:text-box></draw:frame>
|
||||
</draw:page>
|
||||
</office:drawing>
|
||||
</office:body>
|
||||
</office:document>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
|
||||
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
|
||||
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
|
||||
office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.presentation">
|
||||
<office:body>
|
||||
<office:presentation>
|
||||
<draw:page draw:name="page1">
|
||||
<draw:frame draw:layer="layout"><draw:text-box><text:p>Sample flat ODF presentation (.fodp)</text:p></draw:text-box></draw:frame>
|
||||
</draw:page>
|
||||
</office:presentation>
|
||||
</office:body>
|
||||
</office:document>
|
||||
@@ -0,0 +1,74 @@
|
||||
%PDF-1.4
|
||||
%“Œ‹ž ReportLab Generated PDF document (opensource)
|
||||
1 0 obj
|
||||
<<
|
||||
/F1 2 0 R /F2 3 0 R
|
||||
>>
|
||||
endobj
|
||||
2 0 obj
|
||||
<<
|
||||
/BaseFont /Helvetica /Encoding /WinAnsiEncoding /Name /F1 /Subtype /Type1 /Type /Font
|
||||
>>
|
||||
endobj
|
||||
3 0 obj
|
||||
<<
|
||||
/BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding /Name /F2 /Subtype /Type1 /Type /Font
|
||||
>>
|
||||
endobj
|
||||
4 0 obj
|
||||
<<
|
||||
/Contents 8 0 R /MediaBox [ 0 0 612 792 ] /Parent 7 0 R /Resources <<
|
||||
/Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ]
|
||||
>> /Rotate 0 /Trans <<
|
||||
|
||||
>>
|
||||
/Type /Page
|
||||
>>
|
||||
endobj
|
||||
5 0 obj
|
||||
<<
|
||||
/PageMode /UseNone /Pages 7 0 R /Type /Catalog
|
||||
>>
|
||||
endobj
|
||||
6 0 obj
|
||||
<<
|
||||
/Author (\(anonymous\)) /CreationDate (D:20260727151859+02'00') /Creator (\(unspecified\)) /Keywords () /ModDate (D:20260727151859+02'00') /Producer (ReportLab PDF Library - \(opensource\))
|
||||
/Subject (\(unspecified\)) /Title (\(anonymous\)) /Trapped /False
|
||||
>>
|
||||
endobj
|
||||
7 0 obj
|
||||
<<
|
||||
/Count 1 /Kids [ 4 0 R ] /Type /Pages
|
||||
>>
|
||||
endobj
|
||||
8 0 obj
|
||||
<<
|
||||
/Filter [ /ASCII85Decode /FlateDecode ] /Length 849
|
||||
>>
|
||||
stream
|
||||
Gau0Ahf%4&&:WfG\49T!R@Q=Pp=>4Hl83@bjKU?M(iYbmR:FrnJ,M!C;?DNMSMXK"3Ih%r]CYhlJ`*3pHW^DtcJ[^l"mSI`#0K%4flssO-GLn77E,X%WK1Go&Sojb$#ZNA9Xpug(*@5<YkW[b5md'`SDnRtK'Cf\/"OS1n&MZRbGsJSTA@:GYEUpe+FAe.!\P#WTSPZLLI,J$#W]=_U[id[%tc,c81SVID++n?[9CIOTGm`,jk>5gK@t9\]/2/ULS]=V3o=nT\Uh0:G'V)#"cFj;Ej$-@.$m@iEbY0SCbdM"Z#UX-2nKtD]<]ZRbF$a49cX+G&mXXdgSU\Y!7Mgh`C><^]_bZ&1&C%6$m0VZ7.5>E/N6":Y(bZ$H5.&BXYuX"or-o<%&>gmjSe>f7*,fNFOj`T41d9>84YGV?Kfil9#5"'kbkNP,S;!m^]GU93<>+nFFb.NE'!]lE2c,f4`q>X?6aALhr]&g9+OCbk*!0_T?i\d@9c'\4jI&'&(o4Qn^TVM`2MdbM;$g?QSDbtG-9A1[kqU;3`[QQ"<)h53/F]]0s>Kq3i=!;`+dk%4n1j=-'r7rBTKu]HaPt^()D9J@=DD79qd!Qcf;qO#u)WOa1q@UE=&5K&h@g]iM;!X[?9$.%P2-$EJl4A6Isk0db05N[Gdpf@6$Cg:7R;u9iMRuS%Xsh`,?IIXBi=t]tnNh6*buSO?`MY!t3#Id?YBSk'6=E)g4d=_*-.)5+q=$LSuGHh]$Y^A6t'VgqG4=o36%?dcc(hIqVl1.;GP%E4N!5OCn-u$!\kW&()\u-Sc[t(F@["QV`N*))+0+Tb+V_B485CIr@BdEB#ZJ$_e")I/~>endstream
|
||||
endobj
|
||||
xref
|
||||
0 9
|
||||
0000000000 65535 f
|
||||
0000000061 00000 n
|
||||
0000000102 00000 n
|
||||
0000000209 00000 n
|
||||
0000000321 00000 n
|
||||
0000000514 00000 n
|
||||
0000000582 00000 n
|
||||
0000000862 00000 n
|
||||
0000000921 00000 n
|
||||
trailer
|
||||
<<
|
||||
/ID
|
||||
[<7aa0530cf3b7211aa876310ca7f14769><7aa0530cf3b7211aa876310ca7f14769>]
|
||||
% ReportLab generated PDF document -- digest (opensource)
|
||||
|
||||
/Info 6 0 R
|
||||
/Root 5 0 R
|
||||
/Size 9
|
||||
>>
|
||||
startxref
|
||||
1860
|
||||
%%EOF
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"url": "https://docs.google.com/spreadsheets/d/1SampleShowcaseSpreadsheetId/edit?usp=drivesdk",
|
||||
"resource_id": "spreadsheet:1SampleShowcaseSpreadsheetId"
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"url": "https://docs.google.com/presentation/d/1SampleShowcasePresentationId/edit?usp=drivesdk",
|
||||
"resource_id": "presentation:1SampleShowcasePresentationId"
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
|
||||
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
|
||||
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
|
||||
office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
|
||||
<office:body>
|
||||
<office:spreadsheet>
|
||||
<table:table table:name="Sheet1">
|
||||
<table:table-row>
|
||||
<table:table-cell office:value-type="string"><text:p>Name</text:p></table:table-cell>
|
||||
<table:table-cell office:value-type="string"><text:p>Ada Lovelace</text:p></table:table-cell>
|
||||
</table:table-row>
|
||||
</table:table>
|
||||
</office:spreadsheet>
|
||||
</office:body>
|
||||
</office:document>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="200" viewBox="0 0 600 200">
|
||||
<rect width="600" height="200" fill="#f0f4f8"/>
|
||||
<rect x="20" y="70" width="160" height="60" rx="8" fill="#dae8fc" stroke="#6c8ebf" stroke-width="2"/>
|
||||
<text x="100" y="105" font-family="sans-serif" font-size="14" text-anchor="middle" fill="#333">Submitted</text>
|
||||
|
||||
<rect x="220" y="70" width="160" height="60" rx="8" fill="#ffe6cc" stroke="#d79b00" stroke-width="2"/>
|
||||
<text x="300" y="105" font-family="sans-serif" font-size="14" text-anchor="middle" fill="#333">In Review</text>
|
||||
|
||||
<rect x="420" y="70" width="160" height="60" rx="8" fill="#d5e8d4" stroke="#82b366" stroke-width="2"/>
|
||||
<text x="500" y="105" font-family="sans-serif" font-size="14" text-anchor="middle" fill="#333">Approved</text>
|
||||
|
||||
<line x1="180" y1="100" x2="220" y2="100" stroke="#333" stroke-width="2" marker-end="url(#arrow)"/>
|
||||
<line x1="380" y1="100" x2="420" y2="100" stroke="#333" stroke-width="2" marker-end="url(#arrow)"/>
|
||||
|
||||
<defs>
|
||||
<marker id="arrow" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth">
|
||||
<path d="M0,0 L0,6 L9,3 z" fill="#333"/>
|
||||
</marker>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
@@ -0,0 +1,2 @@
|
||||
[InternetShortcut]
|
||||
URL=https://owncloud.dev/ocis/
|
||||
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 693 B |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 9.6 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
@@ -0,0 +1,2 @@
|
||||
<!DOCTYPE html>
|
||||
<html><head><title>Sample HTM</title></head><body><h1>Sample .htm file</h1><p>Generated for the oCIS format showcase.</p></body></html>
|
||||
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Aurora - Sample HTML File</title>
|
||||
<style>
|
||||
body { font-family: sans-serif; margin: 2rem; }
|
||||
.status-approved { color: green; font-weight: bold; }
|
||||
table { border-collapse: collapse; }
|
||||
td, th { border: 1px solid #ccc; padding: 0.4rem 0.8rem; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Aurora Review Status</h1>
|
||||
<p>Sample standalone HTML file included in the file-type coverage set.</p>
|
||||
<table>
|
||||
<tr><th>Document</th><th>Status</th></tr>
|
||||
<tr><td>Charter</td><td class="status-approved">Approved</td></tr>
|
||||
<tr><td>Wireframes</td><td class="status-approved">Approved</td></tr>
|
||||
<tr><td>API Contract</td><td>Pending</td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"title": "Format Showcase",
|
||||
"note": "Generated for the oCIS demo-content showcase."
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
MIME-Version: 1.0
|
||||
Content-Type: multipart/related; boundary="----=_NextPart_ocis_showcase"
|
||||
|
||||
------=_NextPart_ocis_showcase
|
||||
Content-Type: text/html; charset="utf-8"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
Content-Location: file:///sample.mhtml
|
||||
|
||||
<html><body><h1>Sample MHTML</h1><p>Generated for the oCIS format showcase.</p></body></html>
|
||||
------=_NextPart_ocis_showcase--
|
||||
@@ -0,0 +1,12 @@
|
||||
Aurora - Plain Text Sample
|
||||
===========================
|
||||
|
||||
This is a plain .txt file included as part of the file-type coverage set for
|
||||
the Demo Space.
|
||||
|
||||
Status report (2026-07-24):
|
||||
- Design: complete
|
||||
- Engineering: in progress
|
||||
- Pilot rollout: scheduled for 2026-08-24
|
||||
|
||||
Contact: [Add contact here]
|
||||
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Sample XHTML</title></head><body><h1>Sample .xhtml file</h1></body></html>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<sample>
|
||||
<title>Format Showcase</title>
|
||||
<note>Generated for the oCIS demo-content showcase.</note>
|
||||
</sample>
|
||||
@@ -0,0 +1,25 @@
|
||||
# Aurora — Project Overview
|
||||
|
||||
**Aurora** is a demo initiative to modernize the internal document review workflow,
|
||||
replacing a manual, email-based process with a self-service portal built on
|
||||
oCIS Infinite Scale.
|
||||
|
||||
## Goals
|
||||
|
||||
- Cut average document turnaround time from 5 days to 1 day
|
||||
- Give reviewers a single place to see what's pending
|
||||
- Keep a full audit trail of every review decision
|
||||
|
||||
## Status
|
||||
|
||||
🟡 In Design — see `02-Design/` for current architecture notes.
|
||||
|
||||
## Folder Guide
|
||||
|
||||
| Folder | Contents |
|
||||
|---|---|
|
||||
| `01-Planning` | Charter, timeline |
|
||||
| `02-Design` | Architecture diagram, UI notes |
|
||||
| `03-Development` | Engineering README, changelog |
|
||||
| `04-Meeting-Notes` | Kickoff and standup notes |
|
||||
| `05-Documentation` | User guide, API reference |
|
||||
@@ -0,0 +1,6 @@
|
||||
# Demo Space
|
||||
|
||||
A demo project space for **Aurora**, an internal document-review portal built on
|
||||
oCIS Infinite Scale. Contains planning docs, design assets, engineering notes,
|
||||
meeting notes, and a comprehensive file-type/markdown-feature showcase under
|
||||
`06-Format-Showcase/`.
|
||||
@@ -31,7 +31,7 @@ services:
|
||||
# INSECURE: needed if oCIS / Traefik is using self generated certificates
|
||||
OCIS_INSECURE: "${INSECURE:-false}"
|
||||
# basic auth (not recommended, but needed for eg. WebDav clients that do not support OpenID Connect)
|
||||
PROXY_ENABLE_BASIC_AUTH: "${PROXY_ENABLE_BASIC_AUTH:-false}"
|
||||
PROXY_ENABLE_BASIC_AUTH: "${PROXY_ENABLE_BASIC_AUTH:-${DEMO_USERS:-false}}"
|
||||
# admin user password
|
||||
IDM_ADMIN_PASSWORD: "${ADMIN_PASSWORD:-admin}" # this overrides the admin password from the configuration file
|
||||
# demo users
|
||||
@@ -56,6 +56,7 @@ services:
|
||||
volumes:
|
||||
- ./config/ocis/app-registry.yaml:/etc/ocis/app-registry.yaml
|
||||
- ./config/ocis/csp.yaml:/etc/ocis/csp.yaml
|
||||
- ./config/ocis/web.yaml:/etc/ocis/web.yaml
|
||||
- ./config/ocis/banned-password-list.txt:/etc/ocis/banned-password-list.txt
|
||||
# configure the .env file to use own paths instead of docker internal volumes
|
||||
- ${OCIS_CONFIG_DIR:-ocis-config}:/etc/ocis
|
||||
@@ -74,3 +75,113 @@ services:
|
||||
volumes:
|
||||
ocis-config:
|
||||
ocis-data:
|
||||
|
||||
# apps.yaml is defined here (inline, rather than as a plain bind-mounted file)
|
||||
# so that Docker Compose's own ${VAR:-default} interpolation resolves the
|
||||
# values below. oCIS's own env-var templating in mounted config files does
|
||||
# NOT work for these per-app "config:" blocks (they bind to a generic
|
||||
# map[string]any in the web service, which bypasses oCIS's env-parsing
|
||||
# decode hook) - so this file must never go back to a plain bind mount with
|
||||
# ocis-style ${VAR|default} placeholders, those are silently never resolved.
|
||||
configs:
|
||||
apps_yaml:
|
||||
content: |
|
||||
importer:
|
||||
config:
|
||||
companionUrl: https://${COMPANION_DOMAIN:-companion.owncloud.test}
|
||||
supportedClouds:
|
||||
- WebdavPublicLink
|
||||
#- OneDrive # needs a client id and secret
|
||||
#- GoogleDrive # needs a client id and secret and an addition to the DNS zone
|
||||
drawio:
|
||||
config:
|
||||
# Points the draw-io web extension at our self-hosted instance
|
||||
# (see web_extensions/drawio.yml) instead of its default,
|
||||
# the public https://embed.diagrams.net.
|
||||
url: "https://${DRAWIO_DOMAIN:-drawio.owncloud.test}"
|
||||
external-sites:
|
||||
config:
|
||||
sites:
|
||||
# For settings see: https://github.com/owncloud/web-extensions/tree/main/packages/web-app-external-sites
|
||||
- name: ownCloud
|
||||
url: "https://owncloud.dev"
|
||||
target: embedded
|
||||
color: "#0D856F"
|
||||
icon: cloud
|
||||
priority: 50
|
||||
- name: Kiteworks Open Source Program Office
|
||||
url: "https://www.kiteworks.com/opensource"
|
||||
target: external
|
||||
icon: info-i.svg
|
||||
priority: 99
|
||||
|
||||
# The following config blocks are required by the ai-* web extensions and
|
||||
# chat-with-file/version-changelog. They all call the ai-llm-proxy service
|
||||
# (see web_extensions/ai-llm-proxy.yml), which must be enabled for these to work.
|
||||
chat-with-file:
|
||||
config:
|
||||
llm:
|
||||
endpoint: 'https://${OCIS_DOMAIN:-ocis.owncloud.test}/ai-llm-proxy/v1'
|
||||
model: '${AI_LLM_MODEL_DEFAULT:-llama3.2}'
|
||||
version-changelog:
|
||||
config:
|
||||
llm:
|
||||
endpoint: 'https://${OCIS_DOMAIN:-ocis.owncloud.test}/ai-llm-proxy/v1'
|
||||
model: '${AI_LLM_MODEL_DEFAULT:-llama3.2}'
|
||||
ai-doc-summary:
|
||||
config:
|
||||
llm:
|
||||
endpoint: 'https://${OCIS_DOMAIN:-ocis.owncloud.test}/ai-llm-proxy/v1'
|
||||
model: '${AI_LLM_MODEL_DEFAULT:-llama3.2}'
|
||||
ai-image-alt-text-sidebar:
|
||||
config:
|
||||
llm:
|
||||
endpoint: 'https://${OCIS_DOMAIN:-ocis.owncloud.test}/ai-llm-proxy/v1'
|
||||
model: '${AI_LLM_MODEL_VISION:-llava:7b}'
|
||||
ai-data-insights-sidebar:
|
||||
config:
|
||||
llm:
|
||||
endpoint: 'https://${OCIS_DOMAIN:-ocis.owncloud.test}/ai-llm-proxy/v1'
|
||||
model: '${AI_LLM_MODEL_DEFAULT:-llama3.2}'
|
||||
ai-sensitive-data-scanner:
|
||||
config:
|
||||
llm:
|
||||
endpoint: 'https://${OCIS_DOMAIN:-ocis.owncloud.test}/ai-llm-proxy/v1'
|
||||
model: '${AI_LLM_MODEL_DEFAULT:-llama3.2}'
|
||||
ai-folder-brief-sidebar:
|
||||
config:
|
||||
llm:
|
||||
endpoint: 'https://${OCIS_DOMAIN:-ocis.owncloud.test}/ai-llm-proxy/v1'
|
||||
model: '${AI_LLM_MODEL_DEFAULT:-llama3.2}'
|
||||
# The following extensions have no published docker image and build from git,
|
||||
# see web_extensions/<name>.yml for details.
|
||||
ai-folder-readme-generator:
|
||||
config:
|
||||
llm:
|
||||
endpoint: 'https://${OCIS_DOMAIN:-ocis.owncloud.test}/ai-llm-proxy/v1'
|
||||
model: '${AI_LLM_MODEL_DEFAULT:-llama3.2}'
|
||||
ai-multi-doc-synthesizer:
|
||||
config:
|
||||
llm:
|
||||
endpoint: 'https://${OCIS_DOMAIN:-ocis.owncloud.test}/ai-llm-proxy/v1'
|
||||
model: '${AI_LLM_MODEL_DEFAULT:-llama3.2}'
|
||||
ai-quick-draft-creator:
|
||||
config:
|
||||
llm:
|
||||
endpoint: 'https://${OCIS_DOMAIN:-ocis.owncloud.test}/ai-llm-proxy/v1'
|
||||
model: '${AI_LLM_MODEL_DEFAULT:-llama3.2}'
|
||||
ai-smart-collections-nav:
|
||||
config:
|
||||
llm:
|
||||
endpoint: 'https://${OCIS_DOMAIN:-ocis.owncloud.test}/ai-llm-proxy/v1'
|
||||
model: '${AI_LLM_MODEL_DEFAULT:-llama3.2}'
|
||||
ai-smart-file-tagger-qa:
|
||||
config:
|
||||
llm:
|
||||
endpoint: 'https://${OCIS_DOMAIN:-ocis.owncloud.test}/ai-llm-proxy/v1'
|
||||
model: '${AI_LLM_MODEL_DEFAULT:-llama3.2}'
|
||||
|
||||
# oCIS Workflows (owncloud/ocis-workflows), see workflows.yml.
|
||||
workflows:
|
||||
config:
|
||||
backendUrl: "https://${OCIS_DOMAIN:-ocis.owncloud.test}/workflows/api/v1beta1"
|
||||
@@ -0,0 +1,12 @@
|
||||
FROM node:24.16.0-alpine3.24 AS build
|
||||
RUN corepack enable && corepack prepare pnpm@latest --activate
|
||||
WORKDIR /app
|
||||
COPY package.json tsconfig.json ./
|
||||
COPY src ./src
|
||||
RUN pnpm install --ignore-scripts && pnpm build
|
||||
|
||||
FROM node:24.16.0-alpine3.24
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/dist ./dist
|
||||
EXPOSE 3030
|
||||
CMD ["node", "dist/index.js"]
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "ai-llm-proxy",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"description": "Server-side proxy for the AI Document Summary extension — validates oCIS auth and forwards requests to the configured LLM",
|
||||
"license": "Apache-2.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"dev": "node --watch dist/index.js",
|
||||
"start": "node dist/index.js",
|
||||
"test:unit": "vitest run",
|
||||
"test:e2e": "echo 'No E2E tests for ai-llm-proxy'"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^24.13.3",
|
||||
"typescript": "^5.4.0",
|
||||
"vitest": "4.1.10"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,363 @@
|
||||
import http from 'node:http'
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Config (all values come from environment variables)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const PORT = parseInt(process.env.PORT ?? '3030', 10)
|
||||
const LLM_ENDPOINT = (process.env.LLM_ENDPOINT ?? '').replace(/\/$/, '')
|
||||
const LLM_API_KEY = process.env.LLM_API_KEY ?? ''
|
||||
const OCIS_URL = (process.env.OCIS_URL ?? '').replace(/\/$/, '')
|
||||
/**
|
||||
* Origin (scheme://host:port) permitted to call the proxy, derived from
|
||||
* OCIS_URL. Empty when OCIS_URL is unset or unparseable, in which case the
|
||||
* origin gate cannot be enforced (the server refuses to start without
|
||||
* OCIS_URL outside tests, so this only matters in unit tests).
|
||||
*/
|
||||
const ALLOWED_ORIGIN = (() => {
|
||||
if (!OCIS_URL) return ''
|
||||
try {
|
||||
return new URL(OCIS_URL).origin
|
||||
} catch {
|
||||
return ''
|
||||
}
|
||||
})()
|
||||
/** When set, overrides the model field sent by the client. */
|
||||
const LLM_MODEL = process.env.LLM_MODEL ?? ''
|
||||
/** Hard ceiling on max_tokens forwarded to the LLM (default 4 096). */
|
||||
const LLM_MAX_TOKENS = parseInt(process.env.LLM_MAX_TOKENS ?? '4096', 10)
|
||||
/** Maximum request body the proxy will buffer in bytes (default 6 MiB — covers a 4 MiB image after base64 encoding). */
|
||||
const MAX_BODY_BYTES = parseInt(process.env.MAX_BODY_BYTES ?? '6291456', 10)
|
||||
/** Maximum LLM requests per user per rolling minute (default 20). */
|
||||
const RATE_LIMIT_RPM = parseInt(process.env.RATE_LIMIT_RPM ?? '20', 10)
|
||||
/**
|
||||
* How long to wait for the upstream LLM to finish a completion before
|
||||
* aborting (default 10 minutes). Local/self-hosted reasoning models (e.g.
|
||||
* Ollama) can legitimately take several minutes to generate a few hundred
|
||||
* tokens on modest hardware, with significant run-to-run variance (measured
|
||||
* 195s and 296s for near-identical completion lengths on the same machine),
|
||||
* so this must have real headroom rather than assume a fast, consistent
|
||||
* hosted API.
|
||||
*/
|
||||
const LLM_TIMEOUT_MS = parseInt(process.env.LLM_TIMEOUT_MS ?? '600000', 10)
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// OIDC discovery — lazily fetched on first request, userinfo_endpoint cached
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
let userinfoEndpoint: string | null = null
|
||||
|
||||
async function resolveUserinfoEndpoint(): Promise<string> {
|
||||
if (userinfoEndpoint) return userinfoEndpoint
|
||||
const discoveryUrl = `${OCIS_URL}/.well-known/openid-configuration`
|
||||
const res = await fetch(discoveryUrl)
|
||||
if (!res.ok) {
|
||||
throw new Error(`OIDC discovery failed: ${res.status} ${res.statusText}`)
|
||||
}
|
||||
const doc = (await res.json()) as { userinfo_endpoint?: string }
|
||||
if (!doc.userinfo_endpoint) {
|
||||
throw new Error('OIDC discovery document missing userinfo_endpoint')
|
||||
}
|
||||
userinfoEndpoint = doc.userinfo_endpoint
|
||||
console.log(`[ai-llm-proxy] userinfo_endpoint: ${userinfoEndpoint}`)
|
||||
return userinfoEndpoint
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Token validation — returns the user's `sub` claim, or null if invalid
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
async function validateOcisToken(authorizationHeader: string): Promise<string | null> {
|
||||
const endpoint = await resolveUserinfoEndpoint()
|
||||
const res = await fetch(endpoint, {
|
||||
headers: { Authorization: authorizationHeader }
|
||||
})
|
||||
if (!res.ok) return null
|
||||
const info = (await res.json()) as { sub?: string }
|
||||
return typeof info.sub === 'string' ? info.sub : null
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Per-user sliding-window rate limiter
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/** Exported so tests can reset state between runs. */
|
||||
export const rateLimitWindows = new Map<string, number[]>()
|
||||
|
||||
/**
|
||||
* Returns true when the request is within the allowed rate, false when the
|
||||
* user has exceeded `rpm` requests in the last 60 seconds.
|
||||
* The `rpm` parameter defaults to the module-level RATE_LIMIT_RPM constant;
|
||||
* pass an explicit value in tests to avoid coupling to the env-var default.
|
||||
*/
|
||||
export function checkRateLimit(sub: string, rpm = RATE_LIMIT_RPM): boolean {
|
||||
const now = Date.now()
|
||||
const timestamps = (rateLimitWindows.get(sub) ?? []).filter((t) => now - t < 60_000)
|
||||
if (timestamps.length >= rpm) return false
|
||||
timestamps.push(now)
|
||||
rateLimitWindows.set(sub, timestamps)
|
||||
return true
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Body helpers
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export class BodyTooLargeError extends Error {}
|
||||
|
||||
/**
|
||||
* Reads the request body, enforcing a hard byte limit.
|
||||
* Throws BodyTooLargeError when the limit is exceeded.
|
||||
*/
|
||||
export function readBody(req: http.IncomingMessage, maxBytes: number): Promise<string> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const chunks: Buffer[] = []
|
||||
let totalBytes = 0
|
||||
req.on('data', (chunk: Buffer) => {
|
||||
totalBytes += chunk.length
|
||||
if (totalBytes > maxBytes) {
|
||||
reject(new BodyTooLargeError('Request body too large'))
|
||||
return
|
||||
}
|
||||
chunks.push(chunk)
|
||||
})
|
||||
req.on('end', () => resolve(Buffer.concat(chunks).toString('utf8')))
|
||||
req.on('error', reject)
|
||||
})
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Body sanitization
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
interface ClientBody {
|
||||
model?: unknown
|
||||
messages?: unknown
|
||||
max_tokens?: unknown
|
||||
stream?: unknown
|
||||
temperature?: unknown
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
export interface SanitizedBody {
|
||||
model: string
|
||||
messages: unknown[]
|
||||
max_tokens: number
|
||||
temperature?: number
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates and sanitizes the client JSON body. Returns the clean object or
|
||||
* an `{ error }` descriptor when the body is unacceptable.
|
||||
*
|
||||
* - `modelOverride`: when non-empty, replaces whatever model the client sent
|
||||
* - `maxTokensLimit`: client's max_tokens is silently clamped to this ceiling
|
||||
*
|
||||
* Only the fields the LLM actually needs are forwarded; everything else is
|
||||
* dropped to prevent the client from injecting unexpected parameters.
|
||||
*/
|
||||
export function sanitizeBody(
|
||||
raw: ClientBody,
|
||||
modelOverride: string,
|
||||
maxTokensLimit: number
|
||||
): SanitizedBody | { error: string } {
|
||||
const model = modelOverride || (typeof raw.model === 'string' ? raw.model : '')
|
||||
if (!model) return { error: 'model is required' }
|
||||
|
||||
if (!Array.isArray(raw.messages)) return { error: 'messages must be an array' }
|
||||
|
||||
const requestedTokens =
|
||||
typeof raw.max_tokens === 'number' && raw.max_tokens > 0 ? raw.max_tokens : maxTokensLimit
|
||||
|
||||
const result: SanitizedBody = {
|
||||
model,
|
||||
messages: raw.messages as unknown[],
|
||||
max_tokens: Math.min(requestedTokens, maxTokensLimit)
|
||||
}
|
||||
|
||||
if (typeof raw.temperature === 'number') result.temperature = raw.temperature
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Helpers
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
function setCorsHeaders(res: http.ServerResponse): void {
|
||||
res.setHeader('Access-Control-Allow-Origin', OCIS_URL || '*')
|
||||
res.setHeader('Access-Control-Allow-Methods', 'POST, OPTIONS')
|
||||
res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization')
|
||||
res.setHeader('Access-Control-Max-Age', '86400')
|
||||
}
|
||||
|
||||
/**
|
||||
* Authoritative server-side origin check.
|
||||
*
|
||||
* CORS response headers (set by `setCorsHeaders`) are advisory and enforced
|
||||
* only by the browser, so they cannot stop a non-browser or hostile client
|
||||
* from reaching the LLM. This is the server-side gate that actually rejects
|
||||
* requests from an unexpected origin.
|
||||
*
|
||||
* A cross-origin browser request always carries an `Origin` header (and so
|
||||
* does a same-origin non-GET request, which is what the oCIS web extensions
|
||||
* issue), so a genuine call from the oCIS UI always presents
|
||||
* `Origin: <OCIS_URL origin>`. Any other present origin is a cross-site
|
||||
* request and is rejected. A request with no `Origin` header cannot be a
|
||||
* cross-site browser request and is still gated by the mandatory oCIS bearer
|
||||
* token, so it is allowed through to token validation.
|
||||
*
|
||||
* @param origin the incoming request's `Origin` header value, if any
|
||||
* @param expected the allowed origin (scheme://host:port); empty disables the check
|
||||
* @returns true when the request may proceed
|
||||
*/
|
||||
export function isOriginAllowed(origin: string | undefined, expected: string): boolean {
|
||||
if (!expected) return true
|
||||
if (origin !== undefined && origin !== expected) return false
|
||||
return true
|
||||
}
|
||||
|
||||
function sendJson(res: http.ServerResponse, status: number, body: unknown): void {
|
||||
const payload = JSON.stringify(body)
|
||||
res.writeHead(status, { 'Content-Type': 'application/json' })
|
||||
res.end(payload)
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Request handler
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
async function handleRequest(req: http.IncomingMessage, res: http.ServerResponse): Promise<void> {
|
||||
setCorsHeaders(res)
|
||||
|
||||
// Preflight
|
||||
if (req.method === 'OPTIONS') {
|
||||
res.writeHead(204)
|
||||
res.end()
|
||||
return
|
||||
}
|
||||
|
||||
// Only POST /v1/chat/completions
|
||||
if (req.method !== 'POST' || req.url !== '/v1/chat/completions') {
|
||||
sendJson(res, 404, { error: 'Not found' })
|
||||
return
|
||||
}
|
||||
|
||||
// Authoritative server-side origin check (CORS headers above are advisory).
|
||||
// Reject cross-site requests before doing any work.
|
||||
const originHeader = req.headers['origin']
|
||||
const origin = Array.isArray(originHeader) ? originHeader[0] : originHeader
|
||||
if (!isOriginAllowed(origin, ALLOWED_ORIGIN)) {
|
||||
sendJson(res, 403, { error: 'Origin not allowed' })
|
||||
return
|
||||
}
|
||||
|
||||
const authHeader = req.headers['authorization']
|
||||
if (!authHeader) {
|
||||
sendJson(res, 401, { error: 'Missing Authorization header' })
|
||||
return
|
||||
}
|
||||
|
||||
let userSub: string | null
|
||||
try {
|
||||
userSub = await validateOcisToken(authHeader)
|
||||
} catch (err) {
|
||||
console.error('[ai-llm-proxy] Token validation error:', err)
|
||||
sendJson(res, 502, { error: 'Could not reach oCIS to validate token' })
|
||||
return
|
||||
}
|
||||
|
||||
if (!userSub) {
|
||||
sendJson(res, 401, { error: 'Invalid or expired oCIS token' })
|
||||
return
|
||||
}
|
||||
|
||||
if (!checkRateLimit(userSub)) {
|
||||
sendJson(res, 429, { error: 'Rate limit exceeded. Please slow down.' })
|
||||
return
|
||||
}
|
||||
|
||||
let rawBodyStr: string
|
||||
try {
|
||||
rawBodyStr = await readBody(req, MAX_BODY_BYTES)
|
||||
} catch (err) {
|
||||
if (err instanceof BodyTooLargeError) {
|
||||
sendJson(res, 413, { error: 'Request body too large' })
|
||||
} else {
|
||||
sendJson(res, 400, { error: 'Could not read request body' })
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
let parsed: ClientBody
|
||||
try {
|
||||
parsed = JSON.parse(rawBodyStr) as ClientBody
|
||||
} catch {
|
||||
sendJson(res, 400, { error: 'Invalid JSON body' })
|
||||
return
|
||||
}
|
||||
|
||||
const sanitized = sanitizeBody(parsed, LLM_MODEL, LLM_MAX_TOKENS)
|
||||
if ('error' in sanitized) {
|
||||
sendJson(res, 400, { error: sanitized.error })
|
||||
return
|
||||
}
|
||||
|
||||
const llmHeaders: Record<string, string> = {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
if (LLM_API_KEY) {
|
||||
llmHeaders['Authorization'] = `Bearer ${LLM_API_KEY}`
|
||||
}
|
||||
|
||||
let llmRes: Response
|
||||
try {
|
||||
llmRes = await fetch(`${LLM_ENDPOINT}/chat/completions`, {
|
||||
method: 'POST',
|
||||
headers: llmHeaders,
|
||||
body: JSON.stringify(sanitized),
|
||||
signal: AbortSignal.timeout(LLM_TIMEOUT_MS)
|
||||
})
|
||||
} catch (err) {
|
||||
console.error('[ai-llm-proxy] LLM request error:', err)
|
||||
sendJson(res, 502, { error: 'Could not reach LLM endpoint' })
|
||||
return
|
||||
}
|
||||
|
||||
const llmBody = await llmRes.text()
|
||||
res.writeHead(llmRes.status, {
|
||||
'Content-Type': llmRes.headers.get('content-type') ?? 'application/json'
|
||||
})
|
||||
res.end(llmBody)
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Server — only started when run directly, not when imported in tests
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
if (process.env.NODE_ENV !== 'test') {
|
||||
if (!LLM_ENDPOINT) {
|
||||
console.error('LLM_ENDPOINT is required')
|
||||
process.exit(1)
|
||||
}
|
||||
if (!OCIS_URL) {
|
||||
console.error('OCIS_URL is required')
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
const server = http.createServer((req, res) => {
|
||||
handleRequest(req, res).catch((err) => {
|
||||
console.error('[ai-llm-proxy] Unhandled error:', err)
|
||||
if (!res.headersSent) {
|
||||
sendJson(res, 500, { error: 'Internal server error' })
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
server.listen(PORT, () => {
|
||||
console.log(`[ai-llm-proxy] Listening on: ${PORT}`)
|
||||
console.log(`[ai-llm-proxy] LLM endpoint: ${LLM_ENDPOINT}`)
|
||||
console.log(`[ai-llm-proxy] oCIS URL: ${OCIS_URL}`)
|
||||
console.log(`[ai-llm-proxy] LLM timeout: ${LLM_TIMEOUT_MS}ms`)
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"outDir": "dist",
|
||||
"rootDir": "src",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
services:
|
||||
ocis:
|
||||
configs:
|
||||
- source: apps_yaml
|
||||
target: /etc/ocis/apps.yaml
|
||||
depends_on:
|
||||
ai-data-insights-sidebar-init:
|
||||
condition: service_completed_successfully
|
||||
|
||||
ai-data-insights-sidebar-init:
|
||||
image: owncloud/web-extensions:ai-data-insights-sidebar-0.1.0
|
||||
user: root
|
||||
volumes:
|
||||
- ocis-apps:/apps
|
||||
entrypoint:
|
||||
- /bin/sh
|
||||
command: ["-c", "cp -R /var/lib/nginx/html/ai-data-insights-sidebar/ /apps"]
|
||||