AOWeb 是一个多人网络游戏项目,包含 PostgreSQL 数据库、REST API、WebSocket 游戏服务器和 Next.js 前端,全部配置为本地开发环境。

Stars

60

7 天增长

暂无数据

Fork 数

27

开放 Issue

0

开源协议

暂无数据

最近更新

2026-07-29

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

该项目提供了完整的容器化本地设置,用于实时多人游戏,采用现代工具(Node 22、pnpm、Docker、WebSocket、Next.js),并附有清晰的步骤说明和截图。

适合谁使用

  • 构建或学习实时多人游戏架构的开发者
  • 希望自行托管网络游戏的爱好者
  • 对 Next.js 和 WebSocket 集成感兴趣的全栈开发者
  • 研究现代网络游戏后端的学生

典型使用场景

  • 搭建多人网络游戏的本地开发环境
  • 探索如何将 REST API 与 WebSocket 游戏服务器结合
  • 学习使用容器化数据库恢复游戏状态
  • 原型化具有实时交互的浏览器游戏

项目优势

  • 使用 Node.js 22 和 pnpm 进行现代化包管理
  • 基于 Docker 的 PostgreSQL 设置简化了数据库配置
  • API、WebSocket 服务器和前端分离,支持模块化开发
  • 清晰的环境变量示例和启动流程

使用前须知

  • 文档仅有西班牙语版本,限制了可访问性
  • 缺少生产部署指南或云托管说明
  • 未描述游戏机制和目标,仅记录了搭建步骤

README 快速开始

AOWeb

Proyecto creado por Damián Catanzaro.

X: @DamianCatanzaro

Requisitos

  • Node.js 22 o superior
  • pnpm
  • Docker, recomendado para PostgreSQL
  • psql, opcional si preferis restaurar el dump desde el host

1. Levantar La Base De Datos

El dump inicial del juego esta en database/aoweb.sql.

Desde la carpeta padre del proyecto:

docker run --name aoweb-postgres \
  -e POSTGRES_DB=aoweb \
  -e POSTGRES_USER=postgres \
  -e POSTGRES_PASSWORD=postgres \
  -p 127.0.0.1:5432:5432 \
  -d postgres:18-alpine

Restaurar la base:

docker exec -i aoweb-postgres psql -U postgres -d aoweb < database/aoweb.sql

La URL local para la API queda:

DATABASE_URL=postgresql://postgres:postgres@localhost:5432/aoweb

2. Levantar La API

Crear api/.env tomando como base api/.env.example:

PORT=3001
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/aoweb
TOKEN_AUTH=changeme
CORS_ORIGIN=http://localhost:3000

Instalar dependencias y levantar en desarrollo:

cd api
pnpm install
pnpm dev

La API queda en http://localhost:3001.

3. Levantar El Server Del Juego

En otra terminal, crear server/.env tomando como base server/.env.example:

NODE_ENV=development
AOWEB_TEST_MODE=false
INITIAL_ONLINE_RECORD=0
PORT=7666
API_BASE_URL=http://127.0.0.1:3001
RESET_CONNECTED_CHARACTERS_ON_STARTUP=false
TOKEN_AUTH=changeme

Instalar dependencias y levantar:

cd server
pnpm install
pnpm dev

El server WebSocket queda en ws://localhost:7666.

4. Levantar El Frontend

En otra terminal, crear frontend/.env.local tomando como base frontend/.env.example:

NEXT_PUBLIC_API_BASE_URL=http://localhost:3001
API_BASE_URL=http://localhost:3001
TOKEN_AUTH=changeme
NEXT_PUBLIC_WS_URL=ws://localhost:7666

Instalar dependencias y levantar:

cd frontend
pnpm install
pnpm dev

Abrir http://localhost:3000.

Capturas

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

TanStack
精选
TanStack GitHub avatar

router

TanStack Router is a type-safe, data-driven React router with built-in caching, prefetching, and nested layouts, while TanStack Start extends it into a full-stack SSR framework.

Web 开发前端框架
14,861
vercel-labs
精选
vercel-labs GitHub avatar

scriptc

scriptc compiles ordinary TypeScript into small, fast native executables without needing Node.js, V8, or any JavaScript runtime in the binary.

开发者工具代码质量与构建
1,985
Jakubantalik
精选
Jakubantalik GitHub avatar

thinking-orbs

A React component library that renders six hand-tuned animated thought orb loading indicators on a plain 2D canvas, with two purpose-tuned sizes and automatic theme detection for AI and agent UIs.

AI 与机器学习AI 智能体
1,191