How andryore/marksy works
Main Components
• User Interface / Client:
• Represented by the SvelteKit frontend (found under src/ with pages, layouts, and components).
• UI libraries (the public components and the custom UI component collections in src/lib/components/ui and src/lib/components/public) that handle rendering the bookmarks, the dashboard, search bar, filters, sidebar, etc.
• API / Server Layer:
• SvelteKit server routes in src/routes/api (for bookmarks, categories, import, tags, and user endpoints) that handle CRUD operations for bookmarks and user settings.
• Endpoints act as the middleware between the UI and the database.
• Database Layer:
• Browser Extension (Conceptual Component):
• Although the extension is not part of the repository code, document its role in automatically syncing the bookmarks to the backend. Represent it as an external system that pushes new bookmark data to the API layer.
• Build, Deployment, and CI/CD:
• GitHub workflows, Vite config, and other configuration files (e.g., pnpm-lock.yaml, package.json) to represent automated testing/build and deployment pipelines.
Relationships and Data Flow
• From a user’s browser:
• UI by loading various Svelte pages and components.
• User interactions (organizing, filtering, creating, or modifying bookmarks) will trigger API calls (through endpoints defined under src/routes/api) to perform the required operations.
• From the API:
• Data requests flow from the client-side code to the server endpoints.
• API endpoints use Prisma to communicate with the PostgreSQL database.
• From the Browser Extension:
• The extension sends bookmark sync requests to the API endpoints to update or create records in the database.
Architectural Patterns and Technical Stack
• The project follows a typical SvelteKit full-stack architecture with clear separation between the presentation layer (client side) and business logic / data access layer (API endpoints and Prisma-based database interactions).
• The file tree hints at modular design in the frontend component architecture – splitting components into public view components and low-level UI building blocks.