edge-yacht
edge-yacht copied to clipboard
A multiplayer game for Cloudflare Summer Challenge
edge-yacht
Multiplayer Yacht game on Cloudflare Workers.
Features
- Monorepo
- TypeScript
- CI/CD with GitHub Actions
- Authentication
- WebSockets and Durable Objects
- Store user data in Cloudflare Workers KV
- Static site with Gatsby
- Deployed on Cloudflare Pages and Cloudflare Workers
- 3D objects with react-three-fiber
- Pre-baked physics simulation powered by Unreal Engine 4
Local development
- Clone the repository:
$ git clone https://github.com/SeokminHong/edge-yacht.git
- (Optional) Setup a regular Auth0 application.
- Copy environment template file and setup variables:
$ cp packages/api/.env.template packages/api/.env.dev
- Install dependencies
$ yarn install
- Start development server and open browser and go to
http://localhost:8787
$ yarn develop
Project Structure
This project uses Yarn workspaces to organize APIs, frontends, and shared interfaces.
packages/api
A worker API that runs on Cloudflare Workers. It handles authentication, authorization, making sessions for game, and storing user data. It can run on a local development server powered by miniflare.
packages/shared
A common type and logics for API and frontend. It contains shared types and interfaces.
packages/www
A frontend that runs on Cloudflare Pages. It is build with Gatsby.
License
MIT