Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

20 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

NeuraPlay - AI Game Coaching Platform

NeuraPlay Google Cloud React Chrome Extension

๐ŸŽฎ Overview

NeuraPlay is a comprehensive AI-powered game coaching platform that provides real-time analysis and personalized coaching for gamers. Using advanced AI and voice technology, NeuraPlay helps players improve their skills in popular games like League of Legends and FIFA/EA FC.

โœจ Features

๐Ÿค– AI-Powered Coaching

  • Real-time Voice Analysis - Speak your gameplay issues and get instant AI feedback
  • Multi-Game Support - League of Legends and FIFA/EA FC coaching
  • Structured Advice - Top tips, training drills, and performance ratings
  • Voice Responses - Audio coaching with Text-to-Speech technology

๐ŸŒ Multi-Platform Access

  • Web Dashboard - Full-featured React application with voice interface
  • Browser Extension - Automatic analysis from gaming websites (OP.GG, U.GG, Futbin)
  • Responsive Design - Works seamlessly on desktop and mobile devices

๐Ÿš€ Technical Excellence

  • Serverless Architecture - Deployed on Google Cloud Run for scalability
  • Real-time Processing - WebSocket support for live voice analysis
  • Secure Authentication - Firebase Auth with JWT tokens
  • Modern Tech Stack - React, Django, Gemini AI, and Cloud Services

๐Ÿ—๏ธ System Architecture

    Client Applications โ†’ Django Backend (Cloud Run) โ†’ AI Services โ†’ Data Storage
        โ”‚              โ”‚           โ”‚               โ”‚
        โ”‚              โ”‚           โ”‚               โ””โ”€โ”€ Firebase Firestore (Analysis History)
        โ”‚              โ”‚           โ”‚               โ””โ”€โ”€ Firebase Auth (User Management)
        โ”‚              โ”‚           โ”‚
        โ”‚              โ”‚           โ”œโ”€โ”€ Gemini AI (Game Analysis & Coaching)
        โ”‚              โ”‚           โ”œโ”€โ”€ Speech-to-Text (Voice Transcription)  
        โ”‚              โ”‚           โ””โ”€โ”€ Text-to-Speech (Audio Responses)
        โ”‚              โ”‚
        โ”œโ”€โ”€ React Frontend (Web Dashboard)
        โ””โ”€โ”€ Browser Extension (Game Data Capture)

๐Ÿ“ Project Structure

    neuraplay-cloudrun/
    โ”œโ”€โ”€ neuraplay/                 # Django Backend
    โ”‚   โ”œโ”€โ”€ analysis/             # Game analysis logic
    โ”‚   โ”œโ”€โ”€ neuraplay_ai/         # AI services (Gemini, STT, TTS)
    โ”‚   โ””โ”€โ”€ manage.py
    โ”œโ”€โ”€ neuraplay-app/            # React Frontend
    โ”‚   โ”œโ”€โ”€ src/
    โ”‚   โ”‚   โ”œโ”€โ”€ components/       # VoiceInput, LoginButton
    โ”‚   โ”‚   โ”œโ”€โ”€ firebase/         # Firebase configuration
    โ”‚   โ”‚   โ””โ”€โ”€ store/            # State management
    โ”‚   โ””โ”€โ”€ package.json
    โ”œโ”€โ”€ neuraplay-extension/      # Chrome Browser Extension
    โ”‚   โ”œโ”€โ”€ content/              # Page scraping scripts
    โ”‚   โ”œโ”€โ”€ background/           # Service worker
    โ”‚   โ”œโ”€โ”€ popup/                # Extension interface
    โ”‚   โ””โ”€โ”€ manifest.json
    โ””โ”€โ”€ README.md                 # This file

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 22+
  • Python 3.11+
  • Google Cloud Project
  • Firebase Project
  1. Backend Setup (Django)
    # Clone the repository
    git clone https://github.com/Oluwaseyi89/neuraplay-cloudrun.git
    cd neuraplay-cloudrun/neuraplay

    # Set up Python environment
    python -m venv venv
    source venv/bin/activate  # Windows: venv\Scripts\activate

    # Install dependencies
    pip install -r requirements.txt

    # Set environment variables
    cp .env.example .env
    # Configure: GEMINI_API_KEY, FIREBASE_CREDENTIALS_BASE64, etc.

    # Run migrations
    python manage.py migrate

    # Start development server
    python manage.py runserver
  1. Frontend Setup (React)
    cd ../neuraplay-app

    # Install dependencies
    npm install

    # Configure environment
    cp .env.example .env
    # Set VITE_API_BASE_URL, Firebase config values

    # Start development server
    npm run dev
  1. Browser Extension Setup
    cd ../neuraplay-extension

    # Load in Chrome:
    # 1. Open chrome://extensions/
    # 2. Enable "Developer mode"
    # 3. Click "Load unpacked"
    # 4. Select neuraplay-extension folder

