PageSourceSearch

https://kales.dev/docs/getting-started

html kales.dev collected 2026-10-06 10:13:28 UTC 9,638 bytes, 81 lines download raw bytes

1<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Getting Started · Kales</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="Kales is a [Kotlin](https://kotlinlang.org/) web framework for rapid prototyping inspired on "/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Getting Started · Kales"/><meta property="og:type" content="website"/><meta property="og:url" content="https://kales.dev/"/><meta property="og:description" content="Kales is a [Kotlin](https://kotlinlang.org/) web framework for rapid prototyping inspired on "/><meta property="og:image" content="https://kales.dev/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://kales.dev/img/docusaurus.png"/><link rel="shortcut icon" href="/img/leaf.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/>
1<script type="text/javascript" src="https://buttons.github.io/buttons.js"></script>
1<script src="/js/scrollSpy.js"></script>
1<link rel="stylesheet" href="/css/main.css"/>
1<script src="/js/codetabs.js"></script>
1</head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/"><img class="logo" src="/img/leaf.svg" alt="Kales"/><h2 class="headerTitleWithLogo">Kales</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive siteNavItemActive"><a href="/docs/getting-started" target="_self">Docs</a></li><li class=""><a href="/docs/api" target="_self">API reference</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><div class="hamburger-menu"><div class="line1"></div><div class="line2"></div><div class="line3"></div></div></div><h2><i>›</i><span>Introduction</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Introduction</h3><ul class=""><li class="navListItem"><a class="navItem" href="/docs/foreword">Foreword</a></li><li class="navListItem"><a class="navItem" href="/docs/installation">Installing Kales</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/docs/getting-started">Getting Started</a></li><li class="navListItem"><a class="navItem" href="/docs/hot-reloading">Hot Reloading</a></li><li class="navListItem"><a class="navItem" href="/docs/migrations">Database Migrations</a></li><li class="navListItem"><a class="navItem" href="/docs/active-record">Active Record Basics</a></li><li class="navListItem"><a class="navItem" href="/docs/controllers-overview">Controllers Overview</a></li></ul></div></div></section></div>
1<script>
2            var coll = document.getElementsByClassName('collapsible');
3            var checkActiveCategory = true;
4            for (var i = 0; i < coll.length; i++) {
5              var links = coll[i].nextElementSibling.getElementsByTagName('*');
6              if (checkActiveCategory){
7                for (var j = 0; j < links.length; j++) {
8                  if (links[j].classList.contains('navListItemActive')){
9                    coll[i].nextElementSibling.classList.toggle('hide');
10                    coll[i].childNodes[1].classList.toggle('rotate');
11                    checkActiveCategory = false;
12                    break;
13                  }
14                }
15              }
16
17              coll[i].addEventListener('click', function() {
18                var arrow = this.childNodes[1];
19                arrow.classList.toggle('rotate');
20                var content = this.nextElementSibling;
21                content.classList.toggle('hide');
22              });
23            }
24
25            document.addEventListener('DOMContentLoaded', function() {
26              createToggler('#navToggler', '#docsNav', 'docsSliderActive');
27              createToggler('#tocToggler', 'body', 'tocActive');
28
29              var headings = document.querySelector('.toc-headings');
30              headings && headings.addEventListener('click', function(event) {
31                var el = event.target;
32                while(el !== headings){
33                  if (el.tagName === 'A') {
34                    document.body.classList.remove('tocActive');
35                    break;
36                  } else{
37                    el = el.parentNode;
38                  }
39                }
40              }, false);
41
42              function createToggler(togglerSelector, targetSelector, className) {
43                var toggler = document.querySelector(togglerSelector);
44                var target = document.querySelector(targetSelector);
45
46                if (!toggler) {
47                  return;
48                }
49
50                toggler.onclick = function(event) {
51                  event.preventDefault();
52
53                  target.classList.toggle(className);
54                };
55              }
56            });
57        </script>
57</nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><h1 class="postHeaderTitle">Getting Started</h1></header><article><div><span><p>Kales is a <a href="https://kotlinlang.org/">Kotlin</a> web framework for rapid prototyping inspired on
58<a href="https://rubyonrails.org/">Ruby on Rails</a>. It borrows many of its tried and true conventions like
59generators, migrations, MVC architecture, no boilerplate and high productivity that made Rails so
60successful. In this document we'll guide you through getting started with a new Kales project.</p>
61<p>If you have no prior knowledge of Java or Kotlin, you might want to look into getting
62familiar with the language and the concepts behind these tools before you dive into Kales.</p>
63<h2><a class="anchor" aria-hidden="true" id="creating-a-new-project"></a><a href="#creating-a-new-project" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Creating a new project</h2>
64<p>Kales comes with a number of tools called generators that are designed to make your development
65life easier by creating everything that's necessary to start working on a particular task.
66One of these is the new application generator, which will provide you with the foundation of a
67fresh Kales application so that you don't have to write it yourself.</p>
68<p>If you've already installed Kales, you should have the <code>kales</code> command available in your terminal.
69To generate your application it, navigate to a directory where you have rights to create files
70and type this in your terminal window:</p>
71<pre><code class="hljs css language-bash">$ kales new com.example.blog
72</code></pre>
73<p>This will create a Kales application under the directory <code>com.example.blog</code>.
74After you create the blog application, switch to its folder:</p>
75<pre><code class="hljs css language-bash">$ <span class="hljs-built_in">cd</span> com.example.blog
76</code></pre>
77<p>The application directory has a number of auto-generated files and folders that make up the structure
78of a Kales application. Most of the work in this guide will happen in the
79<code>src/main/kotlin/com/example/blog/app</code> folder, which is where the controllers, models and views of
80your application live.</p>
81</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/installation"><span class="arrow-prev">← </span><span>Installing Kales</span></a><a class="docs-next button" href="/docs/hot-reloading"><span>Hot Reloading</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#creating-a-new-project">Creating a new project</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/leaf.svg" alt="Kales" width="66" height="58"/></a><div><h5>Docs</h5><a href="/docs/en/installation.html">Installing Kales</a><a href="/docs/en/getting-started.html">Getting Started</a></div><div><h5>Community</h5><a href="/en/users.html">User Showcase</a><a href="http://stackoverflow.com/questions/tagged/" target="_blank" rel="noreferrer noopener">Stack Overflow</a><a href="https://discordapp.com/">Project Chat</a><a href="https://twitter.com/" target="_blank" rel="noreferrer noopener">Twitter</a></div><div><h5>More</h5><a href="/blog">Blog</a><a href="https://github.com/felipecsl/kales">GitHub</a><a class="github-button" href="https://github.com/felipecsl/kales" data-icon="octicon-star" data-count-href="/felipecsl/kales/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub">Star</a></div></section><section class="copyright">Copyright © 2019 Felipe Lima</section></footer></div></body></html>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.