Commit Graph
15 Commits
Author SHA1 Message Date
daniel156161 bc44273155 feat(observability): add OpenTelemetry request tracing
Build and Push Docker Container / build-and-push (push) Successful in 1m34s
- Add opt-in OTLP/HTTP export with bounded background batching.
- Propagate W3C context and correlate wide events with response trace IDs.
- Update my_helpers for Convex child spans and native request IDs.
- Respect parent sampling and shut down the exporter off the event loop.
- Keep raw URLs, payloads and exception text out of spans.
- Cover worker isolation, retries, sampling, privacy and exporter lifecycle.
- Document collector configuration and bump NanoShare to 1.27.5.
- Refresh locked dependencies, including pytest and watchdog.
- Validate the changes with 293 passing tests.
2026-10-31 16:11:41 +01:00
daniel156161 3db374b1ab feat(files): cache served files and add HTML text viewer
Build and Push Docker Container / build-and-push (push) Successful in 2m37s
File cache:
- Add my_modules/filecache with metadata, blob, validator and store layers
- Cache convex.get_file via AsyncCache, TTL clamped to the file expiry
- Skip caching for missing, incomplete or already expired records
- Add a process-local, size-bounded LRU for immutable storage blobs
- Build the cache stack from FILE_CACHE_* env vars in build_file_cache
- Attach the cache to the app in my_modules/app/setup.py
- Expose app-bound helpers in filecache/access.py for routes

Serving:
- Send strong ETag, Last-Modified and Cache-Control on served files
- Answer If-None-Match and If-Modified-Since with 304 from metadata only
- Avoid pulling the blob from Convex on a revalidation hit
- Add a short Cloudflare-CDN-Cache-Control edge window for deleted files
- Record cache_status in the wide event on a 304
- Invalidate cached metadata after file update and delete in both routes

Text viewer:
- Add my_modules/textview to render text/plain and text/markdown as HTML
- Linkify http(s) URLs and trim trailing sentence punctuation
- Resolve links pointing at this instance to the referenced file
- Inline image previews, mark missing and expired targets
- Cap resolution at MAX_LOOKUPS backend lookups per document
- Serve the viewer only for real browser navigations, never for curl or CLI
- Keep raw bytes for ?raw=1, downloads and Accept headers without text/html
- Add templates/side/views/webpage/files/text_view.htm with a raw link

Other:
- Add tests for cache layers, serving, text rendering and the route
- Bump multidict to 7.2.1 in uv.lock
- Update the my_helpers submodule pointer
2026-10-25 18:54:46 +01:00
daniel156161 962fa95f7c fix(session): enable JSON serialization for Valkey sessions
Build and Push Docker Container / build-and-push (push) Successful in 4m55s
- Set SESSION_REDIS_JSON for the Redis-backed session configuration.
- Match session serialization to the client's decoded string responses.
- Leave the fallback session backend unchanged.
2026-10-24 00:47:39 +02:00
daniel156161 4ee4d6a0a4 fix: align proxy diagnostics with shared web stack
Build and Push Docker Container / build-and-push (push) Failing after 1m54s
- Advance quart_common to the same revision used by webside-and-api.
- Log loaded proxy trust settings during NanoShare startup.
- Make deployed proxy header configuration easier to verify.
2026-07-26 13:06:55 +02:00
daniel156161 9c731d6e67 feat(logging): add NanoShare wide event instrumentation
Build and Push Docker Container / build-and-push (push) Failing after 51s
- Register quart_common wide-event logging during app setup so every HTTP request emits one canonical structured event.

- Replace the inline security middleware with reusable quart_common security middleware wiring and move skip path configuration into app constants.

- Add NanoShare-specific wide-event context for health checks, auth/error handlers, file list/edit/delete/serve flows and upload outcomes.

- Rename runtime logging/project metadata from simple-picoshare to nanoshare where it is emitted in service context.

- Update my_helpers and quart_common submodules for Convex/wide-event integration and reusable security middleware support.

- Add NanoShare middleware tests covering safe user context, client IP enrichment, missing Convex handling and Convex security lookup failures.
2026-05-13 20:22:43 +02:00
daniel156161 680e8dafff allow to strem upload to convex and reuse file id when upload error happend 2026-04-06 14:20:11 +02:00
daniel156161 4773338ccc add convex health metrics route
Build and Push Docker Container / build-and-push (push) Successful in 2m4s
2026-04-01 21:32:28 +02:00
daniel156161 063ff3ca58 change convex from runtime to worker pool
Build and Push Docker Container / build-and-push (push) Successful in 1m52s
2026-03-28 13:21:09 +01:00
daniel156161 6137121209 update to get favicon from compontent by using the storage
Build and Push Docker Container / build-and-push (push) Successful in 1m36s
2026-02-16 12:02:52 +01:00
daniel156161 729e7f5fca add protection that shares the data with my webside 2025-12-23 15:20:36 +01:00
daniel156161 fefda61c0b use new convex db base class and remove code that is already into the base class
Build and Push Docker Container / build-and-push (push) Successful in 1m21s
2025-12-22 11:43:05 +01:00
daniel156161 d635da039f move database and file storage from edgedb and disk to convex 2025-12-22 02:04:10 +01:00
daniel156161 6f0ad8bec2 move EdgeDB into db sub folder 2025-12-21 19:05:59 +01:00
daniel156161 0ff61a9e81 rename static template file folder to static and update middleware to not show access in logging 2025-10-25 13:54:06 +02:00
daniel156161 404bf263bf add code to start the server 2025-10-24 08:21:16 +02:00