Open-source project
typehero/typehero avatar
typehero/typehero

typehero: A Community Platform for Learning TypeScript's Type System Through Challenges

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

6,640 stars472 forksTypeScriptAGPL-3.0

At a glance

What is it?
typehero is a self-hostable web platform that teaches TypeScript's type system through hands-on coding challenges, targeting developers who already know JavaScript but want to go deeper into generics, conditional types, and mapped types.
Who is it for?
Developers who want structured practice with TypeScript's type system, beyond what day-to-day application code provides, will find typehero's challenge format useful. Teams evaluating self-hosting should read LOCAL.md carefully before starting, since the setup requires Docker, MySQL, Redis, and GitHub OAuth credentials.
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 28 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 October 1, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The gap typehero fills in TypeScript education

Most TypeScript tutorials stop at interface definitions, basic generics, and utility types like Partial or Readonly. The type system goes considerably further: template literal types, infer in conditional types, recursive mapped types. These features are rarely needed in simple applications, but they become essential when building type-safe libraries or working with complex data transformations.

The README describes the problem directly: most developers or engineers do not use much more than they have to in their day to day. When a use case finally demands deeper type knowledge, there is nowhere obvious to go to build it systematically. typehero aims to be both the community and the platform for that learning.

The repository hosts the source code for typehero.dev. It is a full-stack TypeScript application with its own challenge repository under the challenges/ directory.

How the challenge system is organized

Challenges live in the challenges/ directory at the repository root. Each challenge contains a TypeScript problem definition and a tests.ts file that the platform runs in the browser using Monaco editor. The package.json includes a lint:markdown:validate script that runs challenge validation:

bash
pnpm run lint:markdown:validate

This runs tsx challenges/validate.ts against the challenge files to check for structural errors. The test runner checks that type-level solutions pass without modifying the test file, which means you solve the challenge by writing type definitions, not runtime code. The distinction is important: you are writing in the type layer, not the value layer.

A separate Advent of TypeScript event, mentioned in the related search terms, runs as a seasonal challenge set within the same platform.

Running typehero locally with Docker

The README points to LOCAL.md for setup instructions. The repository includes a docker-compose.yaml that starts the required dependencies: a MySQL database and a Redis instance.

bash
docker compose up

The docker-compose file shows that MySQL runs on port 3306 with the root password dev and database name typehero. Redis runs on port 6379. Once the services are running, the application connects using the DATABASE_URL and REDIS_URL environment variables, which you configure in a .env file copied from .env.example:

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

The application also requires GitHub OAuth credentials (GITHUB_ID and GITHUB_SECRET) since authentication uses GitHub as the identity provider. NEXTAUTH_URL should be set to http://localhost:3000 for local development.

The monorepo layout and development toolchain

The repository uses pnpm workspaces and Turborepo to manage the monorepo. The top-level package.json scripts use turbo run to execute tasks across apps/ and packages/. Starting the development environment runs:

bash
pnpm run dev

This calls turbo run dev with a high concurrency limit. The packages/ directory contains shared code, while apps/ holds the deployable applications. The tooling/ directory contains shared ESLint and TypeScript configurations. Algolia is used for search functionality; the NEXT_PUBLIC_ALGOLIA_APP_ID and NEXT_PUBLIC_ALGOLIA_API_KEY environment variables are optional but required for search to work.

Developers seeding the database use the db:seed script, and resetting it with db:reset, both of which run through turbo. The .env.example file lists every variable the application reads, making it the first file to check when troubleshooting a missing configuration value.

Exercism as an alternative and what typehero does differently

Exercism is the most direct comparison to typehero for language learning through challenges. Exercism supports many languages through a command-line workflow where you download exercises, solve them locally, and submit via the CLI. Its TypeScript track covers runtime JavaScript and TypeScript together.

Typehero is narrower in scope: it focuses specifically on TypeScript's type system rather than general programming problems. The browser-based editor means there is no CLI workflow; everything runs in the browser using Monaco. For developers who want to improve their type-level TypeScript specifically, typehero's constraint to type challenges is an advantage over Exercism's broader track structure. For developers who want general TypeScript practice or who prefer a local workflow, Exercism fits better.

The key structural difference is what gets tested: typehero checks whether your type definitions compile correctly and satisfy the type-level assertions in tests.ts, not whether runtime values behave correctly. This means the feedback loop is entirely within the TypeScript compiler. An incorrect solution fails the type check; a correct one passes it. There is no test runner executing your code at runtime.

AGPL-3.0 and what it means for self-hosted deployments

typehero uses the AGPL-3.0 license. This is a stronger copyleft license than MIT or Apache 2.0. Under AGPL-3.0, if you modify the source code and run the modified software as a network service, you must make your modified source code available under AGPL-3.0 to the users of that service.

For an organization running typehero internally for employee training, any changes made to the codebase must be published under AGPL-3.0. This is not a restriction on use, but it is a meaningful constraint on modification and deployment. Teams that need to make proprietary modifications to the platform should evaluate whether the AGPL-3.0 terms are compatible with their policies before beginning development.

Public contributors to the repository automatically license their contributions under AGPL-3.0 as well. The CODE_OF_CONDUCT.md file and CONTRIBUTING.md are both present, indicating that the project has formalized contribution expectations.

Maintenance status and last known activity

The repository was last pushed on 2026-09-03. It has no formal GitHub release tags; the application version in package.json is 0.1.0. The project is sponsored by CodeRabbit, Vercel, HeroDevs, UploadThing, and others, as shown in the README sponsor table.

The absence of GitHub releases means there is no changelog tied to specific version numbers. The Turborepo build tooling and pnpm workspace setup are standard for modern Next.js monorepos, so the development toolchain is broadly familiar to TypeScript developers.

The project accepts sponsorships and welcomes contributions, with the CONTRIBUTING.md file and a Discord server documented in the README for contributors who want to propose new challenge categories or platform features. Anyone self-hosting should join the Discord before making structural changes, since the challenge format evolves and the validate.ts script is the authoritative check for challenge submissions.

Editorial conclusion

Developers who want structured practice with TypeScript's type system, beyond what day-to-day application code provides, will find typehero's challenge format useful. Teams evaluating self-hosting should read LOCAL.md carefully before starting, since the setup requires Docker, MySQL, Redis, and GitHub OAuth credentials. The AGPL-3.0 license requires that any modifications to the source code be published under the same license if the modified software is offered to users over a network, which affects any organization running a private internal deployment.

Frequently asked questions

What is typehero.dev used for?

typehero.dev is a platform for practicing TypeScript's type system through coding challenges. Challenges focus on type-level TypeScript, including generics, conditional types, and mapped types, and run in a browser-based Monaco editor.

How do I run typehero locally?

Clone the repository, start the Docker services with docker compose up to get MySQL on port 3306 and Redis on port 6379, configure the .env file from .env.example, and run pnpm run dev. LOCAL.md in the repository contains the full setup steps.

What license does typehero use?

typehero uses the AGPL-3.0 license. If you modify the source and run the modified software as a network service, you must make your changes available under AGPL-3.0 to the users of that service.

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)