Skip to content

WIP: Complete Refactor - Modern Stack - #1

Closed
Dadud wants to merge 161 commits into
mainfrom
refactor
Closed

WIP: Complete Refactor - Modern Stack#1
Dadud wants to merge 161 commits into
mainfrom
refactor

Conversation

@Dadud

@Dadud Dadud commented Apr 15, 2026

Copy link
Copy Markdown
Owner

Scanner Map Refactor - Draft PR

Overview

This is a complete refactor of the Scanner-map project with a modern microservices architecture.

New Architecture

┌─────────────────────────────────────────┐
│         React UI (Port 5173)            │
└─────────────────────────────────────────┘
                     │
                     ▼
┌─────────────────────────────────────────┐
│         Redis Pub/Sub (Event Bus)       │
└─────────────────────────────────────────┘
        │               │               │
        ▼               ▼               ▼
┌───────────┐  ┌─────────────┐  ┌──────────────┐
│  Fastify  │  │  Discord    │  │ Transcription│
│    API    │  │    Bot      │  │   (Python)   │
│ (Port 3000)│  │             │  │  (Port 8001) │
└───────────┘  └─────────────┘  └──────────────┘
        │
        ▼
┌─────────────────────────────────────────┐
│          PostgreSQL (Port 5432)         │
└─────────────────────────────────────────┘

Services

  1. scanner-api - Fastify + TypeScript + Prisma

    • REST API endpoints
    • WebSocket (Socket.IO) for real-time
    • Redis pub/sub integration
  2. scanner-transcribe - Python + faster-whisper

    • Local transcription
    • REST API interface
  3. scanner-discord - Node.js Discord bot

    • Separate service
    • Subscribes to Redis
  4. scanner-ui - React + Vite + TailwindCSS

    • Leaflet map
    • Real-time updates

Key Changes

  • Replaced SQLite with PostgreSQL
  • Added Redis for pub/sub messaging
  • Separated Discord bot into its own service
  • React frontend with proper state management (Zustand)
  • TypeScript throughout
  • Docker Compose for orchestration

TODO

  • Add environment variable validation
  • Implement proper authentication middleware
  • Add unit tests
  • Complete WebSocket reconnection logic
  • Add tone detection integration

Status

Draft - This refactor is not yet production ready.

Dadud added 28 commits April 15, 2026 10:38
@Dadud Dadud closed this Apr 28, 2026
@Dadud
Dadud deleted the refactor branch April 28, 2026 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant