{"id":48470410,"url":"https://github.com/readingbat/readingbat-template","last_synced_at":"2026-05-04T08:03:54.628Z","repository":{"id":110838894,"uuid":"262117487","full_name":"readingbat/readingbat-template","owner":"readingbat","description":"ReadingBat Content Template","archived":false,"fork":false,"pushed_at":"2026-03-30T18:28:59.000Z","size":557,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-30T20:28:25.357Z","etag":null,"topics":["codingbat","educational-software","java","kotlin","python","readingbat"],"latest_commit_sha":null,"homepage":"https://readingbat.com","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/readingbat.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":null,"dco":null,"cla":null}},"created_at":"2020-05-07T17:37:58.000Z","updated_at":"2026-03-30T18:29:03.000Z","dependencies_parsed_at":"2023-05-01T22:47:13.509Z","dependency_job_id":"25c4cc00-b243-4f9d-8e30-66f74abc4dc3","html_url":"https://github.com/readingbat/readingbat-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/readingbat/readingbat-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/readingbat%2Freadingbat-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/readingbat%2Freadingbat-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/readingbat%2Freadingbat-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/readingbat%2Freadingbat-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/readingbat","download_url":"https://codeload.github.com/readingbat/readingbat-template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/readingbat%2Freadingbat-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31501903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","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":["codingbat","educational-software","java","kotlin","python","readingbat"],"created_at":"2026-04-07T06:03:48.776Z","updated_at":"2026-05-04T08:03:54.608Z","avatar_url":"https://github.com/readingbat.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Kotlin](https://img.shields.io/badge/%20language-Kotlin-red.svg)](https://kotlinlang.org/)\n\n# ReadingBat Template\n\nA Kotlin/Ktor template for teachers to author [ReadingBat.com](https://www.readingbat.com) content —\na code-reading practice site inspired by [CodingBat.com](https://codingbat.com).\n\nReadingBat helps students learn to **read and trace** code before they start writing it.\nChallenges are defined using a Kotlin DSL and support Python, Java, and Kotlin.\n\nThis template lets you create your own ReadingBat content. Once it's ready,\nsend us a note and we'll link [ReadingBat.com](https://www.readingbat.com) to it.\n\n## Prerequisites\n\n- **Java 17+** (the project uses a JVM 17 toolchain)\n- **Git** (to clone the repo and manage content)\n\n\u003e Gradle is included via the [Gradle Wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html) — no separate install needed.\n\n## Getting Started\n\n```bash\ngit clone https://github.com/readingbat/readingbat-template.git\ncd readingbat-template\n./gradlew build -xtest   # compile without running tests\n./gradlew run            # start the server on http://localhost:8080\n```\n\nSee the wiki for more details:\n[Quickstart](https://github.com/readingbat/readingbat-template/wiki/Quickstart)\n| [Setup](https://github.com/readingbat/readingbat-template/wiki/Setup)\n| [Running a Server](https://github.com/readingbat/readingbat-template/wiki/Running-a-Server)\n\n## Build \u0026 Run Commands\n\n| Command | Description |\n|---------|-------------|\n| `./gradlew build -xtest` | Compile without tests |\n| `./gradlew run` | Start the dev server (port 8080) |\n| `./gradlew --rerun-tasks check` | Run all tests |\n| `./gradlew test --tests \"ContentTests\"` | Run a single test class |\n| `./gradlew uberjar` | Build a fat JAR (`build/libs/server.jar`) |\n| `./gradlew build --continuous -xtest` | Continuous compile on file changes |\n| `./gradlew dependencyUpdates` | Check for dependency updates |\n\nA `Makefile` is also provided with shorthand targets (`make build`, `make run`, `make tests`, etc.).\n\n\u003e Project metadata (`group`, `version`) is set in [`gradle.properties`](./gradle.properties).\n\u003e Dependency versions and the `testing` bundle are defined in [`gradle/libs.versions.toml`](./gradle/libs.versions.toml).\n\n## Content Specification\n\nSpecify ReadingBat content with the ReadingBat-specific Kotlin DSL. Using the DSL does not require in-depth knowledge of\nKotlin.\n\nReadingBat supports challenges written in 3 languages: Python, Java and Kotlin.\n\nSpecify the content in the [src/main/kotlin/Content.kt](./src/main/kotlin/Content.kt) file.\n\nThe structure of the DSL is:\n```kotlin\nval content = \n  readingBatContent { \n    python {                                    // Creates a LanguageGroup object\n      group(\"Group 1\") {                        // Creates a ChallengeGroup named \"Group 1\"\n        packageName = \"group1\"                  // The path of the challenges in this group\n        description = \"Description of **Python** Group 1\" // Descriptions support markdown\n\n        challenge(\"find_it\") {                  // Creates a Challenge for group1/find_it.py\n          returnType = BooleanType              // Challenge return type\n        }\n\n        challenge(\"boolean2\") {                 // Creates a Challenge for group1/boolean2.py\n          returnType = BooleanType              // Challenge return type\n        }\n        \n        // Include all challenges matching the \"slice*.py\" filename pattern\n        includeFilesWithType = \"slice*.py\" returns StringType  \n      }\n    }\n\n    java {\n      group(\"Group 1\") {\n        packageName = \"group1\"\n        description = \"Description of **Java** Group 1\"\n\n        challenge(\"JoinEnds\") {                 // Java Return types are inferred from the code\n          codingBatEquiv = \"p141494\"            // Will add a link to this codingbat.com challenge\n        }\n\n        challenge(\"ReplaceCheck\")               // Creates a Challenge for group1/ReplaceCheck.java\n\n        // Include all challenges matching the \"Has*.java\" filename pattern\n        includeFiles = \"Has*.java\"\n      }\n    }\n\n    kotlin {\n      group(\"Group 1\") {\n        packageName = \"kgroup1\"\n        description = \"Description of **Kotlin** Group 1\"\n\n        challenge(\"StringLambda1\") {\n          returnType = StringType\n        }\n\n        // Include all challenges matching the \"lambda*.kt\" filename pattern\n        includeFilesWithType = \"lambda*.kt\" returns StringType\n      }\n    }\n  }\n```\n\n### DSL Objects\n\n- [ReadingBatContent](https://github.com/readingbat/readingbat-template/wiki/ReadingBatContent-Objects)\n- [LanguageGroup](https://github.com/readingbat/readingbat-template/wiki/LanguageGroup-Objects)\n- [ChallengeGroup](https://github.com/readingbat/readingbat-template/wiki/ChallengeGroup-Objects)\n- [Challenge](https://github.com/readingbat/readingbat-template/wiki/Challenge-Objects)\n\n## Challenge Code\n\nChallenge source files live in language-specific directories:\n\n| Language | Directory | Example |\n|----------|-----------|---------|\n| Python | `python/\u003cpackageName\u003e/` | `python/group1/find_it.py` |\n| Java | `src/main/java/\u003cpackageName\u003e/` | `src/main/java/group1/JoinEnds.java` |\n| Kotlin | `src/main/kotlin/\u003cpackageName\u003e/` | `src/main/kotlin/kgroup1/StringLambda1.kt` |\n\nWiki references:\n[Python](https://github.com/readingbat/readingbat-template/wiki/Python-Challenges)\n| [Java](https://github.com/readingbat/readingbat-template/wiki/Java-Challenges)\n| [Kotlin](https://github.com/readingbat/readingbat-template/wiki/Kotlin-Challenges)\n\n## Server Configuration\n\nServer settings are in [`src/main/resources/application.conf`](./src/main/resources/application.conf) (HOCON format).\nSee the [Server Configuration](https://github.com/readingbat/readingbat-template/wiki/Server-Configuration) wiki page for details.\n\n## Examples\n\nThe [readingbat-site](https://github.com/readingbat/readingbat-site) repo powers\n[ReadingBat.com](https://readingbat.com) and combines content from multiple repos:\n\n**Content.kt files:**\n- [Top-level Content.kt](https://github.com/readingbat/readingbat-site/blob/master/src/Content.kt)\n- [Java and Kotlin Content](https://github.com/readingbat/readingbat-java-content/blob/master/src/main/kotlin/Content.kt)\n- [Python Content](https://github.com/readingbat/readingbat-python-content/blob/master/src/Content.kt)\n\n**Challenge source code:**\n- [Python](https://github.com/readingbat/readingbat-python-content/tree/master/python)\n- [Java](https://github.com/readingbat/readingbat-java-content/tree/master/src/main/java)\n- [Kotlin](https://github.com/readingbat/readingbat-java-content/tree/master/src/main/kotlin)\n\n## More Resources\n\n- [Kotlin Tips](https://github.com/readingbat/readingbat-template/wiki/Kotlin-Tips)\n- [GitHub Tips](https://github.com/readingbat/readingbat-template/wiki/GitHub-Tips)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freadingbat%2Freadingbat-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freadingbat%2Freadingbat-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freadingbat%2Freadingbat-template/lists"}