Skip to content

Ragnaroos/GameGo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚔️ GameGo — Virtual Asset Trading Platform

A high-concurrency virtual asset trading platform for in-game items, accounts, and digital goods.
Features flash sales, Alipay sandbox payment, and AI-powered review moderation.
Built end-to-end with an Agentic workflow powered by Claude Code.


✨ Highlights

⚡ High-Concurrency Flash Sale & Order System

  • Redisson distributed lock enforces one-order-per-user at the application layer; version-field optimistic lock at the database layer eliminates overselling under concurrent writes.
  • Orders flow through RocketMQ for async decoupling, significantly boosting system throughput.
  • Full payment lifecycle via Alipay Sandbox: PENDING → PAID → SHIPPED → COMPLETED.
  • Spring Task auto-cancels timed-out orders; a state machine + optimistic lock guarantees atomic status transitions, safely resolving races between concurrent payment callbacks and scheduled cancellations.

🛡️ Two-Level Cache Architecture

Layer Technology Strategy
L1 Local Caffeine Hot data in-process, microsecond latency
L2 Distributed Redis Shared across instances, millisecond latency
  • Bloom Filter prevents cache penetration on non-existent keys.
  • Logical Expiration prevents hotspot key breakdown without locking the main thread.
  • Dynamic random TTL offsets expiration timing to prevent cache avalanche.
  • Cache Aside strategy: update DB first, then delete cache. On deletion failure, a RocketMQ delayed retry compensates; TTL serves as the final safety net — achieving eventual consistency.

🤖 AI-Powered Review Moderation

  • Built on XLM-R-base (multilingual), extended with a Mixture-of-Experts (MoE) routing layer.
  • Training uses dynamic temperature annealing sampling for load-balanced expert routing.
  • LoRA supervised fine-tuning on domain-specific review dataset.
  • Results: 98% accuracy on language-family classification, 85% recall on inappropriate content detection.

🏗️ System Architecture

┌─────────────────────────────────────────────────────────────┐
│                        Client (Vue 3)                        │
│          Buyer │ Seller │ Admin                              │
└────────────────────────┬────────────────────────────────────┘
                         │ HTTP / JWT
                    ┌────▼────┐
                    │  Nginx  │  Reverse Proxy + Static Files
                    └────┬────┘
                         │
              ┌──────────▼──────────┐
              │   Spring Boot API   │
              │  MyBatis │ JWT Auth │
              └──┬──────┬──────┬───┘
                 │      │      │
         ┌───────▼─┐  ┌─▼──────▼──┐  ┌─────────────┐
         │  MySQL  │  │  Redis +  │  │  RocketMQ   │
         │ (orders │  │ Caffeine  │  │ (async jobs │
         │  items) │  │  Cache    │  │  & retries) │
         └─────────┘  └───────────┘  └──────┬──────┘
                                             │
                                    ┌────────▼────────┐
                                    │ Python AI Service│
                                    │ XLM-R + MoE +   │
                                    │    LoRA          │
                                    └─────────────────┘

🔧 Tech Stack

Layer Technology
Frontend Vue 3, Vite, Element Plus, Pinia, Vue Router, ECharts
Backend Spring Boot, MyBatis, JWT, Spring Task
Database MySQL 8 (relational), Redis 7 (cache & session)
Cache Caffeine (L1) + Redis (L2), Bloom Filter, Lua scripts
Messaging RocketMQ 5 (async order flow, delayed retry)
Payment Alipay Sandbox SDK
AI / ML Python, XLM-R-base, MoE, LoRA, Transformers
Infrastructure Nginx, Docker (optional)

📸 Screenshots

Admin Console

User Management Suspicious Behavior Detection
User Management Suspicious Behavior
Category Management Order Overview
Category Orders

Buyer Portal

Product List Flash Sale
Product List Flash Sale
Personalized Recommendations Shopping Cart
Recommendations Cart
Product Detail Alipay Payment
Product Detail Payment
My Orders Review Submission
Orders Review

Seller Dashboard

Sales Analytics Order Management
Analytics Order Mgmt
Flash Sale Setup Add Product
Flash Sale Add Product

🚀 Quick Start

Prerequisites

  • JDK 17+
  • Node.js 18+
  • MySQL 8.x
  • Redis 7.x
  • RocketMQ 5.x (optional for full async flow)

Backend

# 1. Import database schema
mysql -u root -p < taobao.sql

# 2. Configure application.properties
#    Set your MySQL / Redis / RocketMQ / Alipay credentials

# 3. Run
cd TaobaoWeb
mvn spring-boot:run
# Starts on http://localhost:8081

Frontend

cd mall
npm install
npm run dev
# Starts on http://localhost:5173

Default Accounts

Role Username Password
Super Admin admin admin123
Buyer buyer_demo 123456
Seller seller_demo 123456

📁 Project Structure

GameGo/
├── TaobaoWeb/               # Spring Boot backend
│   └── src/main/java/
│       ├── controller/      # REST API layer
│       ├── service/         # Business logic
│       ├── dao/             # MyBatis mappers
│       ├── entity/          # Domain models
│       └── dto/             # Data transfer objects
├── mall/                    # Vue 3 frontend
│   └── src/
│       ├── views/           # Page components (buyer/seller/admin)
│       ├── components/      # Shared UI components
│       ├── stores/          # Pinia state management
│       ├── api/             # Axios API modules
│       └── router/          # Vue Router config
├── docs/
│   └── screenshots/         # UI screenshots
└── taobao.sql               # Database schema & seed data

🗺️ Roadmap

  • Multi-role auth (Admin / Buyer / Seller) with JWT
  • Product listing, search, category filtering
  • Flash sale with distributed lock + optimistic lock
  • Alipay Sandbox payment integration
  • Two-level cache (Caffeine + Redis) with anti-penetration/avalanche
  • RocketMQ async order flow + delayed retry for cache consistency
  • AI review moderation (XLM-R + MoE + LoRA)
  • Seller sales analytics dashboard (ECharts)
  • Elasticsearch full-text search
  • Kubernetes deployment manifests

Built with ❤️ using an Agentic workflow powered by Claude Code

About

Virtual asset trading platform for in-game items & accounts. Features flash sales, Alipay payment, two-level cache (Caffeine+Redis), RocketMQ async flow, and AI-powered review moderation (XLM-R+MoE+LoRA).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors