PatternAtlas Developer Guide
This document provides an index to all development guidelines and background information of the PatternAtlas.
- ADR - Information on Architectural decisions can be found here
Quick Develop
PatternPediaAuth
PatternPediaAuth is a Spring Boot Authentication Server and it’s main purpose is to give PatternAtlasAPI user management capabilities. This is achieved through using the OAuth 2.0 Authentication Code Flow, additionally new users can create accounts. It runs on Port 8081
Development
- Run the maven build
mvn package -DskipTests
- Clone the contents repository
git clone https://github.com/PatternAtlas/pattern-atlas-content
. - Clone the Docker repository
git clone https://github.com/PatternAtlas/pattern-atlas-docker
- Setup IntelliJ to also use the contents repository in the deployment. :warning: you MUST use the Applicaition run configuration, not Spring Boot!
- Start the development configuration using docker compose:
- Change into the docker compose repository
- Run the following command
docker-compose -f docker-compose.dev.yml up -d
- Run the Pattern Atlas using IntelliJ
- Go to http://localhost:7080/ and login with user admin and password admin
- Add a user by ONLY specifying her name
- Afterwards, under the Credentials tab, you can set a password for this user. Make sure to set the
Temporary
flag tofalse
! - Start the UI (either using Docker or local setup)
- Go to http://localhost:1978 and login. The first user is automatically assigned to the ADMIN role.
IntelliJ
Turn authentication on/off for PatternAtlasAPI
If you don’t need the capabilities of the PatternPediaAuth server during development. You can follow the instructions in the following file Security Config file to turn those off or on. An easier way will be added in a future realease.
Default User
During development default users are
- Admin: name:
admin@mail
password:pass
- Member: name:
member@mail
password:pass
PatternAtlasAPI
—>
- Clone the repository
git clone https://github.com/PatternAtlas/pattern-atlas-api.git
. - Build the repository
mvn package -DskipTests
(skiping the tests for a faster build), Java 8 required. - Clone the repository
git clone https://github.com/PatternAtlas/pattern-atlas-ui.git
. - Build the repository
mvn package -DskipTests
(skiping the tests for a faster build), npm is required. (plus yarn, optionally) - Continue your IDE setup:
- Set up database:
- Open Terminal in IntelliJ
- Navigate to directory
..\.docker\
- Insert the following commands
docker-compose up -d
- Open “Database”
- Click the “+”
- Go to “Data Source > PostgresSQL”
- Enter username and password: “postgres” (both)
- Click “Apply”
- Open Terminal in IntelliJ
- Start the application (via the runconfig that you configured in step 5)
Main API Endpoints
API-Root: /
Swagger-UI: http://localhost:1977/swagger-ui
HAL - Browser: On “/” -> redirects to http://localhost:1977/explorer/index.html#uri=/
License
See the NOTICE file(s) distributed with this work for additional information regarding copyright ownership.
This program and the accompanying materials are made available under the Apache Software License 2.0 which is available at https://www.apache.org/licenses/LICENSE-2.0.
SPDX-License-Identifier: Apache-2.0