Game based on "Card Assassin", hosted on Cloudflare Workers/D1/KV.
The entire stack is built/deployed using NX, sequencing builds as necessary. Intermediate build artifacts are stored in NX Cloud.
Frontend for game, built with React/react-router/MUI. Available at {BASE_URL}/.
Backend for game, built with Hono/Kysely. Available at {BASE_URL}/api/.
OpenAPI YAML file for the backend, providing specifications for the API functionality. Available at {BASE_URL}/api/openapi/openapi.swagger
Axios-based Typescript client autogenerated from assassin-server-spec and used in the Frontend to provide API communication.
HTML documentation autogenerated from assassin-server-spec. Available at {BASE_URL}/api/openapi/
You will need a FontAwesome Pro NPM key, with instructions to set up available here. You will not be able to install packages until an API key is set up.
You can build all components using npm run build in the main directory. This is equivalent to nx run-many -t build which runs the build job in all projects:
assassin-server-docsassassin-server-clientassassin-serverassassin-app
You can run all tests with npm run test in the main directory. This is equivalent to nx run-many -t test which runs the test job in all available projects:
assassin-serverassassin-app
You can run npm run lint to run ESLint, npm run format to run Prettier, or npm run fix to run both. This is equivalent to nx run-many -t lint/format/fix which runs the job in all available projects:
assassin-serverassassin-app
You can run local development servers using npm run serve. This will run multiple servers simultaneously:
- Frontend at http://localhost:4200
- Backend at http://localhost:8787/api
- Note: A copy of the frontend will be available at http://localhost:8787 but will not auto-update on changes.
Configure your Cloudflare settings in assassin-server/wrangler.toml and run npm run deploy to deploy the instance to the dev environment defined in the file.
This runs:
assassin-server:push-kv:devto push deployment information to Cloudflare KVbuildandprepare-deployinassassin-server-docs,assassin-server-spec, andassassin-appto build and copydistfiles to the server directoryassassin-server:deploy:devto deploy frontend, backend, and OpenAPI files to thedevenvironment
Local-based development, using npm run serve / wrangler dev.
| Name | URL |
|---|---|
| Frontend | http://localhost:4200/ |
| API | http://localhost:8787/api/ |
| OpenAPI Schema | http://localhost:8787/api/openapi/openapi.swagger |
| OpenAPI Docs | http://localhost:8787/api/openapi/ |
Deployments initiated using local npm run deploy command.
| Name | URL |
|---|---|
| Frontend | https://dev.assassin.vlad.gg/ |
| API | https://dev.assassin.vlad.gg/api/ |
| OpenAPI Schema | https://dev.assassin.vlad.gg/api/openapi/openapi.swagger |
| OpenAPI Docs | https://dev.assassin.vlad.gg/api/openapi/ |
Deployments initiated by Github Actions when a PR is created against the main branch.
| Name | URL |
|---|---|
| Frontend | https://staging.assassin.vlad.gg/ |
| API | https://staging.assassin.vlad.gg/api/ |
| OpenAPI Schema | https://staging.assassin.vlad.gg/api/openapi/openapi.swagger |
| OpenAPI Docs | https://staging.assassin.vlad.gg/api/openapi/ |
Deployments initiated by Github Actions on pushes to main branch.
| Name | URL |
|---|---|
| Frontend | https://assassin.vlad.gg/ |
| API | https://assassin.vlad.gg/api/ |
| OpenAPI Schema | https://assassin.vlad.gg/api/openapi/openapi.swagger |
| OpenAPI Docs | https://assassin.vlad.gg/api/openapi/ |