This project is a demonstration of an online raffle system developed using Vaadin Flow, Docker, Traefik, Terraform, and Ansible. It provides a platform where users can create, manage, and participate in raffles securely and at scale.
- User registration via OAuth2 authentication or self-registration.
- Editable user profile with personal information and password change.
- Event creation with configurable collaborators and permissions.
- Participant management through manual entry or import from CSV file.
- Personalized dashboard displaying subscribed events for the user.
- Ability to reuse participant lists from previous events.
- Raffle generation with specification of prizes and available ticket quantity.
- Raffle ticket sales and payment management.
- Public links for sharing raffles.
- Java 17 or higher.
- Vaadin 24
- Spring Boot 3
- Maven 3.x.
- Docker and Docker Compose.
- Traefik
- Terraform.
- Ansible.
MainLayout.java
insrc/main/java
contains the navigation setup (i.e., the side/top bar and the main menu). This setup uses App Layout.views
package insrc/main/java
contains the server-side Java views of your application.views
folder infrontend/
contains the client-side JavaScript views of your application.themes
folder infrontend/
contains the custom CSS styles.
To deploy the Online Raffle System, follow these steps:
- Clone the repository
git clone https://github.com/fredpena/raffle
docker-compose up
- Running the application
The project is a standard Maven project. To run it from the command line,
type mvnw
(Windows), or ./mvnw
(Mac & Linux), then open
http://localhost:8080
in your browser.
To create a production build, call mvnw clean package -Pproduction
(Windows),
or ./mvnw clean package -Pproduction
(Mac & Linux).
This will build a JAR file with all the dependencies and front-end resources,
ready to be deployed. The file can be found in the target
folder after the build completes.
Once the JAR file is built, you can run it using
java -jar target/raffle.jar
To build the Dockerized version of the project, run
mvn clean package -Pproduction
docker build -t raffle:latest .
docker buildx build --platform=linux/amd64 -o type=docker -t raffle:latest .
Once the Docker image is correctly built, you can test it locally using
docker run -p 8080:8080 raffle:latest
- Use Terraform to provision the necessary infrastructure resources.
- Use Ansible to configure and deploy the application on the provisioned infrastructure.
For detailed deployment instructions and customization options, please refer to the Deployment Guide.
If you'd like to contribute to this project, follow these steps:
- Fork this repository.
- Create a new branch for your feature or enhancement:
git checkout -b branch-name
. - Make your changes and commit them:
git commit -m "Description of changes"
. - Push your changes to the remote repository:
git push origin branch-name
. - Open a pull request on GitHub.
If you have any questions or suggestions, you can contact the development team via email.