https://github.com/tipsy/javalinstagram
https://github.com/tipsy/javalinstagram
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tipsy/javalinstagram
- Owner: tipsy
- License: apache-2.0
- Created: 2018-03-03T11:26:13.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-05-23T20:38:45.000Z (over 2 years ago)
- Last Synced: 2025-03-24T19:46:56.086Z (10 months ago)
- Language: Vue
- Size: 99.6 KB
- Stars: 11
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Javalinstagram
A (very limited) Instagram clone built with
* [Javalin](https://javalin.io/) - Kotlin web server framework
* [JDBI](http://jdbi.org/) - Database connection pool and object mapping
* [SQLite](https://www.sqlite.org/index.html) - Database
* [Vue](https://vuejs.org/) - JavaScript view library
* [axios](https://github.com/axios/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

## 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:
```text
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:
```text
src
└───main
└───resources
└───vue
├───components
├───views
└───layout.html
```
There is no Webpack or other build system, the application uses [JavalinVue](https://javalin.io/documentation#vue-support)
for rapid development.