No description
  • Scala 99.5%
  • Dockerfile 0.5%
Find a file
Charles Ilieff 47915c2773
All checks were successful
CI Pipeline / Run Tests (push) Successful in 54s
CI Pipeline / Deploy to Coolify (push) Successful in 1s
Enhance trip retrieval: update SQL query to group drivers and improve logging
2026-03-08 18:52:32 +01:00
.github/workflows Update environment variable references in CI pipeline 2026-03-01 09:51:16 +01:00
.junie Remove unused Gel-related database models, repository implementations, and configuration files following migration to Postgres. 2026-01-24 20:45:50 +01:00
domain Add iCal support for trips and enhance documentation 2026-03-08 17:02:26 +01:00
domain-test/src Add Nextcloud configuration to .env.example and update reimbursement proposal method names 2025-11-11 18:16:34 +01:00
remote-storage Add Nextcloud configuration to .env.example and update reimbursement proposal method names 2025-11-11 18:16:34 +01:00
remote-storage-test/src Revert "Replace configuration files with .example files for test modules and update .gitignore." 2025-08-27 23:43:57 +02:00
repository-postgres/src Enhance trip retrieval: update SQL query to group drivers and improve logging 2026-03-08 18:52:32 +01:00
repository-test-postgres/src/scala Enhance trip retrieval: update SQL query to group drivers and improve logging 2026-03-08 18:52:32 +01:00
web/src Enhance trip retrieval: update SQL query to group drivers and improve logging 2026-03-08 18:52:32 +01:00
.env.exemple ff 2026-02-23 22:33:58 +01:00
.gitignore Remove createReimbursementInvoice method and related logic 2025-08-30 17:39:02 +02:00
.nixpacks.toml update scala 2025-03-14 09:53:08 +01:00
.scalafix.conf first commit 2025-02-08 17:26:12 +01:00
.scalafmt.conf first commit 2025-02-08 17:26:12 +01:00
.sdkmanrc ff 2026-02-23 22:33:58 +01:00
bleep.yaml Add iCal support for trips and enhance documentation 2026-03-08 17:02:26 +01:00
CLAUDE.md Add iCal support for trips and enhance documentation 2026-03-08 17:02:26 +01:00
CONFIGURATION_CHANGES.md Introduce centralized application configuration using ZIO Config 2025-08-08 13:59:06 +02:00
docker-compose.yml Remove unused Gel-related database models, repository implementations, and configuration files following migration to Postgres. 2026-01-24 20:45:50 +01:00
Dockerfile Add database migration resources to Docker image 2026-01-24 21:23:29 +01:00
GEMINI.md Remove unused Gel-related database models, repository implementations, and configuration files following migration to Postgres. 2026-01-24 20:45:50 +01:00
qodana.yaml Add qodana.yaml file 2025-08-06 15:36:06 +00:00
README.md test 2026-02-19 22:42:49 +01:00
REFACTORING_SUGGESTIONS.md Simplify and reorganize refactoring suggestions document 2025-09-28 13:58:22 +02:00
test.pdf Add delete functionality to WebDav invoice storage and update tests 2025-08-06 16:53:38 +02:00

Car Sharing Backend

This project is a Scala 3 application using PostgreSQL for database management and Bleep for build automation. Test

Prerequisites

  • Scala 3
  • PostgreSQL
  • Bleep

Setup

Install PostgreSQL

Install PostgreSQL on your system and create a database:

createdb car

Install Bleep

Follow the Bleep installation guide to install Bleep on your system.

Configuration

  1. 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"
    
  2. 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.conf file 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 username
      • NEXTCLOUD_PASSWORD - Your NextCloud password
      • NEXTCLOUD_URL - Your NextCloud URL
      • NEXTCLOUD_BASE_PATH - Base path for files (default: "voiture")
      • AUTH_SECRET_KEY - Secret key for JWT token generation
      • AUTH_TOKEN_EXPIRATION_SECONDS - Token expiration time in seconds

    Note: The application.conf file is excluded from version control to prevent committing sensitive data.

  3. Bleep Configuration:

    Initialize Bleep in your project directory:

    bleep new
    

Usage

Compile the Project

To compile the project, run:

bleep compile web

Run the Project

To run the project, use:

bleep run web

Test the Project

To execute tests, run:

bleep test repository-test-postgres

Project Structure

  • domain/: Core business logic, models, service traits
  • repository-postgres/: PostgreSQL persistence using Doobie + Flyway
  • remote-storage/: WebDAV/NextCloud file storage
  • web/: HTTP API layer using Tapir
  • bleep.yaml: Bleep build configuration file

Database Migrations

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.

Additional Resources

License

This project is licensed under the MIT License. See the LICENSE file for details.