Labradorite rightfully belongs to the group of wisdom crystals, because it promotes a free flow of mental energy as it awakens intuition and allows us to get mentally unstuck.
- every esoteric out there
Important
Tantiny has died this summer (most probably) ...
This project heavily depends on Tantiny, and as a result, we anticipate releasing our final updates in the near future.
I am committed to maintaining the project's functionality for as long as feasible. However, I will not be investing additional time or resources into its further development. 😔
🥲 It will continue to work though! As it is fulfilling what it was built for in the first place.
Dependabot will help keep security vulnerabilities closed and containerization will do the rest.
- Rationale
- Features / User Info
- Technical Prerequisites
- Architecture
- Folder Structure
- Major Dependencies
- Run/Deploy with Docker
- Development
- Run it
- Follow-up: Inspiration, Knowledge
Most Notetaking apps do either too much (Notion), too little (Apple Notes) and lock me in (all options ever).
I wanted something that does just-enough™, in the spirit of a flat file cms. Let me try and wrap it up in a few bullets:
- ownership of the notes (flat files)
markdown, yaml, attachments all in one place in directories - easy on the eyes/mind
I don't want to see all the old stuff I may not need anymore - a search that shows me snips in the notes
not just the notes in a sidebar - a very simple tagging support
- basic file uploads
keeping the originals side by side with notes
I like to keep things simple, so I once again fell for Roda as the Web Layer. Tantiny is the kicker for this project. I was curious, if I could come up with something useful quickly, not having to deal with a complicated setup or Postgres as a requirement.
Markdown Editor
- Preview
- Supports auto-formatting with/around saving (on page refresh)
Attachments
- supported attachments for uploads
- txt
- md
- png
- jpg
- jpeg
- heic
- webp
- yml
- yaml
- json
Screenshots
Little experiment on how it rolls:
- all GET gets HTML
- all POST sends FORMS/JSON gets JSON back
- all links/navigation are plain HTML
a
tags 🤯
lib
: Library Code / Business Logicviews
: ERB Viewsmemos
: the Memos/Notes in subdirectoriesYYYY/MM/DD/random-string
public
: css/js/media.tantiny
: the local index data created by the tantiny gem
- Roda
- Tantiny
- RedCarpet
The included Dockerfile
and the docker-compose.yml
are more a stub to build upon.
Currently the Dockerfile support passing the USERNAME as an build-arg
.
$ docker build . --build-arg USERNAME=$(whoami) -t labba
$ docker run --rm -p9292:9292 labba
Either this way, or you adapt the Dockerfile to your needs.
Let's say your username on the server you run (or your machine) is johndoe
, then your Dockerfile should look something like this:
# in your version of the Dockerfile, replace labradorite at the ARG USERNAME
ARG USERNAME=johndoe
That will help you both secure the service and have the files being created with the proper rights on the host system.
build and/or up using: $ USERNAME=$(whoami) docker-compose build
Volumes
- this
memos
directory has all your created content in it. Having it mounted from your host should make easy for you to backup (if you don't use a private gitrepo for that 😉) - fyi: having tantiny's index (
.tantiny
) as a volume has no benefit. Beware, it can easily have a negative impact.
From v0.5.0 on, the project can only be run native on a Linux machine or in a Docker container. See the Dockerfiles and justfile
for more information.
$ rake test
runs the test suite$ rake reset_default_memos
resets the files to the repos defaults (e.g. for testing)$ rake reset_memos
clears ALL memos
Before pushing code, you should always run rake reset
and rake test
,
therefore have a repo you work on AND another you use JUST for running the software.
Example docker-compose file:
version: '3'
services:
app:
user: "${UID}:${GID}"
environment:
- USERNAME=yourusername # REPLACE THIS WITH YOUR VPS user's USERNAME
image: ghcr.io/simonneutert/labradorite-notebook:v0.2.0
# ports:
# - 9292:9292
command: bundle exec rackup -o0 -Eproduction
volumes:
- ./memos:/home/labradorite/memos:cached
https://github.com/baygeldin/tantiny
https://stevepolito.design/blog/search-across-multiple-models-in-rails/
Gist: a searchable table is to be added and kept updated using commit_hooks