Note: I no longer use this template for new projects:
A relatively lightweight modern app template using Kotlin/JVM. For people asking me at conferences what would I recommend from technical perspective.
No frameworks needed for this:
Testing:
See conference slides from Kotland 2021 conference.
Firstly, websites should use server-side/static rendering. Apps (not caring about SEO) are better off using reactive UI frameworks.
Framework | React | Vue | Svelte |
---|---|---|---|
NPM packages | 18 with router | 2 with router | 1 |
Minified runtime size | 6k | 64k | 0 |
Reactivity | runtime one-way (complex editing apps usually require flux/redux) | runtime two-way | compile-time two-way (better performance, less boilerplate) |
Template syntax | non-standard JSX file format, weird attribute names | Template exports must follow some strict structure, grouping of properties, etc | Just standard js variables - closest to real HTML |
Component imports | Just import & use | Import, declare, then use with a different name | Just import & use |
Component syntax | 3 different ways to write: class, function, hooks | 1 (+ 1 without the compiler) | 1 way |
Dependencies, runtime size and simplicity is also the reason why this repository implements its own simple router and i18n support on top of Svelte.
Also, fetch, Promises/async/await and many other APIs (including array transformations) are already available in all modern browsers, so dependencies like lodash and axios are obsolete.
Bundler | Webpack | Rollup | Snowpack |
---|---|---|---|
NPM packages (without plugins) | 74 | 2 | 7 |
ES6 modules | transpiled to es5 | native | native & not bundled by default - you run what you write |
Watch & reload | full rebuild | full rebuild | rebuilds & reloads only changed files (es6 modules) |
docker-compose up --build
or to just start the DB:
docker-compose up -d db
This will bind to 127.0.0.1:65432
by default
After clone:
npm install --legacy-peer-deps
Then:
npm run watch
# or just `npm run build`
./gradlew run
To run tests:
npm test
- for UI components./gradlew test
- for API./gradlew e2eTest
- for in-browser End-to-End testsSome IntelliJ IDEA config is committed to share code style, run configurations, etc with the team.
npm run watch
will run automatically to compile changing UI assets on the flydocker-compose
Uses Feather icon set available at https://feather.netlify.com/.
To add an icon:
public/img/icons
.npm run gen-icon-sprite