feat: refactor service organization and update imports

- Introduced a new structure for services in `src/services/` to improve organization by domain, including core, analytics, data management, integrations, and task management.
- Moved relevant files to their new locations and updated all internal and external imports accordingly.
- Updated `TODO.md` to reflect the new service organization and outlined phases for further refactoring.
This commit is contained in:
Julien Froidefond
2025-09-23 10:10:34 +02:00
parent ee64fe2ff3
commit f88954bf81
34 changed files with 98 additions and 33 deletions

View File

@@ -1,5 +1,5 @@
import { NextRequest, NextResponse } from 'next/server';
import { prisma } from '@/services/database';
import { prisma } from '@/services/core/database';
/**
* Route GET /api/jira/logs

View File

@@ -1,6 +1,6 @@
import { NextResponse } from 'next/server';
import { createJiraService, JiraService } from '@/services/jira';
import { userPreferencesService } from '@/services/user-preferences';
import { userPreferencesService } from '@/services/core/user-preferences';
import { jiraScheduler } from '@/services/jira-scheduler';
/**

View File

@@ -1,6 +1,6 @@
import { NextRequest, NextResponse } from 'next/server';
import { createJiraService } from '@/services/jira';
import { userPreferencesService } from '@/services/user-preferences';
import { userPreferencesService } from '@/services/core/user-preferences';
/**
* POST /api/jira/validate-project

View File

@@ -1,5 +1,5 @@
import { NextRequest, NextResponse } from 'next/server';
import { userPreferencesService } from '@/services/user-preferences';
import { userPreferencesService } from '@/services/core/user-preferences';
import { JiraConfig } from '@/lib/types';
/**

View File

@@ -1,5 +1,5 @@
import { NextRequest, NextResponse } from 'next/server';
import { userPreferencesService } from '@/services/user-preferences';
import { userPreferencesService } from '@/services/core/user-preferences';
/**
* GET /api/user-preferences - Récupère toutes les préférences utilisateur

View File

@@ -1,4 +1,4 @@
import { userPreferencesService } from '@/services/user-preferences';
import { userPreferencesService } from '@/services/core/user-preferences';
import { JiraDashboardPageClient } from './JiraDashboardPageClient';
// Force dynamic rendering

View File

@@ -4,7 +4,7 @@ import "./globals.css";
import { ThemeProvider } from "@/contexts/ThemeContext";
import { JiraConfigProvider } from "@/contexts/JiraConfigContext";
import { UserPreferencesProvider } from "@/contexts/UserPreferencesContext";
import { userPreferencesService } from "@/services/user-preferences";
import { userPreferencesService } from "@/services/core/user-preferences";
const geistSans = Geist({
variable: "--font-geist-sans",

View File

@@ -1,4 +1,4 @@
import { userPreferencesService } from '@/services/user-preferences';
import { userPreferencesService } from '@/services/core/user-preferences';
import { IntegrationsSettingsPageClient } from '@/components/settings/IntegrationsSettingsPageClient';
// Force dynamic rendering for real-time data

View File

@@ -1,4 +1,4 @@
import { SystemInfoService } from '@/services/system-info';
import { SystemInfoService } from '@/services/core/system-info';
import { SettingsIndexPageClient } from '@/components/settings/SettingsIndexPageClient';
// Force dynamic rendering (no static generation)