Architecture
How AuraDeck is put together — for contributors and the curious.
AuraDeck is a small, deliberate codebase. There is no bundler, no build pipeline beyond Tauri itself, and no framework on the frontend — just plain HTML, CSS, and JavaScript talking to a Rust backend over Tauri's IPC bridge.
High-level layout
┌────────────────────────────────────────────────────────────┐
│ Tauri shell │
│ │
│ ┌────────────────────┐ ┌──────────────────────┐ │
│ │ WebView │ │ Rust backend │ │
│ │ │ IPC │ │ │
│ │ HTML/CSS/JS │◀───────▶│ Tauri commands │ │
│ │ CodeMirror │ │ File I/O, zip, │ │
│ │ Editor + Viewer │ │ base64, manifest │ │
│ └────────────────────┘ └──────────────────────┘ │
│ │
└────────────────────────────────────────────────────────────┘
The WebView runs the user-facing app. Anything that touches the filesystem (loading decks, saving slides, inlining images) goes through a Tauri command in the Rust backend.
Frontend
| File | Role |
|---|---|
src/index.html |
Main app shell. Hosts the editor, viewer, and modal dialogs. |
src/main.js |
App startup, viewer logic, presenter mode, slide navigation. |
src/editor.js |
Ribbon editor — slide CRUD, save/export, CodeMirror integration. |
src/presenter.html |
Standalone presenter window (notes, next slide, timer). |
src/templates.js |
Slide templates for the New Slide / New Presentation actions. |
src/style.css |
Global app styles — viewer, viewport, overlays. |
src/editor.css |
Editor styles — ribbon, panels, modals, CodeMirror theme. |
src/vendor/ |
Vendored third-party libraries: CodeMirror 5, html2canvas, jsPDF, PptxGenJS. |
There is no bundler. JavaScript modules use <script type="module"> and load each other via relative paths. This is intentional — it keeps the build trivial and the source readable.
Backend (src-tauri/src/lib.rs)
All Tauri commands live in src-tauri/src/lib.rs. They are grouped roughly as:
- Deck I/O —
load_presentation,save_presentation,save_as_adsl,extract_adsl. - Slide CRUD —
create_slide,delete_slide,duplicate_slide,reorder_slides. - Image handling —
inline_images_to_data_urls,add_image_to_deck. - Global CSS —
get_global_css,set_global_css. - Scratch presentations —
new_scratch_presentation(in-memory deck for the New Presentation flow). - Export helpers — file dialogs and write-to-disk for PDF/PPTX exports rendered in the WebView.
Frontend code calls these via @tauri-apps/api/core's invoke():
import { invoke } from '@tauri-apps/api/core';
const deck = await invoke('load_presentation', { path: '/some/deck' });
Capabilities
src-tauri/capabilities/default.json declares the IPC permissions granted to the WebView. AuraDeck grants only what it needs: window control, dialog plugin access, the registered Tauri commands, and event emission for cross-window communication in presenter mode.
Build and bundle
npm run tauri build runs the Rust build, which in turn runs build.rs to embed the contents of src/ into the binary. The resulting executable is a single self-contained file with no runtime dependencies beyond the platform's WebView.
tauri.conf.json controls window defaults (size, title, resizability), the bundle identifier, and the Content Security Policy applied to the WebView.
Where things live (cheat sheet)
| You want to change... | Edit |
|---|---|
| The ribbon menu | src/editor.js (look for setupRibbon) |
| A slide template | src/templates.js |
| The presenter layout | src/presenter.html |
| File loading or saving | src-tauri/src/lib.rs |
| Window defaults | src-tauri/tauri.conf.json |
| App icon | src-tauri/icons/icon.svg (regenerate PNGs with tauri icon) |
| MIME type registration | linux/install-mime.sh and linux/auradeck-adsl.xml |