fritz2-ktor-chat

Full-stack chat application using fritz2 and ktor

MIT License

Stars
6
Committers
3

Ktor Chat

This project is an example for using fritz2 with in a ktor websockets-application. It will demonstrate how-to interact with a backend application in fritz2 and how-to setup this kind of project.

This project is a Kotlin multiplatform project which contains everything. In the commonMain section is the shared model and validation of the application. The jsMain section contains the complete code of the client-application written with fritz2. The backend part is in the jvmMain section where all the code for the server is.

This project uses the following libraries:

  • fritz2 - mainly in the frontend, except validation and model on both sides
  • kotlinx.serialization - used in frontend and backend for serializing the shared model
  • Ktor - running the server with
  • Ktor Websockets - providing serverside Websocket support

Run

To run this application you only need to run the following gradle task:

> ./gradlew run 

Then navigate in your browser to localhost:8080

Contribution

If you like this example and how fritz2 works it would be great when you give us a ⭐ at our fritz2 github page.

When you find some bugs or improvements please let us know by reporting an issue here. Also, feel free to use this project as template for your own applications.