Open-source project
typehero/typehero avatar
typehero/typehero

typehero's type system challenges are markdown files synced into MySQL

Connect, collaborate, and grow with a community of TypeScript developers

6,644 stars471 forksTypeScriptAGPL-3.0

At a glance

What is it?
typehero is a community site for learning the corners of TypeScript's type system, built as a pnpm and turbo monorepo. Challenge content is markdown checked by a tsx script and pushed into MySQL, while six outside services are named in the env template.
Who is it for?
typehero is worth a look if you want a place to exercise TypeScript's type system against real examples rather than more reference documentation. It is not a library you add to a project: it is a site with its own monorepo, its own database and its own registration flow, so adopting the idea means running the platform rather than installing a package.
Can I use it commercially?
Yes, with strict conditions. AGPL-3.0 is a network copyleft licence: if people use a modified version over a network, for example as a hosted service, you must offer them its source code under the same licence.
Is it still maintained?
Yes. The repository last received commits 73 days ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • typehero/typehero6,644 ★ · +7
Star history
Repository2026-09-232026-11-15
typehero/typehero6.6k6.6k

7 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The stated problem is that most developers stop short of the type system

The README is short, and its argument is worth reading carefully because it defines what the project is for. The claim is that TypeScript's typing system is powerful when used correctly, but most developers and engineers use little more than they have to in day to day work. Sooner or later a use case arrives that their knowledge cannot handle, and at that point they reach out to a community for help.

The stated ambition is to be both the community and the platform where that help happens, so people can learn more of the intricacies of the type system rather than just resolve the one error in front of them.

That framing has a consequence. This is not a library, a compiler plugin or a lint rule. There is nothing to add to a project, and no API to call. The deliverable is a website, which is why the repository is a monorepo with a database, an authentication flow and a search service rather than a package with a version bump.

Challenge content is markdown, validated by tsx and synced into MySQL

The challenges live in a top level `challenges/` directory as markdown, and they are not hand-loaded into the database. Two root scripts run the same validator, which tells you the content has a machine checkable shape:

json
"check:solutions": "tsx ./challenges/validate.ts",
"lint:markdown:validate": "tsx challenges/validate.ts"

A third script, `lint:markdown`, pipes the same directory through markdownlint-cli2 and then through a spell checker:

