Announcing Kobweb, an opinionated framework on top of Web Compose

Project: https://github.com/varabyte/kobweb

I’m sure by now many of you have seen the news that Compose 1.0 was just released! If any of you were interested in playing around with Web Compose specifically, consider checking out Kobweb, which makes setting up a new project a breeze.

Demo of using Kobweb to create a project

Kobweb is a framework which:

  • can set up a project in seconds
  • is built around live reloading from the ground up
  • generates site routing for you
  • makes it easy to define server API routes
  • can export static pages (i.e. SEO friendly)
  • includes a UI layer (called Silk) that is light and dark mode aware
  • supports Markdown out of the box
  • generates a setup for you where it’s easy to share rich Kotlin types between the client (JS) and server (JVM)
  • allows breaking up your site’s CSS styles into pieces, so you can define them closer to where they are actually used

And it’s totally open source (and Apache 2.0 licensed).

Kobweb is the collection of several concepts:

  • A binary with several useful commands that automate some of the more tedious parts of project management
  • A Gradle plugin that generates boilerplate code for your project at build time
  • A library that allows you to annotate your code for that Gradle plugin
  • It is bundled with the Silk UI library, which brings Android Compose concepts (Modifier, Row, Column, Box) to the web, with a few styleable widgets already available (like Button, Canvas, Link, and SimpleGrid) and many more on the way

And you get all of the above simply by running kobweb create site (steps for getting or building the binary are found in the README).

There are a handful of examples you can check out as well. Run kobweb list to see them. kobweb create examples/todo may be the most interesting one at the moment.

So far a friend and I have spent four months on this project, because we’re excited about Web Compose. While it’s too early to call it robust, I closed the MVP milestone a few days ago, and I think it’s a great time for curious early adopters to start poking around. We have a Discord server linked to in the README if you’d like to get in touch as well.

Finally, we are building http://kobweb.varabyte.com (still a WIP) using this framework, and you can see the source for that here.

At this point, we’re looking forward to hearing from the community. This has been a fun project to work on, but hopefully other people might be excited to use it as well. Maybe some of you will want to join us on the journey to 1.0?

P.S. Linux and Mac are getting the most attention. If you are a Windows user and this isn’t working for you, please let us know.

submitted by /u/bitspittle
[link] [comments]