A comprehensive event attendance tracking platform consisting of a Spring Boot backend, Next.js web dashboard, and an Android capture application.
Ensure you have the following installed:
- Container Engine: Docker Desktop (Mac/Windows) or Docker Engine + Docker Compose (Linux).
- Java: JDK 21 (Temurin or OpenJDK).
- Node.js: Version 24+ (via
nvmormise). - Android: Android Studio (for the Capture app).
The project relies on environment variables for database connections and API configurations.
- Copy the example environment file to
.env:cp .env.example .env
- Open
.envand ensure theDB_URLis set correctly for JDBC:DB_PORT=5432 DB_NAME=attendex DB_USERNAME=attendex DB_PASSWORD=attendex # Ensure this line exists for Spring Boot: DB_URL=jdbc:postgresql://localhost:5432/attendex
We use Docker Compose to run the database.
Start the Database:
docker compose up -dStop the Database:
docker compose downNote: The
compose.yamlincludes volume mounts for data persistence. If you need to wipe the database completely, rundocker compose down -v.
Located in the /platform directory. Built with Spring Boot and Maven.
Important: You must load the environment variables into your shell before running the app, or Flyway/Database connections will fail.
Running from Terminal:
cd platform
# 1. Export variables from .env (run this once per session)
set -a; source ../.env; set +a
# 2. Run the application
./mvnw spring-boot:runRunning from IntelliJ IDEA:
- Install the EnvFile plugin.
- Edit your Run Configuration for
PlatformApplication. - In the "EnvFile" tab, enable it and add the
.envfile from the project root.
Located in the /web directory. Built with Next.js.
cd web
# 1. Install dependencies
npm install
# 2. Setup Environment
# Copy the root env file.
# IMPORTANT: Ensure NEXT_PUBLIC_API_URL=http://localhost:8080 is present in .env.local
cp ../.env .env.local
# 3. Run the development server
npm run devAccess the dashboard at: http://localhost:3000
Located in the /capture directory. Built with Kotlin and Jetpack Compose.
- Open the
/capturefolder in Android Studio. - Sync Gradle project.
- Network Configuration:
- The Android Emulator cannot access
localhost. - Open
capture/app/build.gradle.kts. - Update
API_BASE_URLto your computer's local network IP (e.g.,192.168.1.x:8080) or use10.0.2.2:8080if using the standard Android Emulator.
- The Android Emulator cannot access
- Run on an emulator or physical device.
This means the DB_URL variable was not expanded before Java started.
Fix: Run set -a; source ../.env; set +a in your terminal before running ./mvnw.
If you are on Linux (Fedora/RHEL/CentOS) and the database logs permission errors regarding /var/lib/postgresql/data.
Fix: Ensure your compose.yaml volume mount ends with :Z (e.g., /var/lib/postgresql/data:Z). This flag is generally ignored by Docker on Mac/Windows but required on SELinux systems.
Check if an old container is running (orphaned) or if you have a local Postgres service installed. Fix:
docker ps -a
docker stop attendex
docker rm attendex