You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the skeleton used by Wiringbits when creating new web applications fully in Scala/Scala.js, so far, we have created ~10 projects from this template, back-porting useful details to improve our template.
6
+
This is the skeleton used by Wiringbits when creating new web applications in Scala/Scala.js, so far, we have created ~10 projects from this template, back-porting useful details to improve it.
7
+
8
+
If you require building a Web Application in Scala while you do not have the time to do many technical choices, this template could be a reasonable choice.
7
9
8
10
9
11
## Why?
10
12
11
-
Scala has a common misconception, many people believe that it is hard to get productive with, at Wiringbits, we have proven the contrary with this template. Engineers with no previous Scala experience tend to start contributing simple bug fixes at their first week (including undergrad interns).
13
+
Scala has a common misconception, many people believe that it is hard to get productive with it, at Wiringbits, we have proven the contrary with this template. Engineers with no previous Scala experience tend to start contributing simple bug fixes at their first week (including undergrad interns).
12
14
13
15
Our template provides all the necessary boilerplate to get started fast when building a traditional web application.
14
16
15
-
Don't waste your time evaluating every library required to build your web app, pick this template and go from there as a base and move from there.
16
-
17
-
When creating web apps for our customers, we usually pick this template to save time, you can do same.
17
+
Don't waste your time evaluating every library required to build your web app, pick this template and go from there.
18
18
19
19
Using Scala.js not only save us considerable time, it also allows us to avoid many common issues, for example, all frontend/backend validations are in sync just because the code is the same.
20
20
@@ -24,7 +24,7 @@ Using Scala.js not only save us considerable time, it also allows us to avoid ma
24
24
We have a live demo so that you can get a taste on what our template provides.
25
25
26
26
-[Web App](https://template-demo.wiringbits.net) showcases the web application intended for the general user, explore it and create an account to get an idea on what your users will experience.
27
-
-[Admin App](https://template-demo-admin.wiringbits.net) (username = `demo`, password = `wiringbits`) showcases the web application intended for administrators, this exposes a way to manage the application's data in a nice UI, mostly autogenerated by [react-admin/](https://marmelab.com/react-admin/).
27
+
-[Admin App](https://template-demo-admin.wiringbits.net) (username = `demo`, password = `wiringbits`) showcases the web application intended for administrators, this exposes a way to manage the application's data in a nice UI, mostly autogenerated by [react-admin](https://marmelab.com/react-admin/).
28
28
-[API Docs](https://template-demo.wiringbits.net/api/docs/index.html) showcases the [Swagger UI](https://swagger.io/tools/swagger-ui/) which can help to explore the API directly.
1. User registration and authentication; Including email verification, profile updates, password recovery, and, Captchas (for spam prevention).
47
+
1. User registration and authentication; Including email verification, profile updates, password recovery, and, captcha for spam prevention.
48
48
2. Integration with the React ecosystem, most libraries/components will work right away, while we use [Material UI](https://v3.mui.com/), you can switch to your preferred component library.
49
49
3. PostgreSQL as the data store layer, which is a reasonable choice for most web applications.
50
50
4. Practical components for testing your server-side code, writing tests for the Data/Api layer is real simple, no excuses accepted.
@@ -54,3 +54,7 @@ Deployment 4m demo:
54
54
8. Admin usually have super-powers, which is why you can export most of your Postgres database to an autogenerated UI (https://marmelab.com/react-admin/), just define which tables/columns must be exported.
55
55
9. A simple to follow architecture, including short-guides for doing common tasks.
56
56
10. Deployment scripts to cloud instances, we believe in simplicity and most projects are fine with simple managed servers instead of containers/K8s/etc.
Copy file name to clipboardExpand all lines: docs/design-decisions.md
+21-2
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,24 @@
1
-
# Design docs
2
-
This document explains why we took certain decisions on how the project is built/structured.
1
+
# Design decisions
2
+
This document explains why we took certain design decisions on how the project is built/structured.
3
+
4
+
## 2022/Aug - Avoid default parameter in most cases
5
+
We commonly deal with models that are similar but belong to a different domain, [chimney](https://scalalandio.github.io/chimney) help us to transform those models from one domain to another, while this tool is handy, it does not play well with default values in arguments.
While the `transform` function would succeed, the `age` value will never become the `yearsOld` value, if there wasn't a default value, we'd get a compile error which would give us a chance to fix the problem (`request.into[CreateUserData].withFieldRenamed(_.age, _.yearsOld).transform`).
18
+
19
+
Still, there can be exceptions:
20
+
- The http API layer usually gets default values when adding a new parameter to an API method, this way, we keep backwards compatibility to support old API clients.
21
+
3
22
4
23
## 2022/Apr - Naming conventions for api/data models
0 commit comments