A modern microservices-based application demonstrating enterprise architecture patterns.
- Java Development Kit (JDK) 21
- Maven (for dependency management)
- Node.js (version >=18 and <=20)
- npm (included with Node.js)
The project consists of several components:
refarch-backend/
: Spring Boot backend servicerefarch-frontend/
: Vue.js 3 frontend applicationrefarch-eai/
: Enterprise Application Integration servicerefarch-webcomponent/
: Reusable Vue.js web componentsstack/
: Docker Compose configuration and Keycloak setup
The application uses PostgreSQL as its database. You can set it up using either Docker or a native installation.
- Pull and run PostgreSQL container:
docker run --name refarch-postgres \ -e POSTGRES_USER=admin \ -e POSTGRES_PASSWORD=admin \ -p 5432:5432 \ -d postgres:latest
- Install PostgreSQL from the official website
- Start the PostgreSQL service
- Create a new user and database:
CREATE USER admin WITH PASSWORD 'admin'; ALTER USER admin WITH SUPERUSER;
The application is configured to connect to:
- Host: localhost
- Port: 5432
- Database: postgres
- Username: admin
- Password: admin
Note: The application will automatically create and manage the database schema when it starts, as it's configured with spring.jpa.hibernate.ddl-auto: create-drop
.
- Install JDK 21
- Navigate to the backend directory:
cd refarch-backend
- Run the application:
- With security:
./runLocal.sh
(Linux/Mac) orrunLocal.bat
(Windows) - Without security:
./runLocalNoSecurity.sh
(Linux/Mac) orrunLocalNoSecurity.bat
(Windows)
- With security:
- Install Node.js (version 18-20)
- Navigate to the frontend directory:
cd refarch-frontend
- Install dependencies:
npm install
- Available commands:
npm run dev
: Start development servernpm run build
: Build for productionnpm run preview
: Preview production buildnpm run test
: Run testsnpm run lint
: Check code qualitynpm run fix
: Fix code style issues
- Navigate to the web component directory:
cd refarch-webcomponent
- Install dependencies:
npm install
- Available commands:
npm run dev
: Start development servernpm run build
: Build for productionnpm run preview
: Preview production buildnpm run test
: Run testsnpm run lint
: Check code qualitynpm run fix
: Fix code style issues
Each component includes a Dockerfile for containerization. To run the entire stack:
- Navigate to the stack directory:
cd stack
- Start the services:
docker-compose up
-
Install Homebrew (Package Manager):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
Install Git:
brew install git
-
Install Java 21:
brew install openjdk@21 echo 'export PATH="/opt/homebrew/opt/openjdk@21/bin:$PATH"' >> ~/.zshrc source ~/.zshrc
-
Install Maven:
brew install maven
-
Install Node.js:
brew install node@20 echo 'export PATH="/opt/homebrew/opt/node@20/bin:$PATH"' >> ~/.zshrc source ~/.zshrc
-
Install PostgreSQL:
brew install postgresql@15 brew services start postgresql@15 brew link postgresql@15 --force
-
Create database user:
psql postgres CREATE USER admin WITH PASSWORD 'admin'; ALTER USER admin WITH SUPERUSER; \q
-
Clone the repository:
git clone <repository-url> cd <repository-name>
-
Setup Backend:
cd refarch-backend chmod +x runLocal.sh ./runLocal.sh
-
Setup Frontend (in a new terminal):
cd refarch-frontend npm install npm run dev
-
Setup Web Components (in a new terminal):
cd refarch-webcomponent npm install npm run dev
- Backend should be running at: http://localhost:8080
- Frontend should be running at: http://localhost:5173
- Web Components dev server should be running at: http://localhost:5174
If you prefer using Docker:
-
Install Docker Desktop for Mac from https://www.docker.com/products/docker-desktop
-
Start the entire stack:
cd stack docker-compose up
graph TB
FE[Frontend Vue.js App]
WC[Web Components]
BE[Backend Service]
EAI[EAI Service]
KC[Keycloak Auth]
FE --> BE
FE --> KC
WC --> BE
BE --> EAI
BE --> KC
- Frontend: Vue.js 3 application with TypeScript and Vuetify
- Web Components: Reusable UI components built with Vue.js
- Backend: Spring Boot service handling business logic
- EAI: Enterprise Application Integration service
- Authentication: Keycloak-based security
- Start the backend service using the provided scripts
- Run the frontend development server with
npm run dev
- Make changes to the code
- Use the lint and test commands to ensure code quality
- Build for production when ready
-
Backend:
- Java 21
- Spring Boot
- Maven
-
Frontend:
- Vue.js 3
- TypeScript
- Vuetify
- Vite
- Vitest for testing
-
Infrastructure:
- Docker
- Docker Compose
- Keycloak
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please open an issue with the tag "enhancement", fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Open an issue with the tag "enhancement"
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
More about this in the CODE_OF_CONDUCT file.
Distributed under the MIT License. See LICENSE file for more information.
it@M - opensource@muenchen.de