A full-stack e-commerce platform built with Spring Boot, Vaadin, and Stripe, featuring product management, checkout flow, invoice generation, and an admin dashboard.
DeBear is a complete e-commerce system that handles the full lifecycle of an online purchase:
- Browse products
- Add to cart
- Checkout with Stripe
- Generate invoices (PDF)
- Admin dashboard for products, customers, and orders
- Spring Boot
- Vaadin (server-side UI)
- Maven
- Stripe API
- Java PDF generation
Create a .env file in the root directory:
DATABASE_USER=your_db_user
DATABASE_PASSWORD=your_db_password
DATABASE_PORT=5432
STRIPE_PUBLIC_KEY=your_stripe_public_key
STRIPE_SECRET_KEY=your_stripe_secret_key
STRIPE_WEBHOOK_SECRET=your_webhook_secretNever commit this file.
spring.datasource.username=${DATABASE_USER}
spring.datasource.password=${DATABASE_PASSWORD}
server.port=${DATABASE_PORT}
stripe.public.key=${STRIPE_PUBLIC_KEY}
stripe.secret.key=${STRIPE_SECRET_KEY}
stripe.webhook.secret=${STRIPE_WEBHOOK_SECRET}There are two main ways to run the application:
mvn spring-boot:runRun the Application.java class directly.
- Right click on a project folder and select
Run As-->Maven build... After that a configuration window is opened. - In the window set the value of the Goals field to
spring-boot:run - You can optionally select
Skip testscheckbox - All the other settings can be left to default
Once configurations are set clicking Run will start the application
- Open the Maven panel (right side)
- Navigate to:
Plugins β spring-boot β spring-boot:run - Click the run button
- Optional: enable "Skip Tests"
- On the right side of the window, select Maven --> Plugins-->
spring-boot-->spring-boot:rungoal - Optionally, you can disable tests by clicking on a
Skip Tests modeblue button.
Clicking on the green run button will start the application.
After the application has started, you can view your it at http://localhost:8080/ in your browser.
If you want to run the application locally in the production mode, use spring-boot:run -Pproduction command instead.
- Right click the project
- Select:
Run As β Maven build - Set goal to:
spring-boot:run - Click Run
Once started, open:
src/
βββ main/
β βββ java/ # Backend logic
β βββ resources/ # Config files
β βββ frontend/ # Vaadin UI
βββ test/
Vaadin web applications are full-stack and include both client-side and server-side code in the same project.
| Directory | Description |
|---|---|
src/main/frontend/ |
Client-side source directory |
Β Β Β Β index.html |
HTML template |
Β Β Β Β index.ts |
Frontend entrypoint |
Β Β Β Β main-layout.ts |
Main layout Web Component (optional) |
Β Β Β Β views/ |
UI views Web Components (TypeScript / HTML) |
Β Β Β Β styles/ |
Styles directory (CSS) |
src/main/java/<groupId>/ |
Server-side source directory |
Β Β Β Β Application.java |
Server entrypoint |
Β Β Β Β AppShell.java |
application-shell configuration |
- Shopping cart system
- Product & inventory management
- Stripe payment integration
- Checkout flow with tax calculation
- PDF invoice generation
- Admin dashboard
- Create a Stripe account
- Retrieve API keys
- Configure webhook endpoint
- Add values to
.env
- Docker deployment
MIT
This project can be used as a starting point to create your own Vaadin application with Spring Boot. It contains all the necessary configuration and some placeholder files to get you started.
The best way to create your own project based on this starter is start.vaadin.com - you can get only the necessary parts and choose the package naming you want to use.
There are two ways to run the application : using mvn spring-boot:run or by running the Application class directly from your IDE.
You can use any IDE of your preference,but we suggest Eclipse or Intellij IDEA.
Below are the configuration details to start the project using a spring-boot:run command. Both Eclipse and Intellij IDEA are covered.
Run integration tests with:
mvn verify -Pit,productionRequires Vaadin TestBench setup.
Integration tests are implemented using Vaadin TestBench. The tests take a few minutes to run and are therefore included in a separate Maven profile. We recommend running tests with a production build to minimize the chance of development time toolchains affecting test stability. To run the tests using Google Chrome, execute
mvn verify -Pit,production
and make sure you have a valid TestBench license installed.
Profile it adds the following parameters to run integration tests:
-Dwebdriver.chrome.driver=path_to_driver
-Dcom.vaadin.testbench.Parameters.runLocally=chromeIf you would like to run a separate test make sure you have added these parameters to VM Options of JUnit run configuration
This project supports live reload using Spring Boot DevTools:
- Code changes automatically reload the app
- Use a browser LiveReload extension for auto refresh
With live reload, you can see the results of your code changes immediately. When you edit your Java code and recompile it, the application changes will be automatically reloaded and the browser is refreshed. This is done by leveraging Spring Boot Developer Tools. To be able to see the changes in the browser tab, the page still needs to be reloaded. That can also be automated via a LiveReload browser extension. One such extension for Google Chrome is LiveReload. In Firefox, LiveReload - Web extension can be used. You can find such similar extensions for other major browsers too. These extensions add an icon to your browser next to the address bar. To enable the extension, you should click that icon after you opened your application.
You can find more information at Live Reload in Spring Boot Applications document.
The project includes the Spotless code formatter.
To use it in IntelliJ, install the [https://plugins.jetbrains.com/plugin/22455-spotless-applier](IntelliJ plugin)
To use it in VS Code, install the [https://marketplace.visualstudio.com/items?itemName=richardwillis.vscode-spotless-gradle ](VS Code extension)
To use it from the command line, run mvn spotless:apply
- Read the documentation at vaadin.com/docs.
- Follow the tutorials at vaadin.com/tutorials.
- Watch training videos and get certified at vaadin.com/learn/training.
- Create new projects at start.vaadin.com.
- Search UI components and their usage examples at vaadin.com/components.
- View use case applications that demonstrate Vaadin capabilities at vaadin.com/examples-and-demos.
- Discover Vaadin's set of CSS utility classes that enable building any UI without custom CSS in the docs.
- Find a collection of solutions to common use cases in Vaadin Cookbook.
- Find Add-ons at vaadin.com/directory.
- Ask questions on Stack Overflow or join our Discord channel.
- Report issues, create pull requests in GitHub.



