No description
  • Scala 99.5%
  • Dockerfile 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Charles Ilieff 67da016c15
Some checks failed
CI Pipeline / Run Tests (push) Failing after 1m12s
CI Pipeline / Deploy to Coolify (push) Has been skipped
Read the Coolify API URL from repo variables, not secrets
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 11:35:37 +02:00
.github/workflows Read the Coolify API URL from repo variables, not secrets 2026-08-02 11:35:37 +02: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 Give trips a start and end time, not just a day 2026-08-01 17:42:24 +02:00
domain-test/src Gate calendar endpoint with shared CALENDAR_SECRET token 2026-05-06 16:44:43 +02: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 Gate calendar endpoint with shared CALENDAR_SECRET token 2026-05-06 16:44:43 +02:00
remote-tracking/src/scala/traccar Extract Traccar car-location into remote-tracking module 2026-05-11 11:45:39 +02:00
repository-postgres/src Make the test suite run under bleep 1.x 2026-08-01 18:33:48 +02:00
repository-test-postgres/src/scala Make the test suite run under bleep 1.x 2026-08-01 18:33:48 +02:00
test-support/src/scala/zio/test/sbt Make the test suite run under bleep 1.x 2026-08-01 18:33:48 +02:00
web/src Gate car-location endpoint behind bearer auth 2026-05-11 12:06:42 +02:00
.env.exemple Gate car-location endpoint behind bearer auth 2026-05-11 12:06:42 +02: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 Move the build to bleep 1.0.0-M11 and Java 21 2026-08-01 18:11:16 +02:00
AGENTS.md Make the test suite run under bleep 1.x 2026-08-01 18:33:48 +02:00
bleep.yaml Make the test suite run under bleep 1.x 2026-08-01 18:33:48 +02:00
CLAUDE.md Make the test suite run under bleep 1.x 2026-08-01 18:33:48 +02: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 Move the build to bleep 1.0.0-M11 and Java 21 2026-08-01 18:11:16 +02: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.