Skip to content

coder-artisan0719/google-play-monitor-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧩 PlayStore Monitoring Dashboard (Frontend)

A real-time web dashboard that monitors Google Play Store app listings by displaying periodically captured screenshots from the backend service.
It automatically updates live via Server-Sent Events (SSE) whenever the backend captures a new screenshot β€” no refresh or polling required.


🌍 Live Demo

πŸ”— PlayStore Monitoring Dashboard β€” Live Site

πŸš€ Features

βœ… Real-time updates using Server-Sent Events (SSE)
βœ… Automatic refresh of app screenshots when backend updates the database
βœ… Add new app via Play Store URL β€” triggers backend screenshot capture
βœ… Sidebar with monitored apps
βœ… Screenshot timeline with newest first
βœ… Loading indicators for better UX
βœ… Built with React + TypeScript + Vite


🧱 Tech Stack

Layer Tech
Framework React 18
Language TypeScript
Build tool Vite
API client Axios
Real-time updates Server-Sent Events (SSE)
Styling Simple CSS

πŸ“‚ Project Structure

frontend/ β”œβ”€β”€ src/ β”‚ β”œβ”€β”€ api/ β”‚ β”‚ └── api.ts # Axios API client β”‚ β”œβ”€β”€ components/ β”‚ β”‚ β”œβ”€β”€ AddAppForm.tsx # Add new Play Store app β”‚ β”‚ β”œβ”€β”€ AppSidebar.tsx # Sidebar with app list β”‚ β”‚ β”œβ”€β”€ ScreenshotTimeline.tsx # Displays screenshots chronologically β”‚ β”‚ └── ScreenshotCard.tsx # Individual screenshot UI β”‚ β”œβ”€β”€ pages/ β”‚ β”‚ └── Dashboard.tsx # Main dashboard logic β”‚ β”œβ”€β”€ App.tsx β”‚ β”œβ”€β”€ main.tsx β”‚ └── index.css β”œβ”€β”€ package.json └── vite.config.ts 

βš™οΈ Environment Setup

1️⃣ Prerequisites

Make sure you have:

  • Node.js β‰₯ 18
  • npm β‰₯ 9
  • The backend service running at http://56.228.15.190

2️⃣ Install dependencies

npm install

3️⃣ Prerequisites

Configure environment variables

VITE_API_URL=http://56.228.15.190/api/ 

4️⃣ Start the development server

npm run dev 

Then open your browser at: πŸ‘‰ http://localhost:5173


βš™οΈ Usage

▢️ Add a new app

  1. Paste a Play Store URL (e.g. https://play.google.com/store/apps/details?id=com.activision.callofduty.shooter)

  2. Enter an app name

  3. Click β€œAdd App”

The backend captures a screenshot, saves metadata to the database, and streams the new image to the dashboard.

πŸ“Έ View screenshots

  • The first app in the sidebar loads automatically on page load.
  • Screenshots are displayed in descending order (newest first).
  • When the backend captures new screenshots (cron job), the timeline updates instantly via SSE.

🟒 Live updates

No polling or manual refresh β€” the frontend subscribes to the backend’s SSE stream:

GET /api/events 

Whenever a new screenshot is saved, the backend broadcasts a JSON event like:

{ "appId": "com.activision.callofduty.shooter", "appName": "Call of Duty Mobile", "imageUrl": "/public/screenshots/com.activision.callofduty.shooter/...png", "capturedAt": "2025-10-29T12:50:32.345Z" } 

The frontend receives and renders it immediately.

🧠 Key Logic Summary

Task File Description
Fetch apps Dashboard.tsx Loads /api/apps on mount
Select first app Dashboard.tsx Auto-selects first app and fetches its screenshots
Add new app AddAppForm.tsx Calls /api/screenshot
Fetch screenshots Dashboard.tsx Calls /api/screenshots/:appId
Live updates EventSource in Dashboard.tsx Listens for /api/events
Render UI ScreenshotTimeline.tsx + ScreenshotCard.tsx Displays screenshots visually

🧰 Example API Flow

Action Backend Endpoint Method Description
Add new app /api/screenshot POST Triggers capture and saves metadata
Get apps /api/apps GET Returns all monitored apps
Get screenshots /api/screenshots/:appId GET Returns all screenshots for one app
Live updates /api/events GET (SSE) Pushes new screenshot events

🧩 Example Screenshots

Dashboard UI

+-----------------------------------------------------+ | Monitored Apps | Play Store Monitoring | |-----------------------|------------------------------| | Call of Duty Mobile | [Add App Form] | | Clash of Clans | [Screenshot Timeline] | | ... | [Latest Screenshot ↓] | +-----------------------------------------------------+ 

🧠 Developer Notes

  • The first app in the list automatically loads on page initialization.
  • The system uses Server-Sent Events (not WebSockets) for simplicity and efficiency.
  • No setInterval or polling is used anywhere β€” updates are push-based.
  • When the backend cron captures new screenshots, the dashboard reflects them in real time.
  • You can extend this UI with Material UI, Tailwind, or Recharts for analytics.

🧩 Future Enhancements (optional ideas)

  • πŸ•“ β€œLast updated” indicator for each app
  • πŸ“Š Diff-viewer (highlight what changed between screenshots)
  • πŸ—‘ Screenshot cleanup / retention control
  • 🧭 Filter and search apps
  • 🧱 Authentication & user management

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •