Skip to content

ako-kamattechan/Rand_Text_Editor

Repository files navigation

Two-Profile Daily-Lock Notepad

Desktop app implemented with Electron + TypeScript + React.

Run

pnpm install
pnpm dev

Build

pnpm build

Test

pnpm test

What is implemented

  • Daily profile lock at 00:00 in America/Mexico_City
  • Exactly one active profile (p0/p1) per day with HMAC commit integrity in meta.json
  • Per-profile encrypted storage in profiles/p0.db.enc / profiles/p1.db.enc using AES-256-GCM + HKDF
  • Master key bootstrap via keytar (DailyLockNotepad/master), with local fallback only if keytar is unavailable
  • Active-profile-only runtime (inactive profile is not loaded/decrypted or exposed in UI)
  • Document editor with autosave (debounce + max interval), snapshots, and session restore
  • Deterministic tree parser for indentation + > branch rules with collapsed buckets
  • Text/Graph modes, right tree panel, Z-wrap dual projection view, and inversion toggle
  • Command palette (Ctrl+P), within-document search only, plaintext export warning
  • Midnight rollover behavior requiring restart/relaunch to enforce the new day lock

Main files

  • electron/main.ts
  • electron/preload.ts
  • src/core/appController.ts
  • src/core/dailyLock.ts
  • src/core/crypto.ts
  • src/core/profileRepository.ts
  • src/shared/treeParser.ts
  • src/shared/autosaveScheduler.ts
  • src/renderer/App.tsx
  • tests/acceptance.test.ts

Security note

This protects against casual file tampering and accidental profile exposure. A local machine owner can still bypass controls by patching/running modified binaries.

About

Is it possible to have multiple "yous" by offloading most short term context into a solid state storage.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors