Journalista
Personal journal cli app
It is a terminal application to store personal journal log with user management, to be run
locally and not on cloud. For simplicity considering we could enter only textual content in journal
data.
Terminologies
- User : An independent entity with access to its own journal. Data should not be shared
between users.
- Journal : A text log containing multiple entries.
- Journal Entry : A piece for text accompanied by a timestamp
Features
- User Management: On starting the application the user is presented with
either Login or Sign Up options.
- Journal Management: After authentication, the user is presented with two
options to either list all his previous entries or create a new entry. Maximum 50
Journal entries is allowed per user. Newer entry after 50 replace the
oldest entry(like a queue).
- While showing previous entries each entry is preceded by time in readable
format and data followed by the text input
Eg.
25 Jun 2019 10.30pm - Some text that the user entered
23 Jun 2019 10.00am - Some text that user entered
Installation (Using npm registries)
There are two ways to install the cli (Do any one)
- From npm registry
npm install -g journalista
journalista
- From github registry
npm install -g @rajat19/journalista
journalista
How to run this project (if you want to code/debug)
- Install dependencies
- Make changes to code
- Then run following commands
- For development purposes you can directly do
- For build and using journalista command (Alternate)
npm run build && npm link
journalista
What the system does
- Allows login/signup using command line
- List/Create journals for authorized users
The system encrypts username/passwords and journals so that these are not visible by anyone just crawling
through the repo. Your journals are secure with us.
Two types of encryption is done in this project
- bcrypt - hashing using salt - used to encrypt username/password
- crypto - aes-256-ctr - used to encrypt/decrypt journals
Code for these encryption/decryption can be found in utils/hash.ts
Publish
This package uses github actions to publish to both npm as well as github registries
Check .github/workflows/npm-publish.yml
file for more details