As someone who constantly finds interesting links online, I wanted a simple, personal tool to organize them. In my search, I didn't find any simple selfhosted services that covered my needs and were not full of features I dont want. So, I decided to build my own Bookmark Manager using Node.js with the help of @Leunsel.

I wanted the application to be lightweight, easy to run locally, and the database easy to backup and migrate to other instances. That is why I chose sqlite3 for the database.

The plan for the database was having categories, optional subcategories and, of course, the links. This structure allows unlimited nesting of categories:

CREATE TABLE categories (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT,
parent_id INTEGER
);

CREATE TABLE links (
id INTEGER PRIMARY KEY AUTOINCREMENT,
url TEXT,
title TEXT,
favicon TEXT,
category_id INTEGER,
created_at TEXT DEFAULT (datetime('now')),
visits INTEGER DEFAULT 0
);

One of my favorite features is automatic metadata fetching. When adding a link, the application:

With Express, I set up RESTful routes for the core functionality:

This means, we can also look up statistics for the individual links. We are able to see when they were added to the DB, and how often they have been clicked on.

This is the project structure (content of node_modules cut out.):

$ tree Bookmarks/
  .
  ├── docker-compose.yml
  ├── Dockerfile
  ├── LICENSE
  ├── node_modules
  ├── package.json
  ├── package-lock.json
  ├── server.js
  └── views
      ├── category.ejs
      ├── index.ejs
      └── search.ejs

The database is automatically created on first start of the application (in a subfolder: "./data/db.sqlite").

Manual Installation & Backup

You can easily backup the database by saving "db.sqlite".

What the application looks like:

You can view the source code here: GitHub. Note, that this is not where development happens, it is just a mirror, to make the source code publicly available.