{"id":21801990,"url":"https://github.com/illescasdaniel/everythingkt","last_synced_at":"2026-04-11T04:33:06.315Z","repository":{"id":119505431,"uuid":"133182468","full_name":"illescasDaniel/EverythingKT","owner":"illescasDaniel","description":"A Kotlin library to create Websites in one language, with compilation time checks and Android interoperability. ","archived":false,"fork":false,"pushed_at":"2018-06-16T11:37:22.000Z","size":1515,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-03T17:16:22.600Z","etag":null,"topics":["everythingkt","kotlin","library","web"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/illescasDaniel.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}},"created_at":"2018-05-12T20:50:45.000Z","updated_at":"2025-02-12T10:15:14.000Z","dependencies_parsed_at":"2023-03-11T07:30:46.872Z","dependency_job_id":null,"html_url":"https://github.com/illescasDaniel/EverythingKT","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/illescasDaniel/EverythingKT","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illescasDaniel%2FEverythingKT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illescasDaniel%2FEverythingKT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illescasDaniel%2FEverythingKT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illescasDaniel%2FEverythingKT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/illescasDaniel","download_url":"https://codeload.github.com/illescasDaniel/EverythingKT/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illescasDaniel%2FEverythingKT/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31669116,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["everythingkt","kotlin","library","web"],"created_at":"2024-11-27T11:22:02.649Z","updated_at":"2026-04-11T04:33:06.305Z","avatar_url":"https://github.com/illescasDaniel.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EverythingKT\n\n[![Version](https://img.shields.io/badge/version-v1.0.1-brightgreen.svg)](https://github.com/illescasDaniel/EverythingKT/releases)\n[![license](https://img.shields.io/badge/license-MPL-blue.svg)](https://github.com/illescasDaniel/EverythingKT/blob/master/LICENSE)\n[![Language](https://img.shields.io/badge/language-Kotlin-green.svg)](https://kotlinlang.org)\n\nEKT is a Kotlin library which helps **developing Websites in a more simple, clear and faster way**. It's aimed to developers with previous programming knowledge that pretend to avoid most syntactic errors and want an easy way of deploying the websites.\n\nOne of the main goals is not to use multiple languages directly (HTML, CSS, JS, SQL...), but instead using one which you can use to represent everything (paragraphs, links, styles, etc) in a way that it will **automatically translate from Kotlin to all the other languages** with the **proper code verifications** to minimise the errors. It also allows the developers to **share some code with Android apps** (made in Kotlin).\n\n\u003cimg src=\"docs/images/Standard-Web-Diagram.png\" width=\"200\"\u003e \u003cimg src=\"docs/images/EVT-Diagram.png\" width=\"240\"\u003e \n\n## Table of contents\n\n*   [Key points](https://github.com/illescasDaniel/EverythingKT#key-points)\n*   [Motivation](https://github.com/illescasDaniel/EverythingKT#motivation)\n*   [Current status](https://github.com/illescasDaniel/EverythingKT#current-status)\n*   [Code examples](https://github.com/illescasDaniel/EverythingKT#code-examples)\n    *   [Starting the NodeJS integrated Web Server](https://github.com/illescasDaniel/EverythingKT#starting-the-nodejs-integrated-web-server)\n    *   [Creating your first WebDocument](https://github.com/illescasDaniel/EverythingKT#creating-your-first-webdocument)\n    *   [Using JavaScript in Kotlin](https://github.com/illescasDaniel/EverythingKT#using-javascript-in-kotlin)\n*   [Installation](https://github.com/illescasDaniel/EverythingKT#installation)\n*   [License](https://github.com/illescasDaniel/EverythingKT#license)\n\n### Key points\n\n*   Make website with just **one language**, Kotlin.\n*   Avoid most syntax errors with **compilation time checking**.\n*   **Share some code with** other platforms like **Android**.\n\n### Motivation\n\nIn an Web developers world where you have to use up to 5 different languages, all interpreted, on the same Website, it is sometimes quite difficult to maintain code like that or to interact between all of them.\n\n\u003cimg src=\"docs/images/Standard-Lenguages.png\" width=\"200\"\u003e \n\nI'd love to see another unified, non-interpreted, highly advanced language to completely replace the Web; but that's something out of my hand, so I decided to create a library to create your websites with the advantages I just mentioned and without the hassels of the standard development.\n\n### Current Status\n\nThis is a base version for what I have planned for EKT, but anyone can create whatever they want with the current status of the library. Further development will mean:\n\n*   More polished code.\n*   Futher support for SQL.\n*   Better interaction with Android apps/code.\n*   MVC patterns.\n*   CSS or JS frameworks made in Kotlin (some adaptation of Boostrap or jQuery for example).\n\n### Code examples\n\n\u003cimg src=\"docs/images/Code-example.png\" width=\"600\"\u003e \n\n#### Starting the NodeJS integrated Web Server\n\n```kotlin\nval server = Server(port = 3000, listenHandler = { portNumber -\u003e\n    println(\"Listening on port: $portNumber\")\n}, routeGetHandler = { _, response -\u003e\n    val web = IndexWeb()\n    web.html.writeOutputToPageFolder()\n    response.sendFile(\".../EverythingKT/public\")\n})\n```\n\nThis opens a connection to deliver a Web page through the port 3000.\n\nThe code made in the IndexWeb class is automatically transformed to HTML, CSS, JS…, you then can write its output to a folder and deliver the whole folder as you see above.\n\n#### Creating your first WebDocument\n\n```kotlin\npackage WebExample\n\nimport Everything.Row\nimport Everything.WebDocument.WebDocument\n\nclass IndexWeb(rows: ArrayList\u003cRow\u003e): WebDocument() {\n   override val styleSheet = IndexStyleSheet.value\n   override val document = IndexHTML(rows).value\n   override val dbContent = IndexDB.value\n}\n```\n\nThe idea here is to create separte files for the corresponding HTML, CSS, JS, SQL.\n\nIn this case we decided to pass an array of rows extracted from a DB (see how we do this on the example Main.kt) which information is obtained from the `dbContent` property, which is a class. The web document also gets its html code from a class that we created, named IndexHTML, which returns an HTML object.\n\nMost of those properties will provide its content like this:\n\n```kotlin\nclass IndexHTML {\n    val value: HTML by lazy {\n    ...\n    }\n}\n// or:\nclass IndexStyleSheet {\n    companion object {\n        val value = StyleSheet(\n        ...\n        )\n    }\n}\n```\n\n#### Using JavaScript in Kotlin\n\nFor JavaScript, internally is a bit more complicated. We have a Kotlin2JavaScript folder in with you have to create a symbolic link of HeadScripts.kt, StartScripts.kt and EndScript.kt to your website folder (src/main/kotlin/**MyWeb**).\n\nThe JavaScript output of those kotlin files, which are compiled separetedly from you website, will be later copied to the public folder in which all the Web output is stored.\n\nAn example of a script:\n\n```kotlin\nimport org.w3c.dom.HTMLInputElement\nimport kotlin.browser.document\nimport kotlin.browser.window\nimport Everything.Common.*\n\nclass EndScripts {\n  companion object {\n    private val paypalScript = {\n      val paypalModalSection = document.elementWith(id = IndexWebID.paypal)\n        ...\n    }\n    // more scripts...\n  }\n}\n```\n\nAll scripts share a common file, which should be place in: **Kotlin2JavaScript/source/CommonSources**. In this file you can write code using the Common library classes, functions… that you can also use in a normal file, like the IDs or css clases:\n\n```Kotlin\nimport Everything.Common.*\n\nenum class IndexWebClass: CSSClass {\n    sectionsWidth, paypalButton, inputPayPal, ...\n}\n\nenum class IndexWebID: CSSID {\n    mainSection, paypal, showPayPalOptions, ...\n}\n```\n\nThis enables you to use your css classes names (which by the way are compile time checked 😉) between the above \"javascript\" (in kotlin) files and the rest of your website (you could use these IDs on an html element for example).\n\n### Installation\n\nPre-requisited:\n\n*   Gradle.\n*   NodeJS.\n*   npm (A NodeJS package manager), EKT requires the **express** and **mysql** packages at the moment.\n\nSetup:\n\n*   Download the basic kotlin-node project example from [here](https://github.com/miquelbeltran/kotlin-node.js) (thx to [@miquelbeltran](https://github.com/miquelbeltran/kotlin-node.js/commits?author=miquelbeltran)).\n*   You'll need now the whole EKT library, which will be place in `src/main/kotlin/`, and also the `Kotlin2JavaScript` folder and its contents.\n\n### License\n\nThe project license is **MPL**, which basically states (more info [here](https://choosealicense.com/licenses/mpl-2.0/#)) that you can get this code, distribute it, modify it… but if you make a work using this library you **must**:\n\n*   Include the license and copyright notice.\n*   Disclose the **source code files of this library** that you use in your project (not the whole project…) when the software is distributed.\n*   Release your software (~just the modified libraries of EVK) under the same license or under a compatible one (see full MPL license for more details).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fillescasdaniel%2Feverythingkt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fillescasdaniel%2Feverythingkt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fillescasdaniel%2Feverythingkt/lists"}