Just a tiny TUI for a notes api. Gives the ability to create/read/delete (no update) of notes that can be set on a timer or destuct on 'read'. The only reason this was made was because of my curosity on how TUI's are developed and found one way is to use a package called ink which lets you write React code to render in the terminal.
- Notes are stored in memory and are cleared when the server restarts. No databased has been hooked up.
- Create notes that self-destruct after being read or after a timer expires.
- Read notes via terminal-based UI (TUI).
- Backend: Node.js, Express (Typescript)
- Frontend: React (via Ink for terminal-based UI)
-
Clone the repository:
git clone <repository-url> cd self-destructing-note
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Start the terminal-based UI:
npm run ui
-
Alternatively use:
docker-compose-up -d
-
then:
npm run ui
The terminal-based UI allows you to:
- Create notes with destruction modes.
- View and read notes.
- Create Mode:
- Enter note content and press
Enter. - Select destruction mode (
dfor read-once,tfor timer). - If timer mode is selected, enter the timer value in seconds.
- Enter note content and press
- Read Mode:
- Use arrow keys to navigate notes.
- Press
rto read a note.
- Press
cto switch to Create mode. - Press
rto switch to Read mode.
-
Build and run the Docker container:
docker-compose up -d --build
- Notes are stored in memory and are lost when the server restarts.
- No persistent storage is implemented.