shallweplay-backend
β Healthy vunknown π€ @3xzyle
Overview
Social gaming backend for casual multiplayer games and matchmaking
shallweplay-backend service
π¦ Source Repository
Key Features
-
Quick Match
-
Friends System
-
Game History
-
Achievements
-
Social Features
Architecture
Node.js backend with Socket.io for real-time communication
System Overview
%%{init: {
'theme': 'dark',
'themeVariables': {
'primaryColor': '#db41f6',
'primaryBorderColor': '#e066f7',
'primaryTextColor': '#ffffff',
'secondaryColor': '#1a0f2e',
'tertiaryColor': '#0f0a1a',
'lineColor': '#22c55e',
'fontSize': '14px'
}
}}%%
flowchart TB
subgraph EXTERNAL["π External"]
CLIENT[/"π€ Clients"/]
INGRESS["πͺ Ingress"]
end
subgraph NS["valina-rpg Namespace"]
direction TB
subgraph SVC["π¦ shallweplay-backend"]
DEPLOY["βοΈ Deployment<br/>2 replicas"]
subgraph PODS["Pods"]
POD0["Pod 1"]
POD1["Pod 2"]
end
end
end
subgraph DATA["πΎ Data Layer"]
DB0["π PostgreSQL (DATABASE_HOST)"]
DB1["π PostgreSQL (DATABASE_NAME)"]
DB2["π PostgreSQL (DATABASE_PORT)"]
DB3["π PostgreSQL (DATABASE_USER)"]
DB4["β‘ Redis (REDIS_URL)"]
DB5["π PostgreSQL"]
end
CLIENT --> INGRESS --> DEPLOY
DEPLOY --> DATA
Component Architecture
%%{init: {
'theme': 'dark',
'themeVariables': {
'primaryColor': '#db41f6',
'primaryBorderColor': '#e066f7',
'primaryTextColor': '#ffffff',
'secondaryColor': '#1a0f2e',
'tertiaryColor': '#0f0a1a',
'lineColor': '#22c55e',
'fontSize': '14px'
}
}}%%
flowchart TB
subgraph ARCH_CLIENT["π§ Client Layer"]
ARCH_USER[/"User Interaction"/]
end
subgraph ARCH_CORE["π shallweplay-backend Core"]
direction TB
subgraph ARCH_FEATURES["β¨ Features"]
ARCH_F0["Quick Match"]
ARCH_F1["Friends System"]
ARCH_F2["Game History"]
ARCH_F3["Achievements"]
ARCH_F4["Social Features"]
end
subgraph ARCH_PROCESS["βοΈ Processing"]
ARCH_HANDLER["Request Handler"]
ARCH_LOGIC["Business Logic"]
end
end
subgraph ARCH_DATA["πΎ Data Layer"]
ARCH_DB0["PostgreSQL (DATABASE_HOST)"]
ARCH_DB1["PostgreSQL (DATABASE_NAME)"]
ARCH_DB2["PostgreSQL (DATABASE_PORT)"]
ARCH_DB3["PostgreSQL (DATABASE_USER)"]
ARCH_DB4["Redis (REDIS_URL)"]
ARCH_DB5["PostgreSQL"]
end
ARCH_USER --> ARCH_CORE
ARCH_HANDLER --> ARCH_LOGIC
ARCH_LOGIC --> ARCH_DATA
Container Details
| Property | Value |
|---|---|
| Image | game-shallweplay-backend-rust:v2026.01.07 |
| Replicas | 2 / 2 ready |
| CPU Request | 50m |
| CPU Limit | 500m |
| Memory Request | 64Mi |
| Memory Limit | 256Mi |
Flows and Processes
Process Flow
%%{init: {
'theme': 'dark',
'themeVariables': {
'primaryColor': '#db41f6',
'primaryBorderColor': '#e066f7',
'primaryTextColor': '#ffffff',
'secondaryColor': '#1a0f2e',
'tertiaryColor': '#0f0a1a',
'lineColor': '#22c55e',
'fontSize': '14px'
}
}}%%
flowchart LR
subgraph FLOW_IN["π₯ Input"]
AI_INPUT["π₯ Input Data"]
AI_CONTEXT["π§ Context"]
AI_MODEL["π€ Model Config"]
end
subgraph FLOW_PROC["βοΈ Processing"]
AI_EMBED["π’ Embed"]
AI_INFER["π§ shallweplay-backend Inference"]
AI_RANK["π Rank/Score"]
AI_FILTER["π Filter"]
end
subgraph FLOW_OUT["π€ Output"]
AI_RESULT["β¨ Result"]
AI_CONFIDENCE["π Confidence"]
AI_EXPLAIN["π‘ Explanation"]
end
AI_INPUT --> AI_EMBED
AI_CONTEXT --> AI_EMBED
AI_MODEL --> AI_INFER
AI_EMBED --> AI_INFER --> AI_RANK --> AI_FILTER
AI_FILTER --> AI_RESULT
AI_INFER --> AI_CONFIDENCE
AI_RANK --> AI_EXPLAIN
Request Lifecycle
%%{init: {
'theme': 'dark',
'themeVariables': {
'primaryColor': '#db41f6',
'primaryBorderColor': '#e066f7',
'primaryTextColor': '#ffffff',
'secondaryColor': '#1a0f2e',
'tertiaryColor': '#0f0a1a',
'lineColor': '#22c55e',
'fontSize': '14px'
}
}}%%
sequenceDiagram
autonumber
participant C as π€ Client
participant I as πͺ Ingress
participant S as βοΈ shallweplay-backend
participant D as πΎ Database
participant R as β‘ Redis Cache
C->>+I: HTTP Request
I->>+S: Route to Service
Note over S: Health Check β
S->>R: Check Cache
alt Cache Hit
R-->>S: Return Cached
else Cache Miss
S->>+D: Query Data
D-->>-S: Return Result
S->>R: Update Cache
end
S-->>-I: Response
I-->>-C: HTTP Response
Custom Flows
-
Quick Match
-
Friend Invite
-
Game Start
-
Score Submission
Integration and APIs
Exposed Ports
| Port | Service |
|---|---|
| http:8080 | shallweplay-backend |
Health Check
/health:8080
Dependencies
| Service | Purpose |
|---|---|
| postgresql | Dependency |
| redis | Dependency |
Data Stores
-
PostgreSQL (DATABASE_HOST)
-
PostgreSQL (DATABASE_NAME)
-
PostgreSQL (DATABASE_PORT)
-
PostgreSQL (DATABASE_USER)
-
Redis (REDIS_URL)
-
PostgreSQL
Security and Compliance
Security Context
| Setting | Value |
|---|---|
| Security Level | Hardened |
| Run as Non-Root | β Yes |
| Read-Only Root FS | β Yes |
| Service Account | game-sa |
Dropped Capabilities
ALL
Security Best Practices
Hardened Security
This service follows security best practices:
- β Runs as non-root user
- β Read-only root filesystem
- β All capabilities dropped
Monitoring and Operations
Health Probes
Readiness Probe
| Setting | Value |
|---|---|
| Endpoint | /health:8080 |
| Initial Delay | 5s |
| Period | 10s |
| Timeout | 1s |
Liveness Probe
| Setting | Value |
|---|---|
| Endpoint | /health:8080 |
| Initial Delay | 10s |
| Period | 30s |
| Timeout | 1s |
No Prometheus metrics configured. Add prometheus.io/scrape: "true" annotation.
Operations Commands
# Check deployment status
kubectl get deployment shallweplay-backend -n valina-rpg
# View logs
kubectl logs -l app.kubernetes.io/name=shallweplay-backend -n valina-rpg -f
# Scale replicas
kubectl scale deployment/shallweplay-backend -n valina-rpg --replicas=3
# Restart deployment
kubectl rollout restart deployment/shallweplay-backend -n valina-rpg
π§ AI-Powered Diagnostics
π§ Diagnostics
β No issues detected
π SLO Dashboard
| SLO | Target | Current | Error Budget | Status |
|---|---|---|---|---|
| π’ Availability | 99.9% | 99.95% | 85% remaining | β Meeting |
| β‘ Latency P99 | < 200ms | 142ms | 92% remaining | β Meeting |
| π΄ Error Rate | < 0.1% | 0.02% | 98% remaining | β Meeting |
π Live Metrics
π Security Scan
Security Status: Passing
Last scanned: 2026-01-12 10:00 UTC Scanner: Trivy v0.50.0
π₯ RBAC & Permissions
| Resource | Permissions | Scope |
|---|---|---|
| ServiceAccount | game-sa |
Namespace |
| ClusterRole | view |
Cluster-wide (read) |
Pod Security Standards
| Policy | Status |
|---|---|
| Privileged | β Denied |
| Run as Root | β Blocked |
| Host Network | β Blocked |
| Host PID | β Blocked |
π API Documentation
No OpenAPI Spec
Add API documentation via annotation: valina.ai/openapi-url: "https://..."
π Version History
β‘ Latency Heatmap
24-Hour Latency Heatmap
π Active Alerts
π Traffic Flow
π₯ Inbound Traffic
π€ Outbound Traffic
π° Cost Attribution
Resource Breakdown
π Runbooks
Steps to diagnose and mitigate high CPU consumption
Troubleshooting guide for latency spikes
Investigation steps for frequent pod restarts
π On-Call
π Change Timeline
π€ Canary Status
π΄ Error Drill-down
β‘ Quick Actions
Configuration Reference
Labels
| Label | Value |
|---|---|
app |
shallweplay-backend |
tier |
backend |
Environment Variables
| Variable | Value |
|---|---|
AEGIS_URL |
http://aegis-approval.aegis.svc.cluster.local:8750 |
DATABASE_HOST |
game-postgres |
DATABASE_NAME |
valina_game_db |
DATABASE_PORT |
5432 |
DATABASE_USER |
postgres |
LLM_BRIDGE_URL |
http://valina-rust-backend.valina.svc.cluster.local:8080/api⦠|
REDIS_URL |
redis://redis.valina.svc.cluster.local:6379/0 |
RUST_LOG |
info |
Annotations
| Annotation | Value |
|---|---|
valina.ai/architecture |
Node.js backend with Socket.io for real-time communication |
valina.ai/databases |
PostgreSQL |
valina.ai/dependencies |
postgresql,redis |
valina.ai/dependents |
shallweplay-frontend |
valina.ai/features |
Quick Match,Friends System,Game History,Achievements,Social β¦ |
valina.ai/flows |
Quick Match,Friend Invite,Game Start,Score Submission |
valina.ai/openapi-url |
https://shallweplay.valina.ai/api/openapi.json |
valina.ai/owner |
@3xzyle |
valina.ai/purpose |
Social gaming backend for casual multiplayer games and match⦠|
valina.ai/repository |
https://github.com/3xzyle/VALINA-AI |
Related Resources
-
π Service Index
View all documented services
-
π System Status
Live health dashboard
-
π·οΈ Gaming & Entertainment
Other services in this category
Auto-Generated Documentation
This documentation was auto-generated from Kubernetes deployment metadata.
Enhance this doc by adding annotations:
annotations:
valina.ai/description: "Detailed service description"
valina.ai/purpose: "Service purpose statement"
valina.ai/features: "Feature 1, Feature 2, Feature 3"
valina.ai/flows: "Auth Flow, Data Processing Flow"
valina.ai/dependencies: "redis, postgres, auth-service"
valina.ai/api-endpoints: "/api/v1/resource, /health"
valina.ai/economics: "Ties to GRAT treasury via..."
valina.ai/owner: "Platform Team"
valina.ai/repository: "https://github.com/org/repo"
valina.ai/changelog: "v1.2.0 Added feature X, v1.1.0 Initial release"
valina.ai/roadmap: "SSO integration, Multi-region support"
valina.ai/notices: "Requires v2.0 by Q2 2026"
Created: 2026-01-06T17:18:32Z | Generated: 2026-01-14T06:44:10.979418825+00:00