diff --git a/README.md b/README.md
index efb69a59..1e616eb6 100644
--- a/README.md
+++ b/README.md
@@ -3,6 +3,12 @@
### Local Development
At present, local development is conducted using our [All-In-One](https://github.com/hms-dbmi/pic-sure-all-in-one) Virtual Box. We offer implementations for both [CentOS](https://github.com/hms-dbmi/pic-sure-all-in-one/tree/master) and [Redhat](https://github.com/hms-dbmi/pic-sure-all-in-one/tree/feature/redhat) based operating systems. To get started, please consult the [README](https://github.com/hms-dbmi/pic-sure-all-in-one/tree/master#readme) section of the [All-In-One](https://github.com/hms-dbmi/pic-sure-all-in-one) repository.
+Before contributing code, please set up our git hook:
+`cp code-formatting/pre-commit.sh .git/hooks/pre-commit`
+To skip formatting on a block of code, wrap in `spotless:off`, `spotless:on` comments
+
+
+
#### To add an initial top admin user in the system
If you follow the steps above, spins up the docker containers and you can see the login page in the browser, you are almost there.
diff --git a/code-formatting/eclipse-formatter.xml b/code-formatting/eclipse-formatter.xml
new file mode 100644
index 00000000..e7cfabab
--- /dev/null
+++ b/code-formatting/eclipse-formatter.xml
@@ -0,0 +1,402 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/code-formatting/pre-commit.sh b/code-formatting/pre-commit.sh
new file mode 100755
index 00000000..ed051d18
--- /dev/null
+++ b/code-formatting/pre-commit.sh
@@ -0,0 +1,28 @@
+#!/bin/sh -e
+CWD=$(pwd)
+cd $(git rev-parse --show-toplevel)
+format_cmd=""
+
+# skip if NO_VERIFY env var set
+if [ "$NO_VERIFY" ]; then
+ echo 'code formatting skipped' 1>&2
+ exit 0
+fi
+
+# I'm not great at bash, so this is a bit ugly, but I'll explain each pipe
+# 1. Get all staged files
+# 2. Reduce to just .java files
+# 3. Replace newlines with commas (this was really hard to do in sed)
+# 4. Replace commas with $,^.*
+# 5. Crop off the last 4 chars
+# This results in foo.java$,^.*bar.java$,^.*baz.java$
+# I then append ^.* to the beginning of that.
+STAGED_JAVA_FILES_AS_REGEX=$(git diff --staged --name-only --diff-filter=ACMR | grep '.java$' | tr '\n' ',' | sed -e 's/,/$,^.*/g' | sed 's/.\{4\}$//')
+FILES_TO_RESTAGE=$(git diff --staged --name-only --diff-filter=ACMR)
+if [ -n "$STAGED_JAVA_FILES_AS_REGEX" ]; then
+ echo "Found the following staged java files to format: $STAGED_JAVA_FILES_AS_REGEX"
+ mvn spotless:apply -DspotlessFiles=^.*$STAGED_JAVA_FILES_AS_REGEX
+ git add $FILES_TO_RESTAGE
+fi
+
+cd $CWD
\ No newline at end of file
diff --git a/pic-sure-auth-services/pom.xml b/pic-sure-auth-services/pom.xml
index 0bc59189..6f836b10 100644
--- a/pic-sure-auth-services/pom.xml
+++ b/pic-sure-auth-services/pom.xml
@@ -28,6 +28,7 @@
21
+ 2.41.1
@@ -213,6 +214,20 @@
org.springframework.boot
spring-boot-maven-plugin
+
+ com.diffplug.spotless
+ spotless-maven-plugin
+ ${spotless.version}
+
+
+
+ 4.26
+ code-formatting/eclipse-formatter.xml
+
+
+
+
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index f0a497ad..6042774b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,22 +1,46 @@
-
- 4.0.0
- edu.harvard.hms.dbmi.avillach.picsure.auth.microapp
- pic-sure-auth-microapp
- 2.0-SNAPSHOT
- pom
- pic-sure-auth-microapp
-
- pic-sure-auth-services
-
-
-
- github
- GitHub HMS-DBMI Apache Maven Packages
- https://maven.pkg.github.com/hms-dbmi/pic-sure
-
- true
-
-
-
+
+ 4.0.0
+ edu.harvard.hms.dbmi.avillach.picsure.auth.microapp
+ pic-sure-auth-microapp
+ 2.0-SNAPSHOT
+ pom
+ pic-sure-auth-microapp
+
+ 2.41.1
+
+
+ pic-sure-auth-services
+
+
+
+ github
+ GitHub HMS-DBMI Apache Maven Packages
+ https://maven.pkg.github.com/hms-dbmi/pic-sure
+
+ true
+
+
+
+
+
+
+
+ com.diffplug.spotless
+ spotless-maven-plugin
+ ${spotless.version}
+
+
+
+ 4.26
+ code-formatting/eclipse-formatter.xml
+
+
+
+
+
+
+
+