Skip to content

Course project for the Computer Exercises class: CogniLink.

License

Notifications You must be signed in to change notification settings

xihao-yang/CogniLink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

33 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CogniLink - Intelligent Bookmark and Knowledge Management System

CogniLink is a powerful client-side bookmark and knowledge management system that runs entirely in the browser and uses IndexedDB for data storage.

Project Description

This project is implemented as part of the course requirements. The repository contains source code and materials related to the CogniLink project.

Notes

This repository is intended for educational purposes only.

Disclaimer

This project is not intended as a research prototype or a production system.

Features

  • πŸ“š Intelligent Bookmark Management - Add, edit, delete, and organize bookmarks
  • πŸ” Full-Text Search - High-performance full-text search via a custom inverted index
  • 🏷️ Tag System - Categorize and organize bookmarks with tags
  • πŸ“ Category Management - Create and manage bookmark categories
  • ⭐ Favorites - Mark and filter favorite bookmarks
  • πŸ“¦ Archiving - Archive bookmarks that are no longer needed
  • πŸ’Ύ Client-Side Storage - All data is stored in the browser via IndexedDB
  • 🎨 Modern UI - A clean, responsive user interface

Tech Stack

  • React 18+ - UI framework
  • TypeScript - Type safety and maintainability
  • IndexedDB - Client-side persistent storage
  • Vite - Build tool and development server
  • Custom Search Index - Inverted index–based full-text search implementation

Project Structure

CogniLink/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/        # React components
β”‚   β”‚   β”œβ”€β”€ bookmarks/     # Bookmark-related components
β”‚   β”‚   β”œβ”€β”€ categories/    # Category-related components
β”‚   β”‚   β”œβ”€β”€ tags/          # Tag-related components
β”‚   β”‚   β”œβ”€β”€ search/        # Search-related components
β”‚   β”‚   β”œβ”€β”€ filters/       # Filtering components
β”‚   β”‚   β”œβ”€β”€ layout/        # Layout components
β”‚   β”‚   └── ui/            # Shared UI primitives/components
β”‚   β”œβ”€β”€ contexts/          # React Context
β”‚   β”œβ”€β”€ db/                # IndexedDB management layer
β”‚   β”œβ”€β”€ services/          # Business logic services
β”‚   β”œβ”€β”€ types/             # TypeScript type definitions
β”‚   β”œβ”€β”€ utils/             # Utility functions
β”‚   β”œβ”€β”€ App.tsx            # Main application component
β”‚   └── main.tsx           # Application entry point
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
└── vite.config.ts

Installation and Running

Install Dependencies

npm install

Development Mode

npm run dev

The application will start at http://localhost:5173

Build for Production

npm run build

Preview the Production Build

npm run preview

Core Implementation

1. IndexedDB Data Management

  • Database schema design
  • Asynchronous transaction handling
  • Data migration support
  • Data import/export

2. Custom Search Index

  • Inverted index implementation
  • Chinese/English tokenization
  • TF-IDF scoring
  • Multi-field search

3. React Component Architecture

  • 25+ functional components25+
  • State management via Context API
  • Custom Hooks
  • Responsive design

Data Model

Bookmark

interface Bookmark {
  id: string;
  title: string;
  url: string;
  description?: string;
  notes?: string;
  categoryId?: string;
  tags: string[];
  createdAt: number;
  updatedAt: number;
  favorite: boolean;
  archived: boolean;
}

Category

interface Category {
  id: string;
  name: string;
  description?: string;
  color?: string;
  icon?: string;
  parentId?: string;
  createdAt: number;
  updatedAt: number;
}

Tag

interface Tag {
  id: string;
  name: string;
  color?: string;
  createdAt: number;
  usageCount: number;
}

Usage Guide

Adding a Bookmark

  1. Click the β€œAdd Bookmark” button in the top-right corner
  2. Fill in the bookmark details (Title and URL are required)
  3. Optional: add description, notes, category, and tags
  4. Click β€œAdd” to save

Searching Bookmarks

  1. Enter keywords in the top search bar
  2. The system searches across title, description, notes, URL, and tags automatically
  3. Results are ranked by relevance

Managing Categories

  1. Click the "Categories" tab in the sidebar
  2. Click "Add Category" to create a new category
  3. Click a category name to filter bookmarks under that category

Using Tags

  1. Enter tags when adding/editing a bookmark
  2. Click "Tags" in the sidebar to view all tags
  3. Click a tag to filter bookmarks that contain it

Favorites and Archiving

  • Click the star icon on a bookmark card to favorite it
  • Archive a bookmark from the bookmark details page
  • Use the filter panel to quickly view favorited or archived bookmarks

Browser Compatibility

  • Chrome/Edge (latest)
  • Firefox (latest)
  • Safari (latest)

License

MIT License

Author

Xihao Yang


⚠️⚠️Caution⚠️⚠️: This is a purely client-side application; all data is stored within the browser's IndexedDB. Clearing your browser data will result in the loss of all bookmarks. Please export your data regularly to maintain backups.

About

Course project for the Computer Exercises class: CogniLink.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published