{"id":48519232,"url":"https://github.com/dojoengine/starter","last_synced_at":"2026-04-07T20:30:40.347Z","repository":{"id":342069219,"uuid":"1171867544","full_name":"dojoengine/starter","owner":"dojoengine","description":"Official Dojo starter repo","archived":false,"fork":false,"pushed_at":"2026-03-04T22:17:41.000Z","size":167,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-04T22:45:13.371Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Cairo","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dojoengine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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":"2026-03-03T17:39:05.000Z","updated_at":"2026-03-04T22:17:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dojoengine/starter","commit_stats":null,"previous_names":["dojoengine/starter"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/dojoengine/starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dojoengine%2Fstarter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dojoengine%2Fstarter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dojoengine%2Fstarter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dojoengine%2Fstarter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dojoengine","download_url":"https://codeload.github.com/dojoengine/starter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dojoengine%2Fstarter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31528198,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":[],"created_at":"2026-04-07T20:30:38.726Z","updated_at":"2026-04-07T20:30:40.341Z","avatar_url":"https://github.com/dojoengine.png","language":"Cairo","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dojo Starter\n\nOfficial starter repo for [Dojo](https://book.dojoengine.org) — a provable game engine on Starknet.\n\nClone this repo, run one command, and have a local game running in minutes.\n\n## Prerequisites\n\n- [asdf](https://asdf-vm.com/) or compatible version manager (reads `contracts/.tool-versions`)\n- [Dojo toolchain](https://book.dojoengine.org/getting-started/installation) — `scarb`, `sozo`, `katana`, `torii`\n- [Node.js](https://nodejs.org/) \u003e= 18\n- [pnpm](https://pnpm.io/) \u003e= 9\n- [jq](https://jqlang.github.io/jq/) (used by `dev.sh` to parse manifest JSON)\n\nPinned dependency versions live in [`contracts/.tool-versions`](contracts/.tool-versions).\n\n## Quickstart\n\n```bash\n# Clone the starter repo\ngit clone https://github.com/dojoengine/starter.git\ncd starter\n\n# Start the full local stack (Katana + contracts + Torii + frontend)\n./scripts/dev.sh\n```\n\nOpen https://localhost:5173 in your browser.\nConnect with Cartridge Controller, then use the compass to move and dig for treasure.\n\n## Architecture\n\n```\nstarter/\n├── contracts/          # Cairo/Dojo smart contracts\n│   └── src/\n│       ├── models.cairo          # Player model + Direction enum\n│       ├── systems/actions.cairo # spawn, move, dig logic\n│       └── tests/test_world.cairo\n├── client/             # React + Vite + TypeScript frontend\n│   └── src/\n│       ├── App.tsx               # Game UI (grid, HUD, compass)\n│       ├── dojo/                 # SDK config, contracts, models\n│       ├── starknet.tsx          # Cartridge Controller + starknet-react\n│       └── tiles.ts             # Client-side tile content logic\n└── scripts/\n    ├── dev.sh          # One-command local dev environment\n    └── check.sh        # CI validation (build, test, lint, typecheck)\n```\n\n### Contracts\n\nNamespace: `starter`\n\n**Player** model — stores position, health, gold, level, and a bitmap of dug tiles.\nEach player navigates a 10x10 grid, digging tiles that may contain gold or bombs.\n\nThree actions:\n- `spawn` — initialize a new player at a random-ish starting position\n- `move(direction)` — step in a cardinal direction (costs 1 health)\n- `dig` — reveal the current tile (gold, bomb, or empty)\n\nTile content is determined by a two-layer randomness system:\n1. Poseidon hash over (player, level, x, y) determines if a tile has content (~20%)\n2. Block timestamp entropy at dig time determines gold vs bomb\n\n### Client\n\nReact app using `starknet-react` and `@dojoengine/sdk`.\nReads game state via Torii (gRPC subscriptions) and writes transactions through Cartridge Controller with session keys.\n\n## Commands\n\n| Command | Description |\n|---|---|\n| `./scripts/dev.sh` | Start full local stack |\n| `./scripts/check.sh` | Run all CI checks |\n| `cd contracts \u0026\u0026 sozo build` | Build contracts |\n| `cd contracts \u0026\u0026 scarb test` | Run contract tests |\n| `cd client \u0026\u0026 pnpm dev` | Start frontend dev server (needs running backend) |\n| `cd client \u0026\u0026 pnpm lint` | Lint frontend |\n| `cd client \u0026\u0026 pnpm typecheck` | Typecheck frontend |\n\n## Troubleshooting\n\n**Port already in use**\nKatana (5050), Torii (8080), and Vite (5173) need their default ports free.\nKill any existing processes on those ports before running `dev.sh`.\n\n```bash\nlsof -ti:5050 -ti:8080 -ti:5173 | xargs kill -9\n```\n\n**Torii fails to start**\nTorii depends on a successful contract migration.\nIf Torii exits immediately, check that `sozo migrate` succeeded and that `manifest_dev.json` exists in `contracts/`.\n\n**Controller wallet not connecting**\nThe frontend uses Cartridge Controller which requires HTTPS.\nVite is configured with `mkcert` for local HTTPS — accept the self-signed certificate when prompted.\n\n**Version mismatch errors**\nEnsure your installed tool versions match `contracts/.tool-versions`.\nRun `asdf install` from the `contracts/` directory to sync.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdojoengine%2Fstarter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdojoengine%2Fstarter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdojoengine%2Fstarter/lists"}