feat: add web UI with login, CRUD, admin, and API key management

- Add login page with JWT authentication
- Add dashboard with stats and quick actions
- Add links management page (full CRUD with search)
- Add collections management page
- Add API key management page with copy-to-clipboard
- Add admin user management page (admin only)
- Fix UUID type mismatches across all endpoints
- Add updated_at column to api_keys and audit_log in schema.sql
- Fix DB_PASSWORD default in docker-compose.yml
- Add PyJWT to requirements.txt
- Fix API docs URL (/docs instead of /api/docs)
- Improve JS error handling (show actual messages)
- Rewrite conftest.py with proper DB lifecycle management
- Add 42 new integration tests (84 total, all passing)
  - test_admin.py: 15 tests for admin endpoints
  - test_auth_extended.py: 9 tests for API key CRUD
  - test_tags.py: 12 tests for tag endpoints
  - test_sync.py: 6 tests for sync endpoints
This commit is contained in:
DavidSaylor
2026-05-21 07:21:49 -05:00
parent 09d30427f4
commit 77b076c7d7
31 changed files with 2740 additions and 213 deletions

View File

@@ -1,60 +1,15 @@
{% extends "base.html" %}
{% block title %}LinkSync - Home{% endblock %}
{% block content %}
<div class="hero">
<h1>LinkSync Server</h1>
<p>Self-hosted bookmark server with advanced collection and query capabilities.</p>
<div class="hero-actions">
<a href="/api/docs" class="btn btn-primary">API Documentation</a>
<a href="/api/links/" class="btn btn-secondary">Browse Links</a>
</div>
</div>
<section id="links" class="section">
<h2>Quick Links</h2>
<div class="card-grid">
<div class="card">
<h3>Links</h3>
<p>Manage your bookmarks with full CRUD operations.</p>
<a href="/api/links/">View API</a>
</div>
<div class="card">
<h3>Collections</h3>
<p>Organize links into static or dynamic collections.</p>
<a href="/api/collections/">View API</a>
</div>
<div class="card">
<h3>Queries</h3>
<p>Execute advanced queries with AND, OR, XOR operations.</p>
<a href="/api/queries/">View API</a>
</div>
<div class="card">
<h3>Sync</h3>
<p>Sync bookmarks with browser extensions.</p>
<a href="/api/sync/">View API</a>
</div>
</div>
</section>
<section id="collections" class="section">
<h2>Features</h2>
<ul class="feature-list">
<li>True Collections - Static or dynamic sets of links</li>
<li>Advanced Query Engine - AND, OR, XOR set operations</li>
<li>Firefox-Compatible Fields - All bookmark attributes supported</li>
<li>Multi-User Support - Authentication with roles</li>
<li>RESTful API - Full CRUD operations</li>
<li>Docker-Ready - Easy deployment</li>
</ul>
</section>
<section id="queries" class="section">
<h2>Query Syntax</h2>
<div class="code-block">
<code>('term1', 'term2') OR tagA AND tagB XOR url:example.com</code>
</div>
<p>Precedence: <code>()</code> &gt; XOR &gt; AND &gt; OR</p>
</section>
{% endblock %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LinkSync</title>
<script>
const token = localStorage.getItem('token');
window.location.href = token ? '/dashboard' : '/login';
</script>
</head>
<body>
<p>Redirecting...</p>
</body>
</html>