Links
Links is a bookmark management system with folder organization, previews, and tagging.
Features
Bookmark Management
- Save URLs with custom titles
- Automatic preview generation
- Description and notes
Organization
- Folders: Hierarchical organization
- Tags: Flexible categorization
- Stars: Quick access to favorites
Comments
- Threaded comments on links
- Collaborative annotation
Usage
Adding a Link
- Navigate to
/protected/links - Click "Add Link"
- Paste URL (title auto-populates)
- Select folder and tags
- Save
Folder Structure
Links/
├── Work/
│ ├── Research/
│ └── Tools/
├── Personal/
└── Archived/
Starring Links
Star important links for quick access in the starred view.
Data Model
-- Links table
CREATE TABLE aicync.links (
id UUID PRIMARY KEY,
user_id UUID REFERENCES auth.users,
url TEXT NOT NULL,
title TEXT,
description TEXT,
preview_image TEXT,
folder_id UUID REFERENCES link_folders,
tags TEXT[],
starred BOOLEAN DEFAULT FALSE,
created_at TIMESTAMPTZ DEFAULT NOW()
);
-- Folders
CREATE TABLE aicync.link_folders (
id UUID PRIMARY KEY,
user_id UUID REFERENCES auth.users,
name TEXT NOT NULL,
parent_id UUID REFERENCES link_folders,
created_at TIMESTAMPTZ DEFAULT NOW()
);
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/links | List links |
| POST | /api/links | Create link |
| PATCH | /api/links/[id] | Update link |
| DELETE | /api/links/[id] | Delete link |
| GET | /api/links/folders | List folders |
| POST | /api/links/folders | Create folder |
Preview Generation
Link previews are generated using Open Graph metadata:
// Fetches og:title, og:description, og:image
const preview = await generatePreview(url);