Initial lookbook implementation

Pinterest-style visual bookmarking app with:
- URL metadata extraction (OG/Twitter meta, oEmbed fallback)
- Image caching in Postgres with 480px thumbnails
- Multi-tag filtering with Ctrl/Cmd for OR mode
- Fuzzy tag suggestions and inline tag editing
- Browser console auth() with first-use password setup
- Brutalist UI with Commit Mono font and Pico CSS
- Light/dark mode via browser preference
This commit is contained in:
soup 2026-01-16 21:14:23 -05:00
commit fc625fb9cf
Signed by: soup
SSH key fingerprint: SHA256:GYxje8eQkJ6HZKzVWDdyOUF1TyDiprruGhE0Ym8qYDY
486 changed files with 195373 additions and 0 deletions

90
default.nix Normal file
View file

@ -0,0 +1,90 @@
{ pkgs ? import <nixpkgs> {} }:
let
lookbook = pkgs.buildGoModule {
pname = "lookbook";
version = "0.1.0";
src = ./.;
vendorHash = "sha256-ghF1GGGQokE0x/zC+AcAneF6ExPGWYQCZ/U6slvKbA4=";
env.GOPRIVATE = "git.soup.land";
subPackages = [ "cmd/server" ];
postInstall = ''
mv $out/bin/server $out/bin/lookbook
'';
meta = with pkgs.lib; {
description = "Lookbook inspiration board";
homepage = "https://git.soup.land/soup/lookbook";
};
};
in
{
package = lookbook;
nixosModule = { config, lib, pkgs, ... }:
let
cfg = config.services.lookbook;
in {
options.services.lookbook = {
enable = lib.mkEnableOption "lookbook service";
address = lib.mkOption {
type = lib.types.str;
default = "127.0.0.1:8083";
description = "Address to listen on";
};
databaseUrl = lib.mkOption {
type = lib.types.str;
description = "PostgreSQL connection URL";
};
user = lib.mkOption {
type = lib.types.str;
default = "lookbook";
description = "User to run the service as";
};
group = lib.mkOption {
type = lib.types.str;
default = "lookbook";
description = "Group to run the service as";
};
};
config = lib.mkIf cfg.enable {
users.users.${cfg.user} = {
isSystemUser = true;
group = cfg.group;
};
users.groups.${cfg.group} = {};
systemd.services.lookbook = {
description = "Lookbook App";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" "postgresql.service" ];
requires = [ "postgresql.service" ];
environment = {
DATABASE_URL = cfg.databaseUrl;
ADDR = cfg.address;
};
serviceConfig = {
Type = "simple";
User = cfg.user;
Group = cfg.group;
ExecStartPre = "${lookbook}/bin/lookbook -migrate";
ExecStart = "${lookbook}/bin/lookbook web";
Restart = "always";
RestartSec = 5;
};
};
};
};
}