This is a concept project. It has worked well in personal use, but if it does not work for you, there is no liability -- it is a concept.
A serverless, zero-database encrypted TOTP code manager. Save your 2FA codes as a single encrypted file. Nothing is stored anywhere.
2FA codes are sensitive. Saving them in the cloud means trusting a third party. Saving them on your device means losing them if the device breaks.
Authlama gives you one encrypted file -- secret.txt. That file is your vault. It contains all your codes encrypted with AES-256-GCM. No server. No database. No account. You manage the file yourself.
The encryption is real -- AES-256-GCM via the browser's native Web Crypto API, with PBKDF2 key derivation (600,000 SHA-256 iterations). The password never leaves your browser. The encrypted blob never touches a server.
- TOTP code generation -- scan QR codes or enter secrets manually (Google Authenticator compatible)
- Session mode -- codes work immediately but disappear when you close the tab
- AES-256-GCM encryption -- codes are encrypted into a single self-contained string
- Password protection -- unlock with your password and the encrypted key file
- Download as secret.txt -- save the encrypted key as a file anywhere
- File upload to unlock -- upload your secret.txt and enter your password to decrypt
- Re-encrypt on edit -- every time you save changes, you get a new key (old one stops working)
- Dark / Light mode -- toggle with the moon/sun icon, persisted in localStorage
- Auto-cleanup on exit -- all session data is wiped when you close the tab
- Zero accounts, zero servers, zero tracking -- everything happens in your browser
Authlama is a 100% static website -- React, TypeScript, Tailwind CSS. No backend. No API. No database. No server-side code of any kind.
- You add TOTP codes in the browser (QR scan or manual entry)
- Click Save Key, enter a key name and password
- The browser uses PBKDF2 (600,000 iterations) to derive an AES-256-GCM key from your password
- Your codes and key name are encrypted into a single base64 string
- This string is packed as
[version][salt][IV][ciphertext]-- self-contained, no external data needed - You download this string as
secret.txtor copy it
- Click Load Key, paste the encrypted string or upload
secret.txt - Enter your password
- PBKDF2 derives the same AES key from password and embedded salt
- AES-GCM decrypts and authenticates -- wrong password fails immediately
- Your codes appear with live countdown timers
- The encrypted blob contains everything needed to decrypt (salt, IV, ciphertext) except the password
- Without the password, the blob is cryptographically useless
- AES-GCM provides authenticated encryption -- tampering is detected
- The password is never stored or transmitted -- only the derived key exists briefly in memory
authlama/
├── index.html # Entry point
├── src/
│ ├── App.tsx # Main application
│ ├── main.tsx # React root + exit cleanup
│ ├── index.css # Tailwind + light/dark theme
│ ├── components/
│ │ ├── ui/ # Button, Input, Modal
│ │ ├── totp/ # TOTP code display, QR scanner, add form
│ │ └── vault/ # Save/Load modals, secret key display
│ ├── hooks/ # useSessionCodes, useVaults, useTheme
│ └── lib/
│ ├── crypto/ # AES-256-GCM, PBKDF2
│ ├── totp/ # TOTP/HOTP algorithm, Base32, otpauth URI parser
│ ├── storage/ # Session storage + vault encryption
│ └── types/ # TypeScript type definitions
├── package.json
├── vite.config.ts
├── tailwind.config.js
└── LICENSE # MIT
| Layer | Technology |
|---|---|
| Framework | React 18 + TypeScript (strict mode) |
| Build | Vite 5 |
| Styling | Tailwind CSS 3 (class-based dark mode) |
| Cryptography | Web Crypto API (AES-256-GCM, PBKDF2, HMAC) |
| QR scanning | html5-qrcode |
| Dependencies | Zero external crypto libraries -- all native browser APIs |
Authlama is entirely static. Host it anywhere with zero configuration.
- Push the repo to GitHub
- In Cloudflare Pages dashboard, select Vite (framework preset)
- Build command:
npm run build(default) - Build output:
dist(default) - Cloudflare auto-runs
npm installbefore every build
- Import the GitHub repo in Vercel
- Framework preset auto-detects Vite
- Everything defaults to
npm run buildthendist - Vercel auto-runs
npm installbefore every build
- Connect the GitHub repo in Netlify
- Build command:
npm run build - Publish directory:
dist - Netlify auto-runs
npm installbefore every build
Build locally and upload the dist/ folder:
npm install
npm run build
# upload dist/ to any static serverPrerequisites: Node.js 18+ and npm (download)
git clone https://github.com/sahinguclu/Authlama.git
cd Authlama
npm install
npm run devOpen http://localhost:3000/ in your browser. The app must be served over localhost or HTTPS for the Web Crypto API to work.
To create a production build:
npm run build # outputs to dist/
npm run preview # preview the production build- AES-256-GCM via browser Web Crypto API
- PBKDF2 with SHA-256, 600,000 iterations for key derivation
- The password never leaves your browser
- The encrypted blob contains salt, IV, and ciphertext -- no external data needed
- All session data is wiped on tab close -- only your theme preference persists
- The app works fully offline after first load
MIT License -- see LICENSE
Free to use, copy, modify, distribute, sublicense, and sell. Attribution appreciated but not required.
Made by Sahin Guclu