Development
Development workflow
The default development path is script-driven and Docker-based:
- copy
docker\dev\.env.exampletodocker\dev\.env - run
.\scripts\start-dev.ps1 - make code or docs changes
- run the relevant build or test command
- stop the environment with the repository stop script
Dev-only auth helper
For faster local testing, the backend now exposes a dev-profile-only helper endpoint:
POST /api/v1/auth/dev-login
Send a username in the request body and the backend returns a normal auth response with access and refresh tokens.
Example:
{
"username": "admin"
}
For quick browser testing, you can also open:
/api/v1/auth/dev-login?username=admin
The admin login page also exposes dev-only helper buttons so you can sign in as the default admin or reset that admin account without using the browser console.
The backend reset endpoint is:
POST /api/v1/auth/dev-reset-admin
This is intentionally limited to the dev profile so password storage and the normal login flow stay unchanged.
Frontend stack
- Vue 3
- TypeScript
- Vite
- Vue Router
- Pinia
- Axios
Backend stack
- Java 25
- Spring Boot 4.0.5
- Spring Security
- Spring Data JPA
- MariaDB
- Redis
- Flyway
Main code areas
The current codebase is split into three main working areas:
backend\for Spring Boot APIs, security, entities, services, and persistencefrontend\for the Vue admin and voter applicationwebsite\for Docusaurus documentation
Key implementation areas
Frontend
frontend/src/components/common/wizard/frontend/src/composables/useWizard.tsfrontend/src/views/admin/AdminElectionFormView.vuefrontend/src/views/admin/AdminUsersView.vuefrontend/src/views/voter/VoterElectionView.vuefrontend/src/views/voter/VoteConfirmView.vue
Backend
backend/src/main/java/at/ftmahringer/wahlsystem/controller/backend/src/main/java/at/ftmahringer/wahlsystem/service/ElectionService.javabackend/src/main/java/at/ftmahringer/wahlsystem/service/VotingService.javabackend/src/main/java/at/ftmahringer/wahlsystem/service/UserManagementService.java
Validation commands
Frontend
Set-Location .\frontend
npm run build
Backend
Set-Location .\backend
java -classpath .mvn\wrapper\maven-wrapper.jar "-Dmaven.multiModuleProjectDirectory=F:\projects\Wahl\backend" org.apache.maven.wrapper.MavenWrapperMain test
Docs
Set-Location .\website
npm run build
Notes
- The Maven wrapper batch file can fail when
JAVA_HOMEis missing, even if Java is installed globally. - The Docker backend startup was hardened to call the wrapper JAR directly inside the container instead of relying on shell execution of
mvnw. - The backend test setup uses H2 for the test profile.
types-and-ideas.txtis still kept as a backlog/reference document because it contains future election types that are not implemented yet.