Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 92 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
backend:
name: Backend (NestJS)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: apps/backend/package-lock.json

- name: Install dependencies
run: npm ci
working-directory: apps/backend

- name: Generate Prisma client
run: npx prisma generate
working-directory: apps/backend

- name: TypeScript check
run: npx tsc --noEmit
working-directory: apps/backend

- name: Build
run: npm run build
working-directory: apps/backend

admin:
name: Admin Panel (Vue 3)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: apps/admin/package-lock.json

- name: Install dependencies
run: npm ci
working-directory: apps/admin

- name: Type check
run: npx vue-tsc --noEmit
working-directory: apps/admin

- name: Build
run: npm run build
working-directory: apps/admin

shell:
name: Shell (C# WPF)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Restore
run: dotnet restore
working-directory: apps/shell/GameShell.Shell

- name: Build
run: dotnet build --no-restore
working-directory: apps/shell/GameShell.Shell

agent:
name: Agent (C# Worker)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Restore
run: dotnet restore
working-directory: apps/agent/GameShell.Agent

- name: Build
run: dotnet build --no-restore
working-directory: apps/agent/GameShell.Agent
52 changes: 52 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Dependencies
node_modules/
.pnp
.pnp.js

# Build outputs
dist/
build/
out/
bin/
obj/
*.dll
*.exe
*.pdb

# Environment
.env
.env.local
.env.*.local

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db

# Logs
*.log
logs/

# Test
coverage/

# Prisma
apps/backend/prisma/*.db

# C# / .NET
*.user
*.suo
*.cache
packages/
!packages/shared/
*.nupkg
project.lock.json

# Docker
docker-compose.override.yml
99 changes: 98 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,98 @@
# GameShell
# GameShell

Комплексна система управління комп'ютерним клубом / кібер-ареною.

## Що це?

GameShell — українська платформа для управління ігровими клубами, яка включає:

- **Shell Client** (C# WPF) — клієнтський додаток на ігрових ПК (лаунчер ігор, таймер сесій, блокування)
- **Agent** (C# Worker Service) — фоновий сервіс на ПК (телеметрія, віддалене управління, встановлення ігор)
- **Backend API** (NestJS) — серверна частина (сесії, біллінг, аналітика, управління)
- **Admin Panel** (Vue 3) — веб-панель адміністрування
- **Local Hub** (Node.js) — локальний сервер в клубі (offline-режим, управління PlayStation, IoT)

## Архітектура

```
┌─────────── Хмара (VPS) ──────────────┐
│ Backend API ←→ PostgreSQL + Redis │
│ Admin Panel (SPA) │
└──────────────┬────────────────────────┘
│ WSS / HTTPS
┌──────────────▼────────────────────────┐
│ Локальна мережа клубу │
│ │
│ Local Hub ──→ Shell Client (×35 ПК) │
│ ──→ PS5 (playactor) │
│ ──→ PS2 (Tasmota relay) │
│ ──→ TV (HDMI-CEC) │
└────────────────────────────────────────┘
```

## Стек технологій

| Компонент | Технологія |
|-----------|-----------|
| Shell Client | C# / WPF / .NET 8 |
| Agent | C# / .NET 8 Worker Service |
| Backend API | NestJS + TypeScript + Prisma |
| Admin Panel | Vue 3 + TypeScript + Tailwind CSS |
| Local Hub | Node.js + TypeScript |
| Database | PostgreSQL 16 |
| Cache | Redis 7 |
| PS5 Control | playactor (TypeScript) |
| IoT | Tasmota (ESP8266) + MQTT (Mosquitto) |
| HDMI-CEC | cec-utils + Raspberry Pi |

## Структура проєкту

```
gameshell/
├── apps/
│ ├── backend/ # NestJS API
│ ├── admin/ # Vue 3 Admin Panel
│ ├── shell/ # C# WPF Shell Client
│ ├── agent/ # C# Worker Service Agent
│ └── local-hub/ # Node.js Local Hub
├── packages/
│ └── shared/ # Спільні типи та утиліти
├── docker-compose.yml # PostgreSQL, Redis, Mosquitto
└── .github/workflows/ # CI/CD
```

## Швидкий старт

```bash
# 1. Клонувати
git clone https://github.com/Virt92/gameshell.git
cd gameshell

# 2. Запустити інфраструктуру
docker compose up -d

# 3. Backend
cd apps/backend
npm install
npx prisma migrate dev
npm run start:dev

# 4. Admin Panel
cd apps/admin
npm install
npm run dev
```

## Ролі користувачів

| Роль | Опис |
|------|------|
| **Owner** | Повний доступ, фінанси, налаштування |
| **DevOps** | Обладнання, ігри, моніторинг |
| **Operator** | Сесії, каса, обслуговування |
| **Accountant** | Фінансові звіти, зарплати |
| **Player** | Ігри, магазин, бонуси |

## Ліцензія

Proprietary. Всі права захищені.
24 changes: 24 additions & 0 deletions apps/admin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
5 changes: 5 additions & 0 deletions apps/admin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Vue 3 + TypeScript + Vite

This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.

Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
13 changes: 13 additions & 0 deletions apps/admin/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>admin</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
Loading
Loading