spy-search-app

A realtime search box, where users search articles, featuring analytics that display what users were searching for.

Stars
2
Committers
2

📗 Table of Contents

📖 Spy Search App

"The Spy Search App is a web application designed to record search results in real-time and provide analytics on search queries and user interactions. It is built to efficiently capture search data, analyze it, and present insights to users. Below, I'll outline the key aspects of the app, including its description, tech stack, development process, features, and how search inputs are recorded in real-time."

Real-time Search Input Recording:

To record search inputs in real-time, the Spy Search App employs techniques such as AJAX requests. Here's a simplified explanation of how it works:

Client-Side Interaction: When a user performs a search on the platform, a JavaScript code on the frontend captures the search query. When a user types into the search bar, the input value is recorded immediately and a 5secs timer kicks in. Based on online researches made, a user can be assumed to have concluded typing a sentence after a 5 seconds pause. Therefore, the timer is made to restart when the user resumes typing before the 5secs timer elapses, then the new input value replaces the former. In the absence of a new input value after the 5 secs timer elapses, an automatic AJAX request is made. AJAX Request: The frontend sends an AJAX request to the backend server, containing the search query data. Backend Processing: The backend server receives the AJAX request, processes the search query, and stores it in the database.

Live Demo & Presentation

LIVE DEMO

Video Presentation

See Video

🛠 Built With

Tech Stack

The Spy Search App utilizes a modern tech stack to ensure reliability, scalability, and performance. Some of the technologies and frameworks used in its development include:

Frontend: HTML, CSS, JavaScript Backend: Ruby on Rails for server-side logic and API endpoints Database: PostgreSQL or MySQL for storing search data and analytics

Key Features

  • Real-time Search Recording: Captures search queries and user interactions as they occur in real-time.
  • Analytics Dashboard: Provides visualizations and insights into search trends, popular queries, and user behavior.
  • IP Tracking: Records the IP addresses of users making search queries to identify geographic trends and patterns.
  • Query Ranking: Ranking search queries based on popularity and frequency.
  • Database Optimization using Batches: Implementing batch processing techniques to handle scalability and optimize database performance thereby minimizing resource consumption and improving efficiency.
  • Intrinsic User-Interface

💻 Development Process:

The development of the Spy Search App followed followed a process that involved:

  • Requirements Gathering: Understanding the requirements of the project by studying project materials and doing online researches to better implement the required features
  • Design and Prototyping: Creating wireframes and prototypes to visualize the user interface and interactions.
  • Development:
    • Code Quality: Writing clean code for frontend and backend components, implementing features through the use of appopriate linters.
    • Branching Model: Using Gitflow branching model, to establish a clear and organized workflow for feature development, testing, and deployment, ensuring code quality and stability throughout the development lifecycle.
  • Testing: Conducting rspec tests, to ensure the app functions correctly and meets requirements.
  • Deployment: Deploying the app to a production environment, using Render.
  • Monitoring and Maintenance: Monitoring app performance, addressing bugs and issues.

💻 Getting Started

To get a local copy up and running, follow these steps.

Prerequisites

In order to run this project you need:

  • Code editor like VS code
  • Ruby installed in your machine

Setup

Clone this repository to your desired folder:

   git clone https://github.com/geekelo/spy-search-app.git
   cd spy-search-app

Install

Install this project with:

  cd spy-search-app
  gem install

Usage

To run the project, execute the following command:

  rails server

Run Tests

To run tests, run the following command:

  rspec spec

👥 Authors

👤 Eloghene Otiede

🔭 Future Features

  • Load more button to load analytic results in batches
  • Display 5 most popular searches as part of analytics

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

⭐️ Show your support

If you like this project drop a ⭐️

🙏 Acknowledgments

My appreciations to Helpjuice for inspiring this project

📝 License

This project is MIT licensed.