Intial Version
This commit is contained in:
22
.kiro/steering/product.md
Normal file
22
.kiro/steering/product.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Product Overview
|
||||
|
||||
rmtPocketWatcher is a cross-platform desktop application that tracks real-money trading (RMT) prices for Star Citizen AUEC (in-game currency). The app provides a Bloomberg-style terminal interface displaying a real-time AUEC Price Index derived from multiple vendor sources. It is developed and offered by the Lambda Banking Conglomerate a Star Citizen Organization
|
||||
|
||||
## Core Functionality
|
||||
|
||||
- Scrapes AUEC prices from Eldorado and PlayerAuctions every 5 minutes
|
||||
- Tracks all individual seller listings with platform, seller name, and USD per 1M AUEC
|
||||
- Computes lowest price across all vendors and sellers
|
||||
- Displays real-time price data with seller-level granularity
|
||||
- Historical charts showing price trends by seller, platform, or lowest overall
|
||||
- Vendor comparison table with sortable/filterable seller listings
|
||||
- Client-side alerts for price thresholds with native notifications
|
||||
- Long-term historical data storage for all listings (not just lowest)
|
||||
|
||||
## Key Constraints
|
||||
|
||||
- Desktop-only (no mobile or web versions)
|
||||
- No buying/selling functionality within the app
|
||||
- Alerts are evaluated client-side, not on the backend
|
||||
- Focus on data visualization and tracking, not RMT facilitation
|
||||
- Store all seller listings over time for historical comparison and trend analysis
|
||||
66
.kiro/steering/structure.md
Normal file
66
.kiro/steering/structure.md
Normal file
@@ -0,0 +1,66 @@
|
||||
# Project Structure
|
||||
|
||||
This is a monorepo-style project with separate backend and frontend applications.
|
||||
|
||||
## Expected Organization
|
||||
|
||||
```
|
||||
/
|
||||
├── backend/ # TypeScript backend server
|
||||
│ ├── src/
|
||||
│ │ ├── scrapers/ # Playwright scraping modules
|
||||
│ │ ├── api/ # REST endpoints
|
||||
│ │ ├── websocket/ # WebSocket handlers
|
||||
│ │ ├── database/ # Prisma/Drizzle schema & migrations
|
||||
│ │ ├── services/ # Business logic (price index calculation)
|
||||
│ │ └── utils/ # Shared utilities
|
||||
│ ├── tests/
|
||||
│ ├── Dockerfile
|
||||
│ └── package.json
|
||||
│
|
||||
├── electron-app/ # Electron + React frontend
|
||||
│ ├── src/
|
||||
│ │ ├── main/ # Electron main process
|
||||
│ │ ├── renderer/ # React UI components
|
||||
│ │ │ ├── components/
|
||||
│ │ │ ├── pages/
|
||||
│ │ │ ├── hooks/
|
||||
│ │ │ └── store/ # Zustand/Recoil state
|
||||
│ │ └── shared/ # IPC types & shared code
|
||||
│ ├── tests/
|
||||
│ └── package.json
|
||||
│
|
||||
├── shared/ # Shared TypeScript types/interfaces
|
||||
│ └── types/
|
||||
│
|
||||
├── .kiro/ # Kiro AI assistant configuration
|
||||
│ └── steering/ # Project guidance documents
|
||||
│
|
||||
├── PRD.md # Product Requirements Document
|
||||
└── README.md
|
||||
```
|
||||
|
||||
## Architecture Patterns
|
||||
|
||||
- **Backend**: Modular service-oriented architecture
|
||||
- Scrapers are isolated, containerized services
|
||||
- API layer is stateless for horizontal scaling
|
||||
- TimescaleDB handles time-series data efficiently
|
||||
|
||||
- **Frontend**: Component-based React architecture
|
||||
- Sandboxed renderer process for security
|
||||
- Secure IPC messaging between main and renderer
|
||||
- Client-side alert evaluation logic
|
||||
|
||||
- **Database Schema**: Three main tables
|
||||
- `raw_vendor_prices`: Individual vendor listings
|
||||
- `price_index`: Computed median index values
|
||||
- `scrape_log`: Monitoring and debugging
|
||||
|
||||
## Key Conventions
|
||||
|
||||
- All code in TypeScript with strict type checking
|
||||
- Scrapers include retry logic (3 attempts) and error handling
|
||||
- WebSocket auto-reconnect logic in Electron app
|
||||
- Signed binaries for all platform distributions
|
||||
- No remote code evaluation in Electron (security)
|
||||
55
.kiro/steering/tech.md
Normal file
55
.kiro/steering/tech.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# Technology Stack
|
||||
|
||||
## Backend
|
||||
|
||||
- **Language**: TypeScript (Node.js)
|
||||
- **Framework**: Fastify
|
||||
- **Scraping**: Playwright (headless Chromium)
|
||||
- **Database**: PostgreSQL + TimescaleDB extension
|
||||
- **ORM**: Prisma or Drizzle
|
||||
- **Job Scheduling**: Node Scheduler or BullMQ
|
||||
- **WebSockets**: Native `ws` or Fastify WS plugin
|
||||
- **Deployment**: Docker containers
|
||||
|
||||
## Frontend (Electron Desktop App)
|
||||
|
||||
- **Framework**: Electron 30+
|
||||
- **UI Library**: NextJS? + TypeScript/TSX
|
||||
- **Build Tool**: Vite
|
||||
- **Styling**: TailwindCSS
|
||||
- **Charts**: Recharts, ECharts, or TradingView Charting Library
|
||||
- **State Management**: Zustand or Recoil
|
||||
- **Auto-updates**: electron-updater
|
||||
|
||||
## Testing
|
||||
|
||||
- **Unit Tests**: Jest
|
||||
- **E2E Tests**: Playwright
|
||||
- **API Integration**: Supertest or Pact
|
||||
|
||||
## Common Commands
|
||||
|
||||
```bash
|
||||
# Backend
|
||||
npm run dev # Start development server
|
||||
npm run build # Build TypeScript
|
||||
npm run test # Run Jest tests
|
||||
npm run scrape # Manual scrape trigger
|
||||
|
||||
# Frontend (Electron)
|
||||
npm run dev # Start Electron in dev mode
|
||||
npm run build # Build production app
|
||||
npm run package # Package for distribution
|
||||
npm run test # Run tests
|
||||
|
||||
# Database
|
||||
npm run migrate # Run database migrations
|
||||
npm run seed # Seed initial data
|
||||
```
|
||||
|
||||
## Performance Requirements
|
||||
|
||||
- API latency < 50ms for standard queries
|
||||
- Support 5000+ concurrent WebSocket connections
|
||||
- Desktop app must handle 50k+ chart datapoints smoothly
|
||||
- Scraping frequency: every 5 minutes (configurable)
|
||||
Reference in New Issue
Block a user