diff --git a/docs/src/pages/architecture.md b/docs/src/pages/architecture.md new file mode 100644 index 0000000..ca8c4db --- /dev/null +++ b/docs/src/pages/architecture.md @@ -0,0 +1,7 @@ +# Architecture + +Krop uses a model-view-controller (MVC) architecture, which divides a web application into three components: + +- models, which manages the data in the application; +- [views](views.md), which is responsible for generating the user interface; and +- controllers, which handles actions from the user interface and implements the application logic. diff --git a/docs/src/pages/directory.conf b/docs/src/pages/directory.conf index 2f6e394..766d48d 100644 --- a/docs/src/pages/directory.conf +++ b/docs/src/pages/directory.conf @@ -1,8 +1,10 @@ laika.navigationOrder = [ README.md quick-start.md - principles.md + architecture.md application.md server.md + views.md routes + principles.md ] diff --git a/docs/src/pages/views.md b/docs/src/pages/views.md new file mode 100644 index 0000000..796d5aa --- /dev/null +++ b/docs/src/pages/views.md @@ -0,0 +1,17 @@ +# Views + +Views are responsible for generating the user interface of your application. +A user interface could be HTML displayed in a web browser, JSON returned from an API endpoint, or code that runs client-side. +As there are several different kinds of user interfaces there are several different systems for creating views. + + +## Static Files + +## Templates + +Krop uses [Twirl][twirl] for templates, which are views that are mostly text with a few pieces of programmatic content. Templates are ideal for generating HTML. + +By default templates are found in `backend/src/main/twirl/`. + + +[twirl]: https://www.playframework.com/documentation/3.0.x/ScalaTemplates diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 7c2a414..8bdcf71 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -9,8 +9,6 @@ object Dependencies { val catsEffectVersion = "3.5.1" val fs2Version = "3.6.1" val http4sVersion = "1.0.0-M41" - val endpoints4sVersion = "1.10.0" - val endpoints4sOpenApiVersion = "4.4.0" val scalaJsDomVersion = "2.4.0" val scalaTagsVersion = "0.13.1" val log4catsVersion = "2.7.0"