# Routes API Prokov
# Gestion de projets et tâches

app: prokov
version: "1.0"
base_path: /api

# Identification par hostname
hosts:
  - prokov.unikoffice.com
  - prokov.sogoms.com

# Base de données
database:
  host: 13.23.33.4
  port: 3306
  user: prokov_user
  password_file: /secrets/prokov_db_pass
  name: prokov

# Authentification
auth:
  jwt_secret_file: /secrets/prokov_jwt_secret
  jwt_expiry: 24h

# Logs
logs:
  retention_days: 30

# SMTP
smtp:
  host: barbotte.o2switch.net
  port: 465
  user: prokov@unikoffice.com
  password_file: /secrets/prokov_smtp_pass
  from: prokov@unikoffice.com
  from_name: Prokov
  tls: true  # false = STARTTLS (587), true = TLS direct (465)

# Routes
routes:
  # === AUTH ===
  - path: /auth/register
    method: POST
    scenario: prokov/auth/register
    auth: false

  - path: /auth/login
    method: POST
    scenario: prokov/auth/login
    auth: false

  - path: /auth/logout
    method: POST
    scenario: prokov/auth/logout

  - path: /auth/me
    method: GET
    scenario: prokov/auth/me

  # === PROJECTS ===
  - path: /projects
    method: GET
    scenario: prokov/projects/list

  - path: /projects
    method: POST
    scenario: prokov/projects/create

  - path: /projects/{id}
    method: GET
    scenario: prokov/projects/show

  - path: /projects/{id}
    method: PUT
    scenario: prokov/projects/update

  - path: /projects/{id}
    method: DELETE
    scenario: prokov/projects/delete

  # === TASKS ===
  - path: /tasks
    method: GET
    scenario: prokov/tasks/list

  - path: /tasks
    method: POST
    scenario: prokov/tasks/create

  - path: /tasks/{id}
    method: GET
    scenario: prokov/tasks/show

  - path: /tasks/{id}
    method: PUT
    scenario: prokov/tasks/update

  - path: /tasks/{id}
    method: DELETE
    scenario: prokov/tasks/delete

  # === TAGS ===
  - path: /tags
    method: GET
    scenario: prokov/tags/list

  - path: /tags
    method: POST
    scenario: prokov/tags/create

  - path: /tags/{id}
    method: GET
    scenario: prokov/tags/show

  - path: /tags/{id}
    method: PUT
    scenario: prokov/tags/update

  - path: /tags/{id}
    method: DELETE
    scenario: prokov/tags/delete

  # === STATUSES ===
  - path: /statuses
    method: GET
    scenario: prokov/statuses/list

  - path: /statuses
    method: POST
    scenario: prokov/statuses/create

  - path: /statuses/{id}
    method: GET
    scenario: prokov/statuses/show

  - path: /statuses/{id}
    method: PUT
    scenario: prokov/statuses/update

  - path: /statuses/{id}
    method: DELETE
    scenario: prokov/statuses/delete
