DEV Community

Adam Miedema
Adam Miedema

Posted on • Originally published at Medium on

How you can build a fully functional web app and have time left over to read a good book

Photo by Austin Distel on Unsplash

There are a lot of web frameworks available today to choose from. A few options will get you going with relative ease. However, most will require you to spends hours, even days, just getting the environment setup.

And, once you do get the environment up-and-running, you are left to figure out how to implement some of the most common things that the majority of applications will require — such as database connections and security.

Alpas not only is easy to get your environment up and running with, but adding database connections and authentication scaffolding is done with just a few key strokes.

Setting up Alpas Environment

The installation instructions are quick and straight-forward. You can use a Windows or MacOS / Linux machines. If you have Windows, you will need to perform some extra steps to setup GitBash. AlpasCasts has a video on how to get Gitbash running on your Windows machine and another on how to finish the installation process for Windows.

For MacOS / Linux, just install sdkman and then install Java and Gradle. Once your environment is ready, follow the instructions for creating a new project and BOOM — you have your very first basic Alpas project up and running! 🧨

To make the development experience even more seamless, use IntelliJ IDEA. The community version is free and it makes coding, building, and running your Alpas web app a cinch.

Setup a Database

As easy as it is to setup Alpas, it’s equally as easy to get a database setup on you local machine and connect to it with Alpas.

I recommend using MySQL. Here are instructions for installing on your Mac and here are instructions for Windows.

Once you have MySQL setup, head over to the DatabaseCongfig.kt file in your project and uncomment addConnections(env), then make sure you have your username, password, and database name identified in your .env file.

That’s all it takes to connect to a database! Check out the database documentation to see how you can work work with your database and perform powerful queries using ktorm and Ozone layer.

Setup authorization scaffolding

Run the ./alpas make:auth command under your project root directory, then in the routes.kt file, add authRoutes() and… wait for it… BOOM! 🧨 You now have a fully functional authentication scaffolding that allows users to create accounts, login to their account, logout, and reset passwords. Check out what the authentication scaffolding covers in the documentation.

Photo by Nathan Dumlao on Unsplash

Since Alpas got you up-and-running with creating a fully functional web app and saved you days of work, now you have plenty of time to get comfortable and read a good book! 📖

Looking for some ideas on what to read? Here is a list of some best selling fiction —

Long Range by C.J. Box

Wyoming game warden Joe Pickett must investigate an attempted murder–a crime committed from a confoundingly long distance–in the riveting new novel from #1 New York Times bestselling author C. J. Box.

False Value by Ben Aaronovitch

Peter Grant is facing fatherhood, and an uncertain future, with equal amounts of panic and enthusiasm. Rather than sit around, he takes a job with émigré Silicon Valley tech genius Terrence Skinner’s brand new London start up — the Serious Cybernetics Company.

Lethal Game by Christine Feehan

When Malichai Fortunes attacks a problem, he does it full force — a habit that earns the GhostWalker a painful injury and a forced vacation in San Diego, California. With nothing but physical therapy on the horizon, Malichai is starting to get restless…until a striking blue-eyed blonde makes all his senses come alive.

The Treadstone Resurrection by Rober Ludlum

The first novel in an explosive new series inspired by Robert Ludlum’s Bourne universe, The Treadstone Resurrection introduces an unforgettable hero and the shadowy world that forged him…

The Holdout by Graham Moore

One juror changed the verdict. What if she was wrong? From the Academy Award–winning screenwriter of The Imitation Game and bestselling author of The Last Days of Night. . .

Top comments (0)