matthieu e4fc34b90f refactor : simplify codebase and fix critical issues
Backend:
- Add MCP Serializer to centralize entity-to-array conversion (~300 lines deduped)
- Fix race condition in task/ticket number generation (SELECT FOR UPDATE + transaction)
- Add unique constraint on task (project_id, number) with migration
- Fix MIME type validation: use server-detected finfo instead of client-supplied type
- Add allowlist of permitted MIME types for uploads
- Fix TaskDocumentDownloadController: allow ROLE_CLIENT access, add priority:1
- Fix notification sent even when ticket status unchanged
- Remove redundant exception constructors
- Simplify services (BookStackApi double fetch, TokenEncryptor, GiteaApi)
- Consolidate duplicate checks in processors

Frontend:
- Fix useApi isHandlingUnauthorized scope (module-level to prevent double 401 redirect)
- Fix client-tickets toast key copy-paste bug
- Merge duplicated tasks service methods (getByProject + getByProjectArchived)
- Extract shared uploadWithRelation helper in task-documents service
- Extract formatFileSize utility from duplicated component code
- Extract status transition logic into useClientTicketHelpers composable
- Remove dead code (unused router, handleLogout, empty script blocks)
- Merge duplicate watchers and onMounted calls
- Normalize arrow functions to function declarations per convention

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 22:09:16 +01:00
2026-03-08 19:47:19 +01:00
2026-03-08 19:47:19 +01:00
2026-03-08 19:47:19 +01:00
2026-03-08 19:47:19 +01:00
2026-03-08 19:47:19 +01:00
2026-03-08 19:47:19 +01:00
2026-03-08 19:47:19 +01:00
2026-03-08 19:47:19 +01:00
2026-03-08 19:47:19 +01:00
2026-03-08 19:47:19 +01:00
2026-03-08 19:47:19 +01:00
2026-03-08 19:47:19 +01:00
2026-03-08 19:47:19 +01:00

Lesstime

Application de gestion de projet. Symfony 8 + API Platform 4 + Nuxt 4.

MCP Server

Lesstime expose un serveur MCP (Model Context Protocol) permettant aux assistants IA (Claude Code, ChatGPT, Codex) d'interagir avec les projets, tâches et le suivi du temps.

Tools disponibles (22)

Domaine Tools
Reference list-users, list-clients
Project list-projects, get-project, create-project, update-project
Task list-tasks, get-task, create-task, update-task, delete-task
TaskMeta list-statuses, list-priorities, list-efforts, list-tags, list-groups, create-group, update-group
TimeEntry list-time-entries, create-time-entry, update-time-entry, delete-time-entry

Transports

Transport Usage Auth
STDIO Claude Code sur la machine locale Aucune
HTTP (/_mcp) Clients MCP sur le réseau local API token (Authorization: Bearer <token>)

Configuration locale (STDIO)

{
  "mcpServers": {
    "lesstime": {
      "command": "docker",
      "args": ["exec", "-i", "php-lesstime-fpm", "php", "bin/console", "mcp:server"]
    }
  }
}

Configuration réseau (HTTP)

{
  "mcpServers": {
    "lesstime": {
      "type": "url",
      "url": "http://<ip-serveur>:8082/_mcp",
      "headers": {
        "Authorization": "Bearer <api-token>"
      }
    }
  }
}

Gestion des tokens API

# Générer un token pour un utilisateur
docker exec -u www-data php-lesstime-fpm php bin/console app:generate-api-token <username>

Mise en production (réseau local)

  1. Déployer le code sur le serveur
  2. composer install --no-dev --optimize-autoloader
  3. php bin/console doctrine:migrations:migrate --no-interaction
  4. php bin/console cache:clear --env=prod
  5. docker restart nginx-lesstime
  6. php bin/console app:generate-api-token admin — noter le token
  7. Ouvrir le port 8082 sur le firewall du serveur (LAN uniquement)
  8. Configurer les clients MCP avec l'URL http://<ip-serveur>:8082/_mcp + le token
Description
No description provided
Readme 1.8 MiB
v0.3.18 Latest
2026-04-02 10:14:43 +00:00
Languages
PHP 48.2%
Vue 43.7%
TypeScript 6.1%
Dockerfile 0.7%
CSS 0.5%
Other 0.8%