Everything you need to kickstart your Spring Boot + Vue.js project for [the DAT 3rd-semester exam]. 🌟
Created: November 2024
- Clone this repository:
git clone https://github.com/empasquer/springboot-vue-template.git
- You're ready to go!
-
Ensure Docker/OrbStack is installed and running.
-
Ensure no other applications are running on the ports used (8080, 5173, 3307)
-
Start your application:
docker-compose build --no-cache
docker compose up -d
-
To stop the containers:
docker compose down
-
Verify running containers:
docker ps
For more Docker Compose commands, refer to the official documentation.
-
Access your application:
- Frontend: http://localhost:5173
(If you encounter CORS issues, use http://127.0.0.1:5173 instead.) - Backend: http://localhost:8080
- H2 Database: http://localhost:8080/h2-console
- Frontend: http://localhost:5173
🎉 Your app is now running. Great job!
Here are a few steps to make this template your own:
- Rename the folder to match your project.
- Refactor the project name, application name, and metadata as needed.
- GO TO
compose.ymland change all environmental variables to your own (⚠️ messes with the test data) - In that same file, make sure to comment and uncomment which profile you want to use (details in file)
- Review and modify the provided data examples in the
data/directory. - Check the
src/configsfolder:InitDataExample.java: Examples for populating your database with JPA.WebConfig.java: Customize if necessary, but keep a backup copy.
- JPA entity examples can be found in the
models/folder. - Check
InitDataExample.javafor guidance on working with JPA.
- Modify
App.vueto reflect your data fetching needs usingfetchoraxios.
To enhance your frontend styling, you can install Tailwind CSS with the following steps:
- Install the necessary dependencies:
npm install -D tailwindcss@latest postcss@latest autoprefixer@latest
- Initialize Tailwind:
npx tailwindcss init -p
- Configure and start using Tailwind! 🎨
For more customization tips, refer to the Tailwind CSS documentation.
- Vue.js Quick Start Guide: https://vuejs.org/guide/quick-start.html
- Spring Boot Tutorial: https://docs.spring.io/spring-boot/tutorial/first-application/index.html
- Tailwind CSS: https://tailwindcss.com/
This template provides a great starting point for your project. Customize it to suit your needs and start building something amazing! 🚀
Enjoy!
— Emma