Aurion Vault is a standalone Single Page Application (SPA) designed for user onboarding and keyring administration within the Aurion ecosystem.
- Framework: Svelte 5 (Runes)
- Build Tool: Vite (Pure SPA Mode)
- Language: TypeScript (Strict Mode)
- Cryptography: aurion-crypto-sdk (OpenPGP ECC / Argon2)
- Deployment: Static Hosting (No Node.js runtime required in production)
- Node.js (v20 or higher)
- NPM Access for the
aurion-crypto-sdkpackage.
# Install dependencies
npm install
# Start development server
npm run dev
src/
├── main.ts # Entry point (Handles config fetching + bootstrapping)
├── App.svelte # Manual Router & Global Layout
├── lib/
│ ├── config.svelte.ts # Runtime Config Loader (public/config.json)
│ ├── api.ts # SDK Client instance (AurionApiClient)
│ └── auth.svelte.ts # Global Cryptographic Session state
└── components/ # Application Pages (Svelte Components)
├── Onboarding.svelte
├── Dashboard.svelte
└── Recovery.svelte
To achieve total portability without re-compiling the code for each instance, the application fetches its configuration from a static JSON file at runtime.
Located in public/config.json (or at the root of your deployment).
{
"AURION_API_BASE": "https://api.your-aurion-instance.com"
}
- The
main.tsscript initiates afetch('/config.json'). - Once the URL is retrieved, the
AurionApiClientis initialized. - The Svelte application is then mounted to the DOM.
Generate a purely static production bundle in the dist/ folder:
npm run build
Here is the updated Production & Deployment section for your README, adding the Apache configuration block alongside the Nginx example.
Since this is a pure SPA, the dist/ folder can be served by any web server (Nginx, Apache, S3, etc.).
Ensure all routes are redirected to index.html to support client-side routing.
server {
listen 80;
server_name vault.aurion.internal;
location / {
root /var/www/aurion-vault;
index index.html;
try_files $uri $uri/ /index.html;
}
}
For Apache, ensure mod_rewrite is enabled. You can place this configuration in your virtual host setup or directly inside a .htaccess file located at the root of your dist/ folder.
<VirtualHost *:80>
ServerName vault.aurion.internal
DocumentRoot /var/www/aurion-vault
<Directory /var/www/aurion-vault>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
# Fallback all traffic to index.html for SPA client-side routing
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</Directory>
</VirtualHost>
- Copy the
dist/content to your server. - Edit
config.jsonto point to the correct Aurion API instance. - Crucial: Serve the application over HTTPS with certbot for example, otherwise, the
WebCrypto APIand SDK will fail.