Backend for my interactive Blogpost
The backend for my interactive Blogpost to polish my skills in FullStack development that I totally didn't copy from Reddit. The frontend is available here. To see the app live, visit https://sudobarre.github.io/blogpost/.
This app is built using Spring Boot 3. It uses JWT stored in an HTTP-Only Cookie for better security, as well as a Refresh Token feature. The package is available on ghcr.io/sudobarre/blogpost-backend:latest and it's built with GraalVM Native Build Tools to generate a native executable. To understand more about native image generation, visit here.
I'm more than open to receive comments and constructive criticism on anything regarding the project. Feel free to contact me :)
These instructions will get you a copy of the project up and running on your local machine for development purposes. See [deployment](#deployment) for notes on how to deploy the project on a live system.
You can clone this repo and run it as you would normally, or pull it from Github Container Registry with the command `docker pull ghcr.io/sudobarre/blogpost-backend:latest`.To build the project, you can either do mvn clean install
, or if you want to generate a native image, mvn clean -Pnative native:compile
. Remember to pass along the env variables as well.
- Docker
- GraalVM 22.3 JDK for the Java native image generation. here to install it.
- Spring Boot 3.0.4, or later. https://start.spring.io/
I deployed the Docker image on fly.io, using flyctl deploy --image ghcr.io/sudobarre/blogpost-backend:latest
. See here for more info about deploying apps via Dockerfile to fly.io.
- PostgreSQL - Database
- Spring Boot 3 - Server Framework
- Docker
- Initial idea taken from Sai Subramanyam Upadhyayula's Spring Reddit Clone
- This amazing blog post by Jonas Hecht that inspired me to try out and learn Java native images with GraalVM and deploy the app to fly.io
- HTTP-Only JWT idea taken from BezKoder
- This README template taken from The Documentation Compendium.