bash
cspell challenges/** --no-progress

The `.markdownlint.yaml` and `cspell.json` files at the root exist to serve those checks. So a challenge is a markdown document with a checked structure and a checked vocabulary, and `challenges/validate.ts` decides whether the solutions inside it are acceptable. That is a much higher content floor than a forum post, and it is the part of the project a contributor actually touches.

db:sc is how challenge content reaches the database

The bridge from markdown to the running site is one script, and it is worth naming because it is the only place the two halves of the project meet:

bash
"db:sc": "turbo run db:sync-challenges"

So challenge content is authored as files, validated by `tsx ./challenges/validate.ts`, then synced into MySQL, where the site reads it. The surrounding database scripts follow the same fan-out pattern. `db:seed` runs a reset and a seed, `db:prod:seed` does the same against the production seed, and `refresh` runs both with `--concurrency=1`, which serialises them so a reset cannot overtake a seed.

That design has a trade-off. Content lives in git, which means review works and diffs are readable, but the live site reads a database, so a change to a markdown file changes nothing until the sync runs. The root `package.json` is marked private with version 0.1.0, so there is no published package to bump when the content changes.

The dev script asks turbo for a concurrency of 1000

One line in the root `package.json` is unusual enough to call out on its own:

json
"dev": "turbo run dev --concurrency=1000",
"build": "turbo run build",
"checks": "turbo run format lint typecheck --continue"

The other tasks use ordinary fan-out. The dev task does not. A concurrency of 1000 is far above the number of packages that will ever exist in this repository, so the practical effect is that turbo starts every package's dev task it can, as fast as it can, with no queueing. That is a reasonable choice for a development machine and a strange one for a constrained CI runner, which is presumably why `build` and `checks` do not share the setting.

`checks` also carries `--continue`, so format, lint and typecheck all run and report together instead of stopping at the first failure, and `checks:fix` adds the fixing variants with `--force`.

MySQL on 3306 and a passwordless Redis on 6379

The compose file is small and completely explicit about what a local run needs. MySQL is published on the host with the root password set to a fixed literal:

yaml
db:
  image: mysql
  restart: always
  environment:
    MYSQL_ROOT_PASSWORD: dev
    MYSQL_DATABASE: typehero
  ports:
    - 3306:3306

A named volume, `typehero-data`, keeps the data directory across restarts, and a healthcheck polls `mysqladmin ping` every five seconds with ten retries before giving up. Redis is a second service:

yaml
redis:
  image: 'bitnami/redis:latest'
  container_name: typehero-redis
  environment:
    - ALLOW_EMPTY_PASSWORD=yes
  ports:
    - 6379:6379

This is plainly a local development arrangement. A fixed root password and an empty Redis password are fine on a laptop and wrong anywhere else, so anyone lifting this into a shared environment is rewriting both services rather than configuring them.

The env template names six services you have to supply yourself

`.env.example` is the fastest way to see what the application talks to, and it lists more than the compose file provides. Two values match the local services:

bash
DATABASE_URL="mysql://root:dev@localhost/typehero"
REDIS_URL="redis://localhost:6379"

Then come the parts you cannot run locally without credentials. GitHub sign-in needs `GITHUB_ID` and `GITHUB_SECRET`, and a separate pair of `GITHUB_AOT_ID` and `GITHUB_AOT_SECRET` sits under its own comment. Search is Algolia, through `NEXT_PUBLIC_ALGOLIA_APP_ID` and `NEXT_PUBLIC_ALGOLIA_API_KEY`. File uploads need `UPLOADTHING_SECRET` and `UPLOADTHING_APP_ID`. `EDGE_CONFIG` has no comment explaining it at all.

Two things are already decided for you: `NEXTAUTH_URL="http://localhost:3000"` pins the site to port 3000, and the commented `AUTH_REDIRECT_PROXY_URL` suggests port 3001 is meant for a proxy in front of it. The `NEXT_PUBLIC_` prefix on the Algolia keys also means those two values are compiled into the browser bundle, so they are public keys by construction.

Lint treats challenge prose as a separate corpus

Formatting and linting are split along the same lines as the rest of the repository. The root Prettier command walks the repository but deliberately steps past `apps/`, `packages/` and `tooling/`, so each of those directories formats itself. It excludes the challenge solution tests by name rather than by directory, which says those files are machine shaped rather than hand written. Prettier also keeps its own cache at `node_modules/.cache/prettiercache` instead of relying on editor state.

The other scripts fill in a full contributor workflow:

json
"lint": "eslint . --max-warnings 0",
"test:e2e:install": "playwright install",
"package-check": "pnpm dlx sherif@latest --ignore-rule root-package-dependencies"

A single ESLint warning fails the run. The end to end suite needs browsers fetched once through Playwright. The dependency linter runs through `pnpm dlx` and switches off one specific rule, and a `patches/` directory at the root means some dependencies are patched in place rather than version bumped.

No releases, a moving main branch, and AGPL-3.0

Three facts about the project's shape are easier to see from the metadata than from the README.

There are no GitHub releases. Nothing is tagged for a consumer to pin, so there is no upgrade path to describe and no version history beyond the 0.1.0 in the private root package. The default branch is `main` and the last push was on 2026-09-03, which is recent, but recent pushes are not the same as a shipped artefact.

The licence is AGPL-3.0. That is a deliberate choice for a community site and a real constraint for anyone who wants to run a modified copy as a service, because the copyleft obligation follows the network use rather than the distribution. Whether that matters depends entirely on what you intend to build, and it is a question for your own legal reading rather than for this repository.

The README points contributors at `LOCAL.md` for setup and invites questions on Discord, and the sponsor table names six companies including Vercel and UploadThing, and UploadThing also appears in the env template.

Editorial conclusion

typehero is worth a look if you want a place to exercise TypeScript's type system against real examples rather than more reference documentation. It is not a library you add to a project: it is a site with its own monorepo, its own database and its own registration flow, so adopting the idea means running the platform rather than installing a package. Verify four things before you commit time to it: that the challenge format in challenges/ is something you would enjoy authoring, since that is where contributions are asked for; which of the six services in .env.example are required for a local run and which are optional; that AGPL-3.0 is acceptable for whatever you intend to build on top of it; and that the absence of any GitHub release means you have no versioned artefact to pin, only a moving main branch.

Frequently asked questions

What is typehero used for?

It is a community and platform for learning the intricacies of TypeScript's typing system. The stated motivation is that most developers use only as much of the type system as they have to, and reach for outside help when that runs out.

How do you install typehero?

There is no install step for a user, because typehero is a website rather than a package. To work on it, the README points you at the LOCAL.md file, and the repository root carries a docker-compose.yaml for MySQL and Redis plus an .env.example template.

What technology does typehero use?

The root package is a pnpm and turbo monorepo containing apps/, packages/ and tooling/. Local services are MySQL on port 3306 and Redis on port 6379, and the env template names GitHub authentication, Next Auth, Algolia and UploadThing.

What license does typehero use?

The repository declares AGPL-3.0, and the root package.json is marked private at version 0.1.0. The strong copyleft terms are the part to read carefully if you plan to run a modified copy as a service.

How does typehero validate its challenges?

Two root scripts run the same TypeScript validator, `tsx ./challenges/validate.ts`, once as check:solutions and once as lint:markdown:validate. Challenge markdown is separately linted with markdownlint-cli2 and spell checked with cspell.

Does typehero publish releases?

The repository has no GitHub releases, so there is no published version to install or pin. The root package.json is private and reads version 0.1.0, and the last push to the main branch was on 2026-09-03.

Official sources

  1. Issues
  2. License: AGPL-3.0
  3. Project website
  4. README
  5. typehero/typehero on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/typehero-typehero.svg)](https://hysenlabs.com/projects/typehero-typehero)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/typehero-typehero.svg)](https://hysenlabs.com/projects/typehero-typehero)

Was this useful?