Complete LinkSyncServer and LinkSyncExtension implementation
LinkSyncServer: - Fix app.py imports, add CORS middleware, lifespan events - Create api/routes.py router aggregator - Create config/settings.py for centralized configuration - Rewrite models/base.py with proper relationships and serialization - Rewrite all API endpoints with real DB integration (auth, links, collections, sync, queries, tags) - Add admin endpoints (user management, stats, audit log) - Complete query parser with recursive descent and proper precedence - Complete query executor with set operations and field filters - Set up Alembic migrations with initial schema - Create web interface (templates, CSS, JS) - Add 42 passing tests (auth, links, collections, queries) - Add deploy.ps1 and deploy.sh scripts - Update README with deployment workflow LinkSyncExtension: - Create utils/api.js (REST client with retries, auth, error handling) - Create utils/sync.js (3 sync modes + conflict detection) - Create utils/collection.js (collection management) - Create utils/query-engine.js (client-side query parser) - Rewrite background.js (sync loop, bookmark events, message routing) - Rewrite popup.js (tabs, settings modal, notifications, CRUD) - Update popup.html (tabbed interface, query builder, modal) - Update popup.css (full redesign) - Create content/content.js (page metadata extraction) - Create options.html/js (dedicated settings page) - Generate icons (48x48, 96x96) - Update manifest.json (host permissions, content scripts, options) - Create AGENTS.md
This commit is contained in:
31
LinkSyncServer/templates/base.html
Normal file
31
LinkSyncServer/templates/base.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}LinkSync{% endblock %}</title>
|
||||
<link rel="stylesheet" href="/static/css/main.css">
|
||||
{% block extra_css %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar">
|
||||
<div class="nav-brand">
|
||||
<a href="/">LinkSync</a>
|
||||
</div>
|
||||
<div class="nav-links">
|
||||
<a href="/#links">Links</a>
|
||||
<a href="/#collections">Collections</a>
|
||||
<a href="/#queries">Queries</a>
|
||||
<a href="/api/docs" target="_blank">API Docs</a>
|
||||
</div>
|
||||
</nav>
|
||||
<main class="container">
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
<footer class="footer">
|
||||
<p>LinkSyncServer © 2026</p>
|
||||
</footer>
|
||||
<script src="/static/js/main.js"></script>
|
||||
{% block extra_js %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
60
LinkSyncServer/templates/index.html
Normal file
60
LinkSyncServer/templates/index.html
Normal file
@@ -0,0 +1,60 @@
|
||||
{% 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> > XOR > AND > OR</p>
|
||||
</section>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user