Skip to content
ljh-wdPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Self-Destructing Note API

Description

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.

Features

  • Create notes that self-destruct after being read or after a timer expires.
  • Read notes via terminal-based UI (TUI).

Technologies Used

  • Backend: Node.js, Express (Typescript)
  • Frontend: React (via Ink for terminal-based UI)

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd self-destructing-note
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm run dev
  4. Start the terminal-based UI:

    npm run ui
  5. Alternatively use:

    docker-compose-up -d
  6. then:

    npm run ui

Terminal-Based UI

The terminal-based UI allows you to:

  • Create notes with destruction modes.
  • View and read notes.

Controls

  • Create Mode:
    • Enter note content and press Enter.
    • Select destruction mode (d for read-once, t for timer).
    • If timer mode is selected, enter the timer value in seconds.
  • Read Mode:
    • Use arrow keys to navigate notes.
    • Press r to read a note.

Switching Modes

  • Press c to switch to Create mode.
  • Press r to switch to Read mode.

Docker

  1. Build and run the Docker container:

    docker-compose up -d --build

Limitations

  • Notes are stored in memory and are lost when the server restarts.
  • No persistent storage is implemented.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages