Skip to content

Search360 is a full-stack web application that enables users to search the web using DuckDuckGo and store query history. The project includes persistent query history with caching for improved performance.

License

Notifications You must be signed in to change notification settings

arthursvpb/search360

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐥 Search360

Running   |    Technologies   |    License

License

Search360

Search360 is a full-stack web application that enables users to search the web using DuckDuckGo and stores query history. The project includes pagination, search highlighting, and persistent query history with caching for improved performance.

🚀 Features

Search using DuckDuckGo API
Fast & efficient caching with Redis
Search highlighting (like Chrome’s Find feature)
Persistent query history stored in SQLite
Built with React, Redux, NestJS, SQLite, and Redis

📈 System Design Overview

Search360-SystemDesign

💻 Running

Requirements

  • docker
  • node >= 20

1️⃣ Clone the Repository

git clone https://github.com/arthursvpb/search360.git
cd search360

2️⃣ Set Up Environment Variables

Copy the .env.example file to a .env in the api folder.

3️⃣ Start the Application

# Run the back-end
cd ./api && npm run docker:start # docker:reset for a clean start-up
# Go back to the root folder
cd ..
# Run the front-end
cd ./www && npm install && npm run dev
  • Frontend: Runs on http://localhost:5173/
  • Backend: Runs on http://localhost:3000/

Caching with Redis

To improve performance, Redis is used for query caching:

  • Search queries are cached to prevent redundant API calls.
  • Past queries are stored in Redis and reloaded instantly when the application restarts.

Clear Cache Manually

Run the following command:

docker exec -it redis redis-cli FLUSHALL

This will reset all cached queries.

🛠️ API Endpoints

🔎 Search

Supports both GET and POST requests.

GET /search?q=your-query

POST /search

{
  "q": "your-query"
}

Response (Same for Both Methods)

{
  "results": [
    {
      "title": "Example Title",
      "url": "https://example.com"
    }
  ]
}

📜 Query History

GET /history

{
  "history": [
    {
      "id": 1,
      "searchTerm": "example query",
      "createdAt": "2025-02-21T12:34:56.789Z"
    },
    {
      "id": 2,
      "searchTerm": "another query",
      "createdAt": "2025-02-21T12:30:00.123Z"
    }
  ]
}

Technologies

  • Frontend: React, Redux, Material UI
  • Backend: NestJS, SQLite, Redis
  • API: DuckDuckGo
  • Containerization: Docker

📝 License

This project is under the MIT license. See the LICENSE file for more details.

About

Search360 is a full-stack web application that enables users to search the web using DuckDuckGo and store query history. The project includes persistent query history with caching for improved performance.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published