{"id":19462480,"url":"https://github.com/vansh-codes/client-side-cache-based-search-engine","last_synced_at":"2026-01-28T01:08:17.562Z","repository":{"id":262123137,"uuid":"886277917","full_name":"vansh-codes/Client-Side-Cache-Based-Search-Engine","owner":"vansh-codes","description":"Provides quick and efficient search capabilities for static content","archived":false,"fork":false,"pushed_at":"2024-11-26T18:37:21.000Z","size":285,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T07:44:58.026Z","etag":null,"topics":["cache-based-searching","notes-app","php","php-project"],"latest_commit_sha":null,"homepage":"https://notecaching-vansh-codes.wasmer.app/templates/auth/login.php","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vansh-codes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-10T16:48:58.000Z","updated_at":"2024-11-24T22:29:34.000Z","dependencies_parsed_at":"2024-11-10T17:50:59.394Z","dependency_job_id":null,"html_url":"https://github.com/vansh-codes/Client-Side-Cache-Based-Search-Engine","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":0.07692307692307687,"last_synced_commit":"df1c26d29ef04384636cec1c4e206d2fe908cb54"},"previous_names":["vansh-codes/client-side-cache-based-search-engine"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vansh-codes%2FClient-Side-Cache-Based-Search-Engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vansh-codes%2FClient-Side-Cache-Based-Search-Engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vansh-codes%2FClient-Side-Cache-Based-Search-Engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vansh-codes%2FClient-Side-Cache-Based-Search-Engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vansh-codes","download_url":"https://codeload.github.com/vansh-codes/Client-Side-Cache-Based-Search-Engine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248991710,"owners_count":21194925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cache-based-searching","notes-app","php","php-project"],"created_at":"2024-11-10T18:01:38.983Z","updated_at":"2026-01-28T01:08:17.536Z","avatar_url":"https://github.com/vansh-codes.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Client-Side Cache-Based Search Engine\n\nA lightweight, database-free search engine designed to provide quick and efficient search capabilities for static content (HTML, TXT, MD files) and dynamic notes. This project enhances user experience with a client-side caching system that speeds up search retrieval, reduces server load, and offers offline functionality through service workers.\n\n---\n\n## Table of Contents\n- [Client-Side Cache-Based Search Engine](#client-side-cache-based-search-engine)\n  - [Table of Contents](#table-of-contents)\n  - [Overview](#overview)\n  - [Features](#features)\n  - [How It Works](#how-it-works)\n  - [System Architecture](#system-architecture)\n  - [Installation](#installation)\n  - [Usage](#usage)\n  - [Configuration](#configuration)\n    - [Cache Directory Settings](#cache-directory-settings)\n    - [Cache Expiration](#cache-expiration)\n  - [Screenshots](#screenshots)\n    - [1. Home Screen](#1-home-screen)\n    - [2. Search Results](#2-search-results)\n    - [3. Offline Access](#3-offline-access)\n    - [4. Note-Taking Feature](#4-note-taking-feature)\n  - [Future Enhancements](#future-enhancements)\n  - [License](#license)\n\n---\n\n## Overview\nThe **Client-Side Cache-Based Search Engine** aims to solve the problem of slow retrieval times in traditional database-driven systems, especially for small-scale applications. By leveraging client-side caching techniques, this project allows for quick access to static content and user-generated notes without the need for repeated server queries or a complex database setup. It also features offline search capabilities, enabling users to access frequently used files and notes even without a network connection.\n\n---\n\n## Features\n- **Fast Search**: Quickly indexes and retrieves content from local static files (HTML, TXT, MD) and user-generated notes.\n- **Client-Side Caching**: Frequently accessed files are cached locally, reducing load times and minimizing server requests.\n- **Offline Access**: Integrated service worker allows users to search and access files and notes while offline.\n- **Note Management**: Includes a simple note-taking application, allowing users to create, edit, and save notes, which are also cached for fast retrieval.\n\n---\n\n## How It Works\n1. **File Indexing**: Files in designated directories are indexed upon first search and cached to enable faster access.\n2. **Client-Side Caching**: Indexed content is stored in a cache, allowing the search engine to skip file reads for frequently accessed files.\n3. **Service Worker**: A service worker caches essential files and provides offline support, making notes and static content available without internet connectivity.\n4. **Real-Time Retrieval**: Dynamic notes are cached immediately after creation, enabling instant access both online and offline.\n\n---\n\n## System Architecture\nThe system is designed around a client-side caching and service worker model, eliminating the need for a database. Here’s a simplified architecture:\n\n```mermaid\ngraph TD\n    UI[User Interface] --\u003e|Search Request| SearchEngine\n    SearchEngine --\u003e|Cache Hit?| Cache\n    Cache --\u003e|Yes| RetrieveFromCache[Retrieve from Cache]\n    RetrieveFromCache --\u003e DisplayResults\n    SearchEngine --\u003e|No| ReadFile[Read File from Directory]\n    ReadFile --\u003e IndexContent[Index and Cache Content]\n    IndexContent --\u003e Cache\n    IndexContent --\u003e DisplayResults[Display Results]\n    ServiceWorker[Service Worker] --\u003e OfflineSupport\n    Notes[Notes Storage] --\u003e Cache\n    Notes --\u003e ServiceWorker\n```\n\n---\n\n## Installation\nFollow these steps to set up the project locally:\n\n1. **Clone the Repository**\n   ```bash\n   git clone https://github.com/vansh-codes/Client-Side-Cache-Based-Search-Engine.git\n   ```\n2. **Navigate to the Directory**\n   ```bash\n   cd Client-Side-Cache-Based-Search-Engine\n   ```\n3. **Set Up XAMPP or Local PHP Server**\n   - Place the project in the appropriate XAMPP directory (e.g., `C:/xampp/htdocs/`).\n   - Start the Apache server.\n\n4. **Access the Project**\n   Open your browser and go to `http://localhost/Client-Side-Cache-Based-Search-Engine`.\n\n---\n\n## Usage\n1. **Search Content**: Use the search bar to look for keywords within indexed files and notes.\n2. **Note-Taking**: Create and save notes, which will be cached for quick access and offline availability.\n3. **Offline Access**: After the first access, files and notes can be accessed offline using the service worker.\n\n---\n\n## Configuration\n### Cache Directory Settings\nSet the directory paths for content and note storage in the configuration file:\n\n- **`CACHE_DIR`**: Path to store cached files.\n- **Content Folder**: Modify the path for static files under the `content/` directory.\n- **Notes Folder**: Modify the path for dynamic notes under the `notes/` directory.\n\n### Cache Expiration\nAdjust cache expiration settings to clear outdated files and refresh content as needed.\n\n---\n\n## Screenshots\n### 1. Home Screen\n![Home Screen](./screenshots/home_screen.png)\n\n### 2. Search Results\n![Search Results](./screenshots/search_results.png)\n\n### 3. Offline Access\n![Offline Access](./screenshots/offline_access.png)\n\n### 4. Note-Taking Feature\n![Note-Taking Feature](./screenshots/note_taking.png)\n\n---\n\n## Future Enhancements\n- **Advanced Search Capabilities**: Implement fuzzy search and keyword highlighting for more intuitive searches.\n- **Enhanced Cache Management**: Introduce cache expiration policies for better storage management.\n- **Multi-Format Note-Taking**: Support additional note formats (TXT, MD, HTML) and automatically cache them for faster retrieval.\n\n---\n\n## License\nThis project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.\n\n---\n\n**Enjoy fast, efficient, and offline-capable searches!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvansh-codes%2Fclient-side-cache-based-search-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvansh-codes%2Fclient-side-cache-based-search-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvansh-codes%2Fclient-side-cache-based-search-engine/lists"}