This project is a Scala 3 application using PostgreSQL for database management and Bleep for build automation.
- Scala 3
- PostgreSQL
- Bleep
Install PostgreSQL on your system and create a database:
createdb carFollow the Bleep installation guide to install Bleep on your system.
-
PostgreSQL Configuration:
Ensure that PostgreSQL is running and properly configured. Set the following environment variables:
export DATABASE_URL="jdbc:postgresql://localhost:5432/car" export DATABASE_USER="myuser" export DATABASE_PASSWORD="mypassword"
-
Application Configuration:
The application uses ZIO Config to load configuration from
application.conf.To set up your configuration:
-
Copy the example configuration file:
cp domain/src/resources/application.conf.example domain/src/resources/application.conf
-
Edit the
application.conffile with your settings:- WebDAV/NextCloud connection settings (username, password, URL)
- Authentication settings (secret key, token expiration)
-
For production, you can set environment variables instead:
NEXTCLOUD_USERNAME- Your NextCloud usernameNEXTCLOUD_PASSWORD- Your NextCloud passwordNEXTCLOUD_URL- Your NextCloud URLNEXTCLOUD_BASE_PATH- Base path for files (default: "voiture")AUTH_SECRET_KEY- Secret key for JWT token generationAUTH_TOKEN_EXPIRATION_SECONDS- Token expiration time in seconds
Note: The
application.conffile is excluded from version control to prevent committing sensitive data. -
-
Bleep Configuration:
Initialize Bleep in your project directory:
bleep new
To compile the project, run:
bleep compile webTo run the project, use:
bleep run webTo execute tests, run:
bleep test repository-test-postgresdomain/: Core business logic, models, service traitsrepository-postgres/: PostgreSQL persistence using Doobie + Flywayremote-storage/: WebDAV/NextCloud file storageweb/: HTTP API layer using Tapirbleep.yaml: Bleep build configuration file
This project uses Flyway for database migrations. Migration files are located in repository-postgres/src/resources/db/migration/.
Migrations are automatically applied on application startup.
- Scala 3 Documentation
- PostgreSQL Documentation
- Bleep Documentation
- Doobie Documentation
- Flyway Documentation
This project is licensed under the MIT License. See the LICENSE file for details.