Skip to content

Run the sample

The repository includes a demo shop (products, categories, tags, customers and orders) with every feature switched on. It's the fastest way to see the console.

Requirements

Tool Version
JDK 17 or newer
Maven Included as the wrapper (./mvnw, or mvnw.cmd on Windows)
Node.js & npm 20 or newer, needed only to build the UI from source

Build and start

npm ci --prefix jpa-admin-ui          # install the UI's locked dependencies
./mvnw clean package                  # build everything and run the Java tests
java -jar jpa-admin-sample-app/target/jpa-admin-sample-app-0.1.0.jar

Open http://localhost:8080/admin/ and sign in with admin / admin.

Demo credentials

admin / admin is a fallback in the sample's application.yml for local use only. Override it with environment variables: ADMIN_USERNAME=store-admin ADMIN_PASSWORD=… java -jar …

What to try

  • Dashboard


    Record counts, the "Records created" chart, and records you recently viewed.

  • Products


    Filter by category or price range, save the view, then edit a stock quantity in place.

  • Orders


    Open an order and edit its line items directly in the order form.

  • Product images


    Drag an image onto a product. Files are saved to ./uploads and served from /uploads.

  • Tags


    Assign several tags to a product with the many-to-many multi-select.

  • Shortcuts


    Press Cmd+K (or Ctrl+K) for the command palette, or ? for every shortcut.

Sample data

The sample uses an in-memory H2 database, seeded on every start with 3 categories, 5 products (images, tags, rich-text copy and a JSON spec on the first), 4 tags, 4 customers and 3 orders with line items. Data resets when the process restarts; uploaded files stay in ./uploads.

The sample's entities in jpa-admin-sample-app/…/domain are a good reference for every annotation.

Useful variations

# Another port
java -jar jpa-admin-sample-app/target/jpa-admin-sample-app-0.1.0.jar --server.port=8081

# Serve the console from /backoffice instead of /admin
java -jar jpa-admin-sample-app/target/jpa-admin-sample-app-0.1.0.jar --spring.jpa.admin.path=/backoffice

# Try your own brand color
java -jar jpa-admin-sample-app/target/jpa-admin-sample-app-0.1.0.jar --spring.jpa.admin.primary-color='#2563eb'

To work on the UI with live reload, see Development.