How betterseqta/desqta works
Project type and purpose
• This is a cross-platform desktop/web application built with Svelte (frontend) and Rust/Tauri (backend) to provide an enhanced interface (“DesQTA”) for SEQTA data (assessments, timetables, messages, etc.).
• The README highlights UI features, session management, API integration with SEQTA, responsive design (Tailwind), and native operations via Tauri/Rust.
File structure
• Top-level “src” folder holds the Svelte code:
• app.html/css, components/, lib/services, lib/stores, routes/
• “static” holds themes, images, service worker.
• “src-tauri” is the Rust/Tauri backend:
• src (auth, filesystem, utilities),
• Tauri config files,
• gen/ for iOS & Android build scaffolding,
• docs/ contains architecture and data-flow markdowns.
• Config files: vite.config.js, svelte.config.js, tailwind.config.js, tsconfig.json.
Key architectural insights from README and docs
• Svelte-Kit handles routing and pages under src/routes.
• Component-based UI: reusable components in src/lib/components.
• Services layer in JS (authService, syncService, idbCache, etc.) abstracts data fetching and local caching.
• Tauri bridges JS ↔ Rust: native filesystem, session storage, analytics, cloud messaging.
• External SEQTA REST API is the primary data source.
• IndexedDB (via idb.ts/idbCache.ts) and local file system (Rust) are used for caching/persistence.
Main components
a. Frontend (Svelte):
• UI Components (src/lib/components)
• Route Handlers (src/routes)
• Services (JS): authService, syncService, notesService, weatherService, idbCache, etc.
• Local persistence: IndexedDB
b. Backend (Tauri/Rust):
• Tauri Core (Webview + IPC)
• Rust Modules: auth (login.rs), fs (desqta-fs), utils (analytics, logger, cloudmessaging, session, settings)
c. External Systems:
• SEQTA REST API
• Third-party APIs (Weather, News, Analytics)
d. Operating System / Device:
• Desktop (Windows/macOS/Linux)
• Mobile wrappers (iOS/Android scaffold via Tauri)
Relationships and interactions
• The Svelte frontend issues data requests via the services layer.
• Services either:
• Call SEQTA/third-party REST APIs (over HTTPS), or
• Communicate with Rust via Tauri commands (IPC) for file I/O, notifications, session storage, analytics events.
• Rust handlers perform native operations and return results to the JS layer.
• IndexedDB in the browser context caches API responses for offline use.
• The Tauri wrapper packages the app into native executables on each platform.
Architectural patterns & design principles
• Separation of concerns:
• UI (Components + Routes)
• Data access (Services + IPC)
• Persistence (IndexedDB + native file system)
• Micro-frontends style: each route is self-contained.
• Service-oriented: discrete JS services for each domain (auth, notes, weather, etc.).
• Hybrid native/web architecture via Tauri: Web UI + native modules.
• PWA elements: service worker in static/sw.js.
Technologies, frameworks & libraries
• Frontend: SvelteKit, Tailwind CSS, Vite, TypeScript
• State & data: Svelte stores, IndexedDB (idb), localStorage, service worker
• Backend: Rust, Tauri, Cargo
• Build tools: pnpm/npm, GitHub Actions (build.yml, nightlybuild.yml)
• Platform scaffolding: Gradle/Kotlin for Android, Xcode project for iOS.