Git Product home page Git Product logo

kotlin-admin-template's Introduction

Kotlin Admin Template

Screenshot

What's included?

Kotlin Admin Template is a starter project for a typical admin project. It has a user database with roles, authorization per endpoint, and a frontend for displaying data. The project includes the following libraries:

  • Vuetify (Material Design Vue components)
  • Vue (JavaScript view layer library)
  • Javalin (Web server library)
  • JDBI (Database library (not an ORM))
  • SQLite (Embedded database)

Running the project

From the root directory (kotlin-admin-template), do:

./mvnw clean install
java -jar target/kotlin-admin-template-jar-with-dependencies.jar

The server should now be running on http://localhost:8080

Architecture

The project is packaged by feature rather than layer, for example accounts and example are packages in the project. Each feature has a Controller responsible for handling HTTP input and output, and a Service responsible for communicating with a data store (typically a database, but could also be an API).

The frontend is based on having one Vue app per URL, and routing is done server side. This allows you to re-use your auth logic for both backend and frontend routes. The frontend architecture is described in detail in this tutorial.

Directory overview

kotlin-admin-template
├──src
│  ├──main
│  │  ├──kotlin
│  │  │  └──kat
│  │  │     ├──account     //crud for user accounts
│  │  │     ├──auth        //authentication and authorization
│  │  │     ├──example     //an example crud feature
│  │  │     ├──Config.kt   //application config
│  │  │     └──Main.kt     //server config, routes and main function
│  │  └──resources
│  │     ├──public         //static files (logos, illustrations)
│  │     └──vue            //vue files
│  │        ├──components  //reusable vue components
│  │        ├──pages       //one-off vue components (pages with URLs)
│  │        └──layout.html //vue setup file
│  └──test
│     └──kotlin
│        └──kat
│           ├──api         //http-client tests towards api
│           └──view        //browser tests (selenium)
└──pom.xml

Running in production?

The project is intended to get you up and running as fast as possible. Before putting this into production, you'll probably want to do a few things:

  • Setup your own session database (tutorial)
  • Connect to a login provider, such as auth0
  • Replace SQLite with PostgreSQL (or similar)
  • Setup a database migration tool (like liquibase)

kotlin-admin-template's People

Contributors

tipsy avatar zakharovsergey1000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.