{"id":35600402,"url":"https://github.com/diangogav/edopro-server-ts","last_synced_at":"2026-04-03T15:04:33.344Z","repository":{"id":154485066,"uuid":"627230146","full_name":"diangogav/EDOpro-server-ts","owner":"diangogav","description":"Welcome to Evolution Server, a versatile platform for creating Yu-Gi-Oh! matches, fully compatible with EDOPro, Koishi, and YGO Mobile! But this time, we focus on the scalability of the code, allowing for easy implementation of new features related to the data generated during the duels.","archived":false,"fork":false,"pushed_at":"2026-04-01T23:56:14.000Z","size":29218,"stargazers_count":21,"open_issues_count":2,"forks_count":11,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-04-02T11:41:43.537Z","etag":null,"topics":["cpp","hacktoberfest","nodejs","typescript","ygopro"],"latest_commit_sha":null,"homepage":"https://evolutionygo.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/diangogav.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2023-04-13T03:31:01.000Z","updated_at":"2026-03-30T10:43:03.000Z","dependencies_parsed_at":"2026-01-04T06:11:14.683Z","dependency_job_id":null,"html_url":"https://github.com/diangogav/EDOpro-server-ts","commit_stats":null,"previous_names":["diangogav/edopro-server-ts","diangogav/edo-pro-server-ts"],"tags_count":35,"template":false,"template_full_name":null,"purl":"pkg:github/diangogav/EDOpro-server-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diangogav%2FEDOpro-server-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diangogav%2FEDOpro-server-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diangogav%2FEDOpro-server-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diangogav%2FEDOpro-server-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diangogav","download_url":"https://codeload.github.com/diangogav/EDOpro-server-ts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diangogav%2FEDOpro-server-ts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31359104,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T14:24:47.623Z","status":"ssl_error","status_checked_at":"2026-04-03T14:24:32.380Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","hacktoberfest","nodejs","typescript","ygopro"],"created_at":"2026-01-05T01:12:15.818Z","updated_at":"2026-04-03T15:04:33.272Z","avatar_url":"https://github.com/diangogav.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e🎮 Evolution Server\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eA Yu-Gi-Oh! game server built with TypeScript\u003c/strong\u003e\u003cbr\u003e\n  \u003cem\u003eHost duels for EDOPro, Koishi, and YGO Mobile — all from one server.\u003c/em\u003e\n\u003c/p\u003e\n\n[![PR Pipeline](https://github.com/diangogav/EDOpro-server-ts/actions/workflows/pipeline.yaml/badge.svg)](https://github.com/diangogav/EDOpro-server-ts/actions/workflows/pipeline.yaml)\n\nEvolution Server runs two independent game engines side by side, so you can support both ecosystems from a single server — or pick just one.\n\n| Engine | Clients | Protocol | Port |\n|--------|---------|----------|------|\n| 🖥️ **EDOPro** | EDOPro desktop client | EDOPro protocol | `7911` |\n| 📱 **YGOPro** | Koishi, YGO Mobile, YGOPro | YGOPro-compatible (srvpro2) | `7711` |\n\n---\n\n## ✨ What can it do?\n\n- 🏰 **Room creation** through the EDOPro lobby or YGOPro-compatible clients\n- 🔀 **Cross-client duels** between different platforms *(experimental)*\n- 🔌 **Automatic reconnection** after disconnection or crash\n- 📊 **Match data collection** for rankings and analytics\n- 🧪 **Isolated duel cores** — each match runs in its own process\n\n---\n\n## 🚀 Quick Start (Docker)\n\nThe fastest way to get running. Three commands and you're dueling:\n\n```bash\ngit clone https://github.com/diangogav/EDOpro-server-ts\ncd EDOpro-server-ts\ndocker compose -f docker-compose.prod.yaml up -d\n```\n\nThat's it! 🎉 Both engines start automatically with PostgreSQL and Valkey included.\n\n\u003e 💡 Connect with EDOPro on port `7911` or with Koishi/YGO Mobile on port `7711`.\n\n---\n\n## 🛠️ Manual Installation\n\nFor when you want full control, or Docker isn't an option.\n\n### 📋 Prerequisites\n\n- [Node.js](https://nodejs.org) \u003e= 24\n- [CMake](https://cmake.org/download/) \u003e= 3.18\n- A C++ compiler (g++ or clang++)\n\nOn Ubuntu/Debian, the provided script installs everything you need:\n\n```bash\nsudo bash install_dependencies.sh\n```\n\n### 📦 Step by step\n\n```bash\n# 1️⃣ Clone the project\ngit clone https://github.com/diangogav/EDOpro-server-ts\ncd EDOpro-server-ts\n\n# 2️⃣ Clone card scripts, databases, and banlists\nbash clone_repositories.sh\n\n# 3️⃣ Organize everything into resources/\nbash setup_resources.sh\n\n# 4️⃣ Build the C++ duel core (used by the EDOPro engine)\nbash build_core_integrator.sh\n\n# 5️⃣ Install Node.js dependencies\nnpm install\n\n# 6️⃣ Configure environment\ncp .env.example .env\n```\n\nNow choose which engine(s) you want to run 👇\n\n---\n\n### 🖥️ Running the EDOPro engine only\n\nPlayers connect using the EDOPro desktop client.\n\n**What you need:**\n- ✅ The CoreIntegrator binary (built in step 4)\n- ✅ Card databases and scripts from ProjectIgnis\n- ✅ Banlists from ProjectIgnis and/or Evolution\n\n**Minimum `.env` configuration:**\n\n```env\nHOST_PORT=7911\nHTTP_PORT=7922\nWEBSOCKET_PORT=4000\n```\n\n**Resource structure used:**\n\n```\n📂 resources/edopro/\n├── 📜 scripts/            # ProjectIgnis/CardScripts\n├── 🗄️ databases/          # ProjectIgnis/BabelCDB\n├── 📋 banlists-ignis/     # ProjectIgnis/LFLists\n└── 📋 banlists-evolution/ # Evolution community banlists\n```\n\n```bash\nnpm run dev\n```\n\n\u003e 🎯 Connect with EDOPro to `your-server-ip:7911`\n\n---\n\n### 📱 Running the YGOPro engine only\n\nThe YGOPro engine uses srvpro2-compatible protocol. Players connect using Koishi, YGO Mobile, or any YGOPro-compatible client.\n\n**What you need:**\n- ✅ Card scripts and databases from ygopro-scripts\n- ✅ Ban lists and alternative format resources\n- ✅ The `YGOPRO_FOLDERS` environment variable pointing to your resource directories\n- ✅ (Optional) The `YGOPRO_EXTRA_DB_FOLDERS` environment variable for pre-release and art card databases\n\n**Minimum `.env` configuration:**\n\n```env\nYGOPRO_PORT=7711\nHTTP_PORT=7922\nWEBSOCKET_PORT=4000\nYGOPRO_FOLDERS=./resources/ygopro/base\n```\n\n**Resource structure used:**\n\n```\n📂 resources/ygopro/\n├── 📜 base/               # Core scripts + lflist + cards.cdb (loaded by all modes)\n├── 🌏 ocg/                # OCG-specific banlist\n├── 🃏 alternatives/       # Format variants (Edison, GOAT, HAT, etc.)\n├── 🆕 prereleases-cdb/    # Pre-release card databases (extra DB)\n└── 🎨 cards-art/          # Custom card art databases (extra DB)\n```\n\n**Standard card pool** (`YGOPRO_FOLDERS`) is loaded for all rooms. **Extra databases** (`YGOPRO_EXTRA_DB_FOLDERS`) are only available in rooms that use PRE or ART formats — standard rooms cannot use those cards.\n\nTo enable all formats and pre-releases, set:\n\n```env\nYGOPRO_FOLDERS=./resources/ygopro/base,./resources/ygopro/ocg,./resources/ygopro/alternatives\nYGOPRO_EXTRA_DB_FOLDERS=./resources/ygopro/prereleases-cdb,./resources/ygopro/cards-art\n```\n\n```bash\nnpm run dev\n```\n\n\u003e 🎯 Connect with Koishi or YGO Mobile to `your-server-ip:7711`\n\n---\n\n### 🔥 Running both engines\n\nJust set both ports in your `.env`:\n\n```env\nHOST_PORT=7911\nYGOPRO_PORT=7711\nHTTP_PORT=7922\nWEBSOCKET_PORT=4000\nYGOPRO_FOLDERS=./resources/ygopro/base,./resources/ygopro/ocg,./resources/ygopro/alternatives\nYGOPRO_EXTRA_DB_FOLDERS=./resources/ygopro/prereleases-cdb,./resources/ygopro/cards-art\n```\n\n```bash\nnpm run dev\n```\n\nBoth engines run in the same process, sharing the HTTP API and WebSocket server. 💪\n\n---\n\n## 🗂️ Card Database Architecture\n\nThe YGOPro engine maintains **two separate card pools** in memory:\n\n| Pool | Loaded from | Available to |\n|------|-------------|--------------|\n| **Standard** | `YGOPRO_FOLDERS` | All rooms |\n| **Extended** | `YGOPRO_FOLDERS` + `YGOPRO_EXTRA_DB_FOLDERS` | PRE/ART rooms only |\n\nWhen a player creates a room with a format like `PRE`, `TCGPRE`, `OCGPRE`, `TCGART`, or `OCGART`, the server uses the **extended** card pool for both deck validation and the duel engine. Standard rooms (`M`, `TCG`, `OT`, `GOAT`, etc.) use only the **standard** pool — any card not in that pool is rejected as unknown.\n\nBoth pools are loaded at startup and refreshed every 10 minutes if the underlying `.cdb` files change.\n\n---\n\n## ⚙️ Environment Variables\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `HOST_PORT` | EDOPro server port | `7911` |\n| `YGOPRO_PORT` | YGOPro server port | `7711` |\n| `HTTP_PORT` | HTTP API port | `7922` |\n| `WEBSOCKET_PORT` | WebSocket port | `4000` |\n| `YGOPRO_FOLDERS` | Comma-separated resource directories (standard card pool) | *(empty)* |\n| `YGOPRO_EXTRA_DB_FOLDERS` | Comma-separated extra DB directories (pre-releases, art cards) — only loaded for PRE/ART room formats | *(empty)* |\n| `RANK_ENABLED` | Enable ranking system (requires PostgreSQL) | `false` |\n| `POSTGRES_HOST` | PostgreSQL host | `localhost` |\n| `POSTGRES_PORT` | PostgreSQL port | `5432` |\n| `POSTGRES_DB` | PostgreSQL database name | `evolution` |\n| `POSTGRES_USER` | PostgreSQL username | `evolution` |\n| `POSTGRES_PASSWORD` | PostgreSQL password | *(required if ranking enabled)* |\n| `USE_REDIS` | Enable Redis/Valkey for session management | `false` |\n| `REDIS_URI` | Redis/Valkey connection URI | *(required if redis enabled)* |\n\n---\n\n## 🏗️ Project Architecture\n\n```\nsrc/\n├── 🖥️ edopro/             # EDOPro engine (EDOPro protocol)\n├── 📱 ygopro/             # YGOPro engine (srvpro2-compatible)\n├── 🤝 shared/             # Shared domain logic (rooms, decks, cards, clients)\n├── 🔌 socket-server/      # TCP socket servers for both engines\n├── 🌐 http-server/        # REST API\n└── 📡 web-socket-server/  # WebSocket server for real-time updates\n```\n\nBoth engines share the same room management, player handling, and match lifecycle — but use different protocols, card databases, and deck validation rules.\n\n---\n\n## 🙏 Acknowledgments\n\n- [Multirole](https://github.com/DyXel/Multirole) by @Dyxel — the reference for the EDOPro engine\n- [srvpro2](https://github.com/purerosefallen/srvpro) — the reference for the YGOPro engine\n- The [Project Ignis](https://github.com/ProjectIgnis), [MyCard](https://mycard.moe/), and [Evolution](https://github.com/evolutionygo) communities\n\n---\n\n\u003cp align=\"center\"\u003e\n  Made with ❤️ by the Evolution community\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiangogav%2Fedopro-server-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiangogav%2Fedopro-server-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiangogav%2Fedopro-server-ts/lists"}