๐ŸŽฏ Usage Examples

Voice Coaching

  1. Open Web Dashboard - Access the React frontend
  2. Select Game - Choose FIFA or League of Legends
  3. Speak Your Issue - "I keep missing through passes in FIFA"
  4. Get AI Analysis - Receive structured coaching with audio response

Browser Extension

  1. Install Extension - Add to Chrome browser
  2. Visit Gaming Sites - OP.GG, U.GG, or Futbin
  3. Automatic Analysis - Get instant coaching based on your stats
  4. View Overlay - See tips and ratings directly on the page

Analysis History

  • Review past coaching sessions
  • Track performance improvements
  • Access previous tips and drills

๐Ÿ”ง API Endpoints

Voice Analysis

  • POST /api/analyze/lol/ - League of Legends voice analysis
  • POST /api/analyze/fifa/ - FIFA voice analysis
  • POST /api/process-voice-input/ - Unified voice processing

Analysis History

  • GET /api/analyses/recent/lol/ - Recent LoL analyses
  • GET /api/analyses/recent/fifa/ - Recent FIFA analyses

Browser Extension

  • POST /api/analyze/browser-stats/ - Process scraped game data

๐Ÿ› ๏ธ Technology Stack

Backend Services

  • Framework: Django 4.2 + Django REST Framework
  • AI/ML: Google Gemini 1.5, Speech-to-Text, Text-to-Speech
  • Cloud: Google Cloud Run, Firebase Firestore & Auth
  • Real-time: Django Channels (WebSocket)

Frontend Applications

  • Web Dashboard: React 18, TypeScript, Tailwind CSS
  • Browser Extension: Manifest V3, Chrome APIs
  • Authentication: Firebase Auth
  • State Management: Zustand

External Services

  • Google AI: Gemini, Speech-to-Text, Text-to-Speech
  • Firebase: Authentication, Firestore Database
  • Cloud Run: Serverless Container Deployment

๐Ÿ”’ Security & Privacy

  • JWT Authentication - Secure user sessions with Firebase Auth
  • Data Encryption - All communications over HTTPS
  • Privacy First - No personal data stored unnecessarily
  • User Isolation - Data separation by Firebase UID

๐Ÿ“ˆ Performance

  • Response Time: <5 seconds for voice analysis
  • Scalability: Auto-scaling with Google Cloud Run
  • Concurrency: Supports multiple simultaneous users
  • Availability: 99.9% target with graceful degradation

๐Ÿš€ Deployment

Backend to Google Cloud Run

    # Deploy to Google Cloud Run
    REDIS_IP=$(gcloud redis instances describe neuraplay-redis --region=us-central1 --format="value(host)");
    echo "New Redis IP: $REDIS_IP";
    gcloud run deploy neuraplay-service \
    --source . \
    --platform managed \
    --region us-central1 \
    --allow-unauthenticated \
    --set-env-vars="GEMINI_API_KEY=$GEMINI_API_KEY" \
    --set-env-vars="FIREBASE_CREDENTIALS_BASE64=$FIREBASE_CREDENTIALS_BASE64" \
    --port=8080 \
    --cpu=1 \
    --memory=1Gi \
    --min-instances=1 \
    --timeout=300s

Frontend to Google Cloud Run

  npm run build

  docker build -t neuraplay-app .

  gcloud run deploy neuraplay-app \
    --source . \
    --region us-central1 \
    --platform managed \
    --allow-unauthenticated

Extension Distribution

  • Package as .crx file for Chrome Web Store
  • Or load unpacked for development

๐ŸŽฎ Supported Games

League of Legends

  • KDA analysis and strategy coaching
  • Objective control and macro decisions
  • Champion-specific advice and drills
  • Vision control and map awareness

FIFA/EA FC

  • Formation and tactical analysis
  • Passing and shooting mechanics
  • Defensive organization
  • Set piece strategies

About

NeuraPlay is a game decision-making agent deployed on Google Cloud Run. The system features a React frontend and a Django backend that integrates Google's Gemini API for intelligent gameplay analysis and recommendations.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages