Skip to content

Latest commit

 

History

History

javalinstagram

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Javalinstagram

A (very limited) Instagram clone built with

  • Javalin - Kotlin web server framework
  • JDBI - Database connection pool and object mapping
  • SQLite - Database
  • Vue - JavaScript view library
  • axios - Client side http library

Functionality

  • Create account/sign-in/sign-out (uses bcrypt to hash passwords)
  • Upload photo (resize/crop)
  • Like/unlike photo
  • Get photos (for one user and for all users)

Screenshot

javalinstagram

Application structure

Backend

The application is packaged by feature rather than layer. This means that (for example) all functionality related to photos (like a Photo class, a PhotoDao, a PhotoController) are in a photo package, instead of having a controller package with controllers for different features:

src
└───main
    └───kotlin
        └───javalinstagram
            ├───account
            ├───like
            ├───photo
            ├───util
            └───Main.kt // backend entry point

Security is handled by Javalin's AccessManager, and set per endpoint. Sessions are handled by Jetty.

Frontend

The frontend is split into components and views. Both components and views are "single-file", meaning HTML/JS/CSS are all contained in one file. Components are re-usable and can be included in one or more views:

src
└───main
    └───resources
        └───vue
            ├───components
            ├───views
            └───layout.html

There is no Webpack or other build system, the application uses JavalinVue for rapid development.