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
- 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)
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.
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.