A lightweight realtime notepad built with React, TypeScript, Vite, and Firebase Realtime Database.
- Node.js 24.12.0 (provided by the included Devbox configuration)
- A Firebase project with Realtime Database enabled
-
Install dependencies:
devbox run npm install
-
Copy
.env.exampleto.env.localand populate it with your Firebase web-app configuration values. -
Start the development server:
devbox run npm run dev
devbox run npm run dev # Run the Vite development server on port 3000
devbox run npm run build # Type-check and create a production build
devbox run npm run lint # Run ESLint's flat configuration
devbox run npm run preview # Serve the production build locallyThe project uses current, modular Firebase APIs and Lexical's React integration. After dependency changes, run:
devbox run npm audit --omit=dev
devbox run npm run lint
devbox run npm run buildnpm audit --omit=dev verifies the production dependency graph without reporting development-tool-only findings.
Open a normal note and select Protect with password to encrypt it. The browser derives an AES-256-GCM encryption key from the password using PBKDF2/SHA-256 and stores only the encrypted text, unique salt, and IV in Firebase. The password and encryption key are never written to Firebase; the key only remains in the current browser page's memory after unlocking.
Firebase stores protected notes in this form:
{
"secret": true,
"encryptedText": "...",
"salt": "...",
"iv": "..."
}Passwords cannot be recovered. This feature provides content confidentiality for Firebase data, but the default database rules still allow anyone with a document ID to read or overwrite that location. Use Firebase Authentication and restrictive database rules when you also need access control and tamper resistance.