elemes/routes
opencode d7c845266c feat(assets): optimasi serving gambar (WebP on-the-fly + cache disk)
Arsitektur: upload tetap menyimpan original apa adanya; optimasi terjadi
saat serving — gambar raster di-resize (maks 1600px) + encode WebP
(quality 80), di-generate on-the-fly lalu di-cache di disk.

- config.CACHE_DIR = sibling ASSETS_DIR ('assets-cache'), WAJIB di luar
  ASSETS_DIR supaya export_bundle (os.walk tanpa filter) tetap lossless
- services/image_cache.py: varian WebP, cache key path+mtime+size+width,
  invalidasi otomatis via mtime, atomic write, fallback original bila gagal
- routes/lessons.py::send_assets: handler (bukan static serve) —
  .png/.jpg/.jpeg/.webp/.gif -> varian WebP; .svg & GIF animasi pass-through;
  ?orig=1 untuk original; ?w= untuk lebar alternatif; ETag + Cache-Control
- Dockerfile: buat /app/assets-cache writable

Test (services/tests/test_asset_cache.py, 20 test): lokasi cache di luar
ASSETS_DIR, cache reuse, invalidasi mtime, passthrough SVG/GIF animasi,
fallback file korup, ETag/304, dan acceptance test — upload -> request ->
export bundle berisi HANYA original tanpa .webp turunan.
2026-10-25 19:19:07 +07:00
..
__init__.py refactor to make it better 2026-03-25 09:39:51 +07:00
auth.py perf: fix race conditions with file locking and optimize backend latency 2026-05-05 22:57:19 +07:00
compile.py feat(compiler-worker): sesi interaktif PTY untuk playground — Python input() dan C scanf() tanpa EOFError 2026-08-02 14:14:45 +00:00
content_editor.py fix(content-editor): diagnostik upload asset + kelengkapan bundle 2026-10-03 21:47:05 +07:00
docs.py feat: unified lesson progress — composite score & /api/lesson-progress 2026-08-29 00:22:10 +07:00
help.py feat(help): add interactive student tutorial with video and integrated help page 2026-04-20 13:43:45 +07:00
lesson_progress.py feat(quiz): izinkan guru melanjutkan attempt terminated dari jawaban tersimpan 2026-10-20 19:24:40 +07:00
lessons.py feat(assets): optimasi serving gambar (WebP on-the-fly + cache disk) 2026-10-25 19:19:07 +07:00
progress.py feat(quiz): izinkan guru melanjutkan attempt terminated dari jawaban tersimpan 2026-10-20 19:24:40 +07:00
student_management.py feat(progress): composite scoring, roundtrip CSV grammar, and report export 2026-08-30 04:12:23 +07:00