Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .commandcode/taste/taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Taste
See [taste/taste.md](taste/taste.md)
14 changes: 14 additions & 0 deletions .commandcode/taste/taste/taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Taste
- Prefers frequent atomic git commits, one after every checkpoint/milestone in the workflow, rather than batching changes into fewer, larger commits. Confidence: 0.9
- Prefers frontend-only, no-server variants of an app: when asked for a "lite" version, keep all visual/UI features intact but strip backend, database records, checks, and scorings (client-side only). Confidence: 0.9
- Prefers eliminating backend/network dependencies from the app in favor of fully client-side execution (e.g., swapping a remote runner API for an in-browser WASM runner from the same author's repo) so compile/test works completely offline with zero network calls. Confidence: 0.7
- Prefers static/embedded data over runtime fetching of source files: exercise/content data should be generated into JSON at build time (codegen script from source of truth) so the app has zero runtime backend dependency. Confidence: 0.7
- Prefers splitting generated data into a lightweight index plus per-item files loaded on demand (dynamic import) so the initial page load stays small, mirroring lazy per-item fetch behavior of the original app. Confidence: 0.6
- Prefers persisting user progress in localStorage (per-user keys) when no backend exists, including merging local progress on login identity changes. Confidence: 0.6
- When adding a stripped-down sibling app, prefers reusing the existing stack/tooling (same bundler, same framework versions) for parity rather than introducing new tooling. Confidence: 0.5
- Prefers frontend apps to be deployable to GitHub Pages via the `gh-pages` package: sets a `homepage` base URL matching the served site URL, adds `predeploy`/`deploy` scripts that publish the build to the root of the `gh-pages` branch on `origin` (e.g., `gh-pages -d build --remote origin` → https://shramee.github.io/starklings), and a `.nojekyll` marker so JS chunks deploy without Jekyll interference. Confidence: 0.8
- When deploying under a gh-pages subpath, all runtime asset references (logo, wallet icons, modal images) must be `process.env.PUBLIC_URL`-prefixed or relative so they resolve correctly under the subpath — a broken logo/assets in the deployed app is treated as a bug to fix. Confidence: 0.7
- Wants a PR summary generated for the branch's work, grounded in actual git state (branch name, commit log vs base branch, `git diff --stat`/`--name-status`) rather than written from memory — the summary should cover what changed, files touched, verification, and how to run/deploy. Confidence: 0.4
- Prefers keeping third-party code as an npm dependency rather than vendoring it into the repo — questioned "why didn't you use the npm package?" when a dependency was vendored, even when the published package couldn't be bundled by the toolchain; prefers build-tooling workarounds (e.g., patch-package) that keep the npm dep and keep large artifacts out of the repo; when a new version of the rejected package is released, asks to retry the npm-package route (e.g., "try again with new version 0.2.0") rather than accepting the vendored fallback. Confidence: 0.9
- Wants tests whenever a dependency or integration is swapped/changed — after migrating from vendored code to an npm dependency (e.g., a WASM runner), asks for tests to verify the new integration works properly, and expects the tests to match the dependency's own test patterns/API. Confidence: 0.5
- When learning about a third-party dependency, prefers consulting the official published docs (e.g., the package's npm page/README) over digging into the package's source code on GitHub or the npm registry — e.g., "just read the docs on cairo-runner npm page". Confidence: 0.6
2 changes: 1 addition & 1 deletion README.APP.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A web-based interactive tutorial to learn Cairo and Starknet.

## About

The Starklings App is an interactive web platform designed to assist users in embarking on their journey to learn Cairo. This platform is built upon [Starklings](https://github.com/shramee/starklings-cairo1) exercises, which are considered essential for beginners seeking to grasp the fundamentals of Cairo.
The Starklings App is an interactive web platform designed to assist users in embarking on their journey to learn Cairo. This platform is built upon [Starklings](https://github.com/shramee/starklings) exercises, which are considered essential for beginners seeking to grasp the fundamentals of Cairo.

Our objective is to simplify the Starklings experience by eliminating complex configurations and installations. Simply access the app through your browser and begin coding.

Expand Down
4 changes: 2 additions & 2 deletions README.CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ curl https://sh.rustup.rs -sSf | sh -s

1. Clone the repo and go in the directory,
```
git clone https://github.com/shramee/starklings-cairo1.git && cd starklings-cairo1
git clone https://github.com/shramee/starklings.git && cd starklings
```
2. Run starklings (this might take a while the first time),
```sh
Expand Down Expand Up @@ -66,7 +66,7 @@ exercise_name`.
4. When you have solved the exercise successfully, Remove `// I AM NOT DONE`
comment to move on to the next exercise.
5. If an exercise doesn't make sense to you, please open an issue on GitHub!
(https://github.com/shramee/starklings-cairo1/issues/new).
(https://github.com/shramee/starklings/issues/new).

Got all that? Great! To get started, run `starklings watch` in order to get the
first exercise. Make sure to have your editor open!
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<a href="https://app.onlydust.com/p/starklings-cairo1">
<a href="https://app.onlydust.com/p/starklings">
<img src="https://img.shields.io/badge/OnlyDust-Starklings-grey?labelColor=000&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAATCAYAAACQjC21AAAAAXNSR0IArs4c6QAABNNJREFUOE9tlGtQ1FUchp/z/+8usLCArOAuICyggwpI4mVEQzNJVMQZb6WpqTikXSxDDC2bMUv9YAw2loWUOo06lo02XsoUL2NqogmmgmCgcleQ24Jclt09zeLo2OV8O7/3Pc+cOXPeV/A/S57B96Zm/Gu7m1MLsqYvOv+sZVNeXvwrg/rGhgcF7hEioP3fx8WzA7keDRGk1hst2cOiDl+rDR061qWf8S/y8lOMMvaB6ZFrv25SbWHGHhHm4+++Anz3CiGcTzhPgTJluJ6Yqzk9g3ULdmw+S3P38Bkflbv9JFv29nFszjyIqkg185fZwieqKZKSlcuSPLLfO2YEteNLaF0lxMBuF7QXKJGKLe7Vb3RT9y+5rsaT+vE+3BEJUTkN+VWJynf1FbY5slFHDH77FxeFLg7OPrvYy6Ms1//sBNTIfkB9NoSvEkLIXmABDfMiLNn7vBdtpuC3XBpPzyPY/c5XQ7pi3nTpppyu5G67Q2l+y/NI7wU+VU+idSQ6x29EjMxAKJXguJ8iNAlHxRykOg9b9XjjLpPfrDU0HNuEX+xO1OjCDtJGmMXAfOs/3lleNvHwSCXSqXV2GVCCl4NoAsftMtRLkWIy1hlz0B+covsZU8o6RNx18AfiIiAmy4Fu2twDB9RDHICJi1ihH0KW1mxXhEbB3gw6/xbACvZb0JyXLOKo+3Yp/VInKwUExXyO27pDMCwJwtfj7Img9bQHTefbnT11IOu9FH00SDt4J4BikPhOuA90QtdlKNuYI/y4dW06lthkVAa53WHQiZ1oEtKQzhAaT9nZOt+J46FGvkQX/d1rxSO/MKS7B442CFjaTkjGdugogQcXofKvQqFyuXYIZnMiZp5DYei0FgZse8SWWUY6CnUESBU/sI+iCV+KNXrtbdQBNZR3LCNidhq+0XmgOKG1B+ocdSKAgmob2qARBBGHgXDgLhIvNBgRBABeUDqAkr7eosjoYb6BR0Q+R5piMUUWMzr6KLi+dZtA1vSvEXOpunic+ngVHRb0rCKUOrrpRkcgGgyPgdvDKA/2Ua5N97TkU9vnASsLs/CWbqwJPoFJew8P0UhPc9gl8SOOrCo6069hxRcNw/DlJlaq6CKZIDwBPcwcQFmYQSnKMljOs7D6dbAF0wctI9FgwYkndhRElsi1yBf07ZwxNEm6nU7qsFGMlbt0MJUg/NEhwS+GunCj8ucfdabbpNfOJwQDRrQYhBONVNACboiE3qS8uLbn6pLdmrj6+61c0FVgUjWypsNLGHAjmX72eQitK57V4rT9Q62XKLeFk2TqlC9HHBbnSsZxpXEwlXTk/4rP6F7gpPSeMbMOq+dC73SrCW8PRDepoXVmSnGph9SNSiG4cyFC7/JViIvdY6WnLlg1n9+3tu9QNcjmveV9JxVtDkcnzufz8Ln0tG1yQ+Q7/SvZ6rDkiylZY2joDMzMXHA5PQqz+2qE7+PM322Pp6X+xvfRuzyrlQ2fbWuh4J6QNmzpv2Pa+rRtnmT1OPLdNpxbvMblapNWv1G1IcU64j5c+BrDQJcnjYqqXBqirVfiij/5oCbw2EnZY4PMMkKy/9OHTwY/ICPbsJ0KmfKFOTFtbeySmaVluwnrcukW7rqXtPsnZCwvPb5jj1Ltjm6ilaiyZ8vjb2wS2X7S7itMAAAAAElFTkSuQmCC" />
</a>

Expand Down
Empty file added app-lite/.env-example
Empty file.
27 changes: 27 additions & 0 deletions app-lite/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

#cypress
/cypress/screenshots
36 changes: 36 additions & 0 deletions app-lite/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Starklings App Lite

A frontend-only version of the Starklings web app for learning Cairo and Starknet — **no backend required**.

## What's different from the full app

- **No server, no database.** Everything runs in the browser.
- **Exercise data is embedded.** The 55 exercises (code, descriptions, hints, anti-cheat rules) are generated into `src/data/` at build time from the repo's `info.toml`, the `.cairo` sources, and `app/api/anti-cheat.json`. The initial page load only fetches the lightweight `exercises.json` index; each exercise's full content is loaded on demand as a separate chunk.
- **Progress is stored in localStorage only.** Completed exercises, saved code, current exercise, and GitHub/wallet identity all live in the browser.
- **Compile/test runs fully in-browser** via the bundled Cairo WASM runner (`cairo-runner` npm package) — no backend, works offline.
- GitHub login, the wallet drawer, and all pages (Home, Workspace, FinalScreen, Check, Evaluate) keep their UI; the backend-dependent parts (graduates list, student evaluation) show an explanatory note since there is no database.

## Getting started

```bash
cd app-lite
npm install
npm run start # http://localhost:4000
```

The `start` script regenerates the exercise data before launching.

## Scripts

| Script | Description |
|---|---|
| `npm run generate` | Regenerate `src/data/exercises.json` + `src/data/exercises/*.json` from the repo sources |
| `npm run start` | Run the dev server on port 4000 |
| `npm run build` | Production build |
| `npm test` | Run the jest unit tests (`react-scripts test`) |
| `npm run test:wasm` | Run the cairo-runner wasm integration tests with Node's test runner |
| `npm run deploy` | Build and publish to the `gh-pages` branch of `origin` (shramee/starklings) → https://shramee.github.io/starklings |

## Configuration

No configuration required — exercises are compiled and tested entirely in the browser by the `cairo-runner` WASM npm package.
Loading
Loading