Commit Graph

72 Commits

Author SHA1 Message Date
a2nr c103bc02ad feat(flowchart): support interactive embedding in markdown with readonly mode and frontend evaluation 2026-05-02 19:45:04 +07:00
a2nr 433c095394 feat(flowchart): implement text-based logic with auto-layout and migrate evaluation to frontend 2026-05-02 18:47:46 +07:00
a2nr 0ff56ed9d2 bug fix : leak content python_expected_output 2026-05-01 15:32:55 +07:00
a2nr 9cee4f2f74 feat: refactoring canvas flowchart 2026-05-01 12:15:20 +07:00
a2nr 6db1344622 feat: maximize workspace on mobile mode 2026-05-01 11:24:41 +07:00
a2nr c5348a9166 add feature: flowchart maker 2026-05-01 09:09:45 +07:00
a2nr 6f1b86226e Enhance UI Experience 2026-04-28 12:47:53 +07:00
a2nr f8de0cab5f feat: implement \"Coba\" button for code blocks
and improve mobile UX

   - Menambahkan fitur tombol \"Coba ▶\" untuk menyalin kode
     materi ke editor secara otomatis.
   - Implementasi setupTryButtons.ts (Svelte Action) untuk
     injeksi tombol berdasarkan label bahasa Markdown (c, python,
  `arduino).
   - Mengatur perilaku tombol agar hanya memuat kode dan
     memfokuskan tab (No Auto-Run) untuk memberikan kesempatan
     siswa meninjau kode.
   - Optimasi tampilan Mobile (< 768px):
       - Tombol \"Coba\" selalu terlihat (tanpa hover).
       - Otomatis membuka workspace ke mode 'half-sheet' dan
         melakukan smooth scroll ke editor saat tombol diklik.
   - Sinkronisasi urutan render: setupTryButtons dijalankan
     sebelum highlightAllCode untuk memastikan deteksi bahasa
     yang akurat.
   - Update documentation.md dengan panduan penggunaan fitur
     tombol \"Coba\" dan dokumentasi refactoring modularitas
     halaman lesson.
   - Menambahkan modul uji coba LaTeX ke daftar materi di
     home.md
2026-04-27 21:38:36 +07:00
a2nr 5aebd4487d refactor(frontend): pecah komponen raksasa
+page.svelte dan perbaiki backend parser

Pembaruan ini
     mencakup:
- Refactoring skala besar pada halaman lesson SvelteKit untuk efisiensi kode.
- Ekstraksi evaluasi Code, Circuit, dan Velxio ke dalam direktori lib/services/.
- Memisahkan manajemen iframe (Zustand & PostMessage) ke  velxio-manager.ts.
- Memisahkan Tab Panel HTML menjadi komponen spesifik (CodeTab, CircuitTab, VelxioTab).
- Ekstraksi blok <style> menjadi stylesheet terpisah (lesson.css).
- Perbaikan warning A11y & penghapusan class usang pada Navbar.svelte.
- Memperbaiki regex parser 'Available_Lessons' pada lesson_service.py di backend.
- Menambahkan mekanisme auto-append ekstensi '.md' untuk  mengatasi bug Home kosong dan tombol 'Next Lesson' yang hilang akibat format URL baru di home.md.
2026-04-27 13:36:17 +07:00
a2nr b8fb67115e feat: implement LaTeX support with KaTeX and python-markdown-math
3 - Integration of KaTeX in frontend (SvelteKit) with a custom
  renderMath` action.

  - Added `python-markdown-math` extension in backend (Flask). to handle math blocks.
  - Configured Vite to handle KaTeX during SSR and browser rendering.
  - Added a LaTeX test lesson and updated home navigation.
  - Supported both inline ($) and block ($$) math rendering,
   including multi-line support.
2026-04-26 15:47:11 +07:00
a2nr dce4916b94 ui: refactor navbar and improve mobile experience
- Move navigation menu to the leftmost position and
   consolidate actions into a dropdown.
 - Replace clunky mobile sheet handle with explicit
   minimize/maximize buttons.
 - Fix home page content margins for list elements.
 - Ensure student identity remains visible on mobile devices
   with optimized font sizing.
 - Synchronize CircuitJS simulator theme with global
   light/dark mode.
 - Update elemes.sh to provide cleaner output by silencing
   podman-compose logs by default.
2026-04-22 21:04:38 +07:00
a2nr dc1d65ac15 remove blacklist logout feature 2026-04-22 16:56:02 +07:00
a2nr e4c68b2894 feat(security): implement anonymous access with rate limiting and secure proxy, harden authentication and implement session protection
Implements multiple layers of security to address high-risk session
   and authentication vulnerabilities identified in the security review:

   - Allow code compilation (C, Python, Arduino) for anonymous users.
   - Enforce a 1-request-per-2-minutes rate limit for anonymous IPs.
   - Implement a global anonymous compilation queue with 20 concurrent slots.
   - Proxy Velxio (Arduino) compilation through Flask to prevent API hijacking.
   - Exempt authenticated users (tokens/cookies) from all rate limits.
   - Fix networking and DNS resolution in podman-compose.
   - Fix Svelte a11y warnings and trailing slash routing issues.
   - Cookie Security: Added dynamic 'secure' flag support via COOKIE_SECURE
     env variable for HTTPS/Tailscale Funnel compatibility.
   - Rate Limiting: Integrated Flask-Limiter on /login (50 req/min) to
     prevent API abuse while accommodating shared school networks (NAT).
   - Tarpitting: Added 1.5s artificial delay on failed logins to neutralize
     automated brute-force tools without blocking legitimate users.
   - Session Invalidation: Implemented an in-memory token blacklist on
     logout to ensure session tokens cannot be reused.
   - Documentation: Updated technical docs and proposal status to reflect
     the current security architecture.

   Ref: @elemes/proposal.md (Poin 6.1, 6.2, 6.3)
2026-04-22 12:57:54 +07:00
a2nr a41711fb54 security: implement gVisor sandboxing and harden API endpoints
- Menambahkan service 'compiler-worker' terpisah untuk isolasi eksekusi kode C/Python.
   - Mengintegrasikan gVisor (runsc) pada worker untuk mencegah RCE pada level kernel.
   - Menggunakan Gunicorn (4 workers) pada compiler-worker untuk mendukung concurrency.
   - Menambahkan otentikasi token wajib pada endpoint /compile dan laporan progres.
   - Memperketat CORS policy menggunakan environment variable ORIGIN.
   - Menerapkan secure_filename pada rute pelajaran untuk mencegah Path Traversal.
   - Mengubah volume mounting backend utama menjadi Read-Only (:ro) untuk perlindungan data.
   - Memperbarui proposal.md dan .env.example dengan standar keamanan terbaru.
2026-04-21 15:13:16 +07:00
a2nr 6d5c27f93f feat(help): add interactive student tutorial with video and integrated help page
- Create student tutorial documentation in Markdown with updated asset paths
 - Add backend routes to serve rendered help content and assets via JSON API
 - Implement frontend /help route using SvelteKit for professional rendering
 - Add "Bantuan" link to the navigation bar with custom styling
 - Generate tutorial screenshots and a demo video with virtual cursor and subtitles
 - Configure Tailscale and Vite proxies to support the new help routing
 - Add automated video generation scripts and assets
2026-04-20 13:43:45 +07:00
a2nr 89f0967c3e fix: improve JSON parsing robustness in auth routes and update Locust load test scripts with worker management utilities. 2026-04-17 10:50:46 +07:00
a2nr 7c069660f6 feat: add evaluation configuration support in lesson content and API 2026-04-16 11:12:23 +07:00
a2nr 7acce0b610 refactor: update component wiring and properties in Arduino examples 2026-04-16 08:00:54 +07:00
a2nr 405b6d8a6d update remove velxio featur 2026-04-15 21:07:39 +07:00
a2nr 65c12bc716 remove reset button, move auto save indicator in velxio 2026-04-15 20:03:36 +07:00
a2nr 998472f996 update auto save for arduino velxio 2026-04-15 14:24:33 +07:00
a2nr c466bc8bd4 lets build aja 2026-04-13 17:32:44 +07:00
a2nr 54fa892d8d update command for image management 2026-04-13 12:33:26 +07:00
a2nr f9b4313dc2 feat: add exportall and importall commands to elemes.sh and update podman-compose.yml to use pre-built images 2026-04-13 07:34:44 +07:00
a2nr ae992b309f revert ubuntu:22.04 2026-04-11 16:45:43 +07:00
a2nr b5be1df748 ganti debian 2026-04-11 14:41:56 +07:00
a2nr 6d3930086a refactor: add configurable API prefix and unify request handling in locustfile. update velxio. 2026-04-11 14:16:06 +07:00
a2nr 635db39187 feat: add conditional directory creation for assets and state folders with status logging 2026-04-11 09:48:33 +07:00
a2nr 10548b1f51 feat: add Arduino lesson support, documentation, and load testing utilities with improved CLI feedback 2026-04-11 08:39:57 +07:00
a2nr 314975ac65 feat: add actions snippet to OutputPanel and implement run-all evaluation logic for lessons 2026-04-10 14:15:16 +07:00
a2nr 997ab78f56 feat: improve evaluation system and update circuit editor to use localStorage for persistence 2026-04-10 14:00:35 +07:00
a2nr 74a8d87853 add velxio as submodule 2026-04-09 10:51:36 +07:00
a2nr 5f57e67a25 feat: Integrate AVR8js microcontroller simulator into Elemes LMS with custom compilation and simulation workflow 2026-04-03 14:20:41 +07:00
a2nr 09827bf3ff fix python code 2026-04-01 12:56:27 +07:00
a2nr 0e944e5224 feat: Add Python version examples and explanations for Hello World, Voltage Divider, and Variables lessons 2026-04-01 10:50:19 +07:00
a2nr 2505cd0977 feat: Add project name parameter to podman-compose commands in elemes.sh 2026-04-01 09:48:32 +07:00
a2nr 3771f01110 feat: Add initial configuration files, example content, and lesson materials for programming and circuit in Elemes LMS 2026-04-01 09:37:09 +07:00
a2nr 1e6c6a884c feat: Enhance lesson functionality with circuit output and key text support, update token generation script for better CSV handling 2026-03-31 14:31:15 +07:00
a2nr d29c2f2e3e feat: Integrate CircuitJS1 into Elemes LMS
- Added CircuitJSApi interface for simulator API interaction.
- Updated lesson page to support circuit simulation alongside code execution.
- Implemented separate output states for code and circuit evaluations.
- Enhanced lesson content rendering to include circuit embeds using markdown.
- Refactored backend to process circuit embed syntax and convert to HTML.
- Updated podman-compose configuration to include new environment variable for cursor offset.
- Created a proposal document outlining the feasibility and implementation plan for CircuitJS1 integration.
2026-03-31 12:08:42 +07:00
a2nr 39d1b18c2a feat: integrate circuitjs1 simulator into frontend with new editor component and service worker support 2026-03-29 17:25:09 +07:00
a2nr 0528df2d37 refactor: optimize performance with lru_cache, update gunicorn to gthread 2026-03-28 20:09:09 +07:00
a2nr 9b745f52f4 feat: Add a visual auto-save indicator to the code editor, clear session storage on authentication changes, and integrate auto-save functionality with lesson progress and solution viewing. 2026-03-27 20:38:20 +07:00
a2nr d3acfcf825 update green check, button start, de-overwhelm +page, improve mobile ui, add progress page for teacher only, add sessionStorage. 2026-03-27 16:41:57 +07:00
a2nr 614ade6994 feat: Enhance lesson tab functionality and UI improvements 2026-03-26 21:19:24 +07:00
a2nr a0d6f2615a feat: Implement anti copy-paste system and enhance asset proxying
- Added proxy handling for `/assets/` in `sinau-c-tail.json` to route requests to the asset server.
- Enhanced `hooks.server.ts` to support proxying for both `/api/*` and `/assets/*` endpoints, including handling binary content.
- Introduced an anti copy-paste system in the lesson page to prevent text selection and copying from lesson content.
- Updated `CodeEditor.svelte` to prevent pasting from external sources with multiple layers of protection.
- Improved lesson page structure to support floating editor functionality and mobile responsiveness.
- Added celebration overlay for successful code completion in the lesson page.
- Adjusted `vite.config.ts` to include asset proxy configuration.
- Modified `podman-compose.yml` for production deployment with gunicorn and updated network settings.
2026-03-26 13:52:59 +07:00
a2nr d2b6d62b28 refactor to make it better 2026-03-25 09:39:51 +07:00
a2nr aeef8fc99d Add comprehensive proposal for refactoring LMS-C architecture to Flask API and SvelteKit PWA 2026-03-24 19:47:22 +07:00
a2nr d59eae3bd0 update cara menampilkan available leasson tergantung dari home.md, menampilkan tombol review code apabila leasson telah complete 2026-01-18 22:40:31 +07:00
a2nr 767678bb51 add code check uaing static analys with ---KEY_TEXT--- in content 2026-01-18 06:44:46 +07:00
a2nr f5b33c458d update tampilan progress report 2026-01-17 18:58:16 +07:00