Abmacode12 commited on
Commit
de1ff5d
·
verified ·
1 Parent(s): fce1dec

Pour la suite du projet, j’aimerais que soit activée et créée une IA entièrement dédiée à mon entreprise, qui m’appartienne, afin que je puisse travailler sans limitation.

Browse files

Cette IA devra être capable de générer des images, des vidéos et du contenu, et être intégrée directement dans mon écosystème professionnel pour un usage interne et évolutif.

Cette étape est essentielle pour le développement durable de mon entreprise.

Files changed (4) hide show
  1. ai-dashboard.html +164 -0
  2. components/ai-model-card.js +155 -0
  3. index.html +4 -2
  4. script.js +40 -1
ai-dashboard.html ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="fr">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>CodeFlow Station - IA Entreprise</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://unpkg.com/feather-icons"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <link rel="stylesheet" href="style.css">
11
+ </head>
12
+ <body class="h-screen w-screen overflow-hidden bg-[#0b1622] text-slate-200">
13
+ <!-- Top bar -->
14
+ <header class="h-14 flex items-center justify-between px-4 border-b border-white/10 bg-[#09121b]">
15
+ <div class="flex items-center gap-3">
16
+ <div class="w-8 h-8 rounded-lg bg-white/10 flex items-center justify-center">
17
+ <span class="text-sm font-bold">🤖</span>
18
+ </div>
19
+ <div>
20
+ <div class="text-sm font-semibold leading-none">CodeFlow AI</div>
21
+ <div class="text-[11px] text-slate-400">PRO • IA Entreprise</div>
22
+ </div>
23
+ </div>
24
+
25
+ <div class="flex items-center gap-2">
26
+ <button id="btnRefresh" class="px-3 py-1.5 rounded-lg bg-white/5 hover:bg-white/10 border border-white/10 text-xs">Refresh</button>
27
+ <button id="btnExport" class="px-3 py-1.5 rounded-lg bg-white/5 hover:bg-white/10 border border-white/10 text-xs">Export</button>
28
+ <button class="px-3 py-1.5 rounded-lg bg-indigo-500/20 hover:bg-indigo-500/30 border border-indigo-400/20 text-xs">Documentation</button>
29
+ </div>
30
+
31
+ <div class="flex items-center gap-2">
32
+ <div class="w-8 h-8 rounded-full bg-gradient-to-br from-indigo-500 to-cyan-400"></div>
33
+ <div class="text-sm">admin</div>
34
+ </div>
35
+ </header>
36
+
37
+ <!-- Main content -->
38
+ <main class="h-[calc(100vh-56px)] grid grid-cols-12 gap-0">
39
+ <!-- Left sidebar -->
40
+ <aside class="col-span-3 xl:col-span-2 h-full border-r border-white/10 bg-[#0c1723] p-4 relative">
41
+ <div class="mb-4">
42
+ <div class="flex items-center gap-2 text-sm font-semibold">
43
+ <span class="w-2 h-2 rounded-full bg-emerald-400"></span>
44
+ IA Entreprise
45
+ </div>
46
+ </div>
47
+
48
+ <nav class="space-y-2">
49
+ <a href="#dashboard" class="block px-3 py-2 rounded-xl bg-indigo-500/15 hover:bg-indigo-500/20 border border-indigo-400/20 text-sm">Dashboard</a>
50
+ <a href="#models" class="block px-3 py-2 rounded-xl hover:bg-white/5 border border-transparent hover:border-white/10 text-sm">Modèles</a>
51
+ <a href="#training" class="block px-3 py-2 rounded-xl hover:bg-white/5 border border-transparent hover:border-white/10 text-sm">Entraînement</a>
52
+ <a href="#content" class="block px-3 py-2 rounded-xl hover:bg-white/5 border border-transparent hover:border-white/10 text-sm">Génération</a>
53
+ <a href="#api" class="block px-3 py-2 rounded-xl hover:bg-white/5 border border-transparent hover:border-white/10 text-sm">API</a>
54
+ <a href="#settings" class="block px-3 py-2 rounded-xl hover:bg-white/5 border border-transparent hover:border-white/10 text-sm">Paramètres</a>
55
+ </nav>
56
+
57
+ <div class="absolute bottom-3 left-4 right-4 flex items-center justify-between text-xs text-slate-400">
58
+ <span class="px-2 py-1 rounded-lg bg-white/5 border border-white/10">v1.0.0</span>
59
+ <span>AI Status: <span class="text-emerald-400">Active</span></span>
60
+ </div>
61
+ </aside>
62
+
63
+ <!-- Main panel -->
64
+ <section class="col-span-9 xl:col-span-10 h-full flex flex-col bg-[#0b1622]">
65
+ <!-- Tabs -->
66
+ <div class="h-12 flex items-center gap-2 px-4 border-b border-white/10 bg-[#0c1723]">
67
+ <button class="px-3 py-1.5 rounded-lg bg-indigo-500/20 border border-indigo-400/20 text-xs flex items-center gap-2">
68
+ <i data-feather="activity"></i> Dashboard
69
+ </button>
70
+ <button class="px-3 py-1.5 rounded-lg bg-white/5 border border-white/10 text-xs flex items-center gap-2">
71
+ <i data-feather="cpu"></i> Modèles
72
+ </button>
73
+ <button class="px-3 py-1.5 rounded-lg bg-white/5 border border-white/10 text-xs flex items-center gap-2">
74
+ <i data-feather="database"></i> Données
75
+ </button>
76
+ <div class="ml-auto flex items-center gap-2 text-xs text-slate-400">
77
+ <span class="px-2 py-1 rounded-lg bg-emerald-500/10 border border-emerald-400/20 text-emerald-200">En ligne</span>
78
+ </div>
79
+ </div>
80
+
81
+ <!-- Content -->
82
+ <div class="flex-1 overflow-auto p-6">
83
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
84
+ <!-- Stats cards -->
85
+ <div class="rounded-2xl border border-white/10 bg-white/5 p-4">
86
+ <div class="text-xs text-slate-400 mb-2">Utilisation</div>
87
+ <div class="text-2xl font-bold">78%</div>
88
+ <div class="text-xs text-slate-400 mt-1">Capacité actuelle</div>
89
+ </div>
90
+
91
+ <div class="rounded-2xl border border-white/10 bg-white/5 p-4">
92
+ <div class="text-xs text-slate-400 mb-2">Requêtes</div>
93
+ <div class="text-2xl font-bold">1,248</div>
94
+ <div class="text-xs text-slate-400 mt-1">Aujourd'hui</div>
95
+ </div>
96
+
97
+ <div class="rounded-2xl border border-white/10 bg-white/5 p-4">
98
+ <div class="text-xs text-slate-400 mb-2">Modèles</div>
99
+ <div class="text-2xl font-bold">3</div>
100
+ <div class="text-xs text-slate-400 mt-1">Actifs</div>
101
+ </div>
102
+
103
+ <!-- Generation section -->
104
+ <div class="md:col-span-2 lg:col-span-3 rounded-2xl border border-white/10 bg-white/5 p-4">
105
+ <div class="text-sm font-semibold mb-4">Génération de contenu</div>
106
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
107
+ <button id="btnGenText" class="rounded-xl bg-indigo-500/20 hover:bg-indigo-500/30 border border-indigo-400/20 p-4 flex flex-col items-center">
108
+ <i data-feather="file-text" class="w-6 h-6 mb-2"></i>
109
+ <span class="text-sm">Texte</span>
110
+ </button>
111
+ <button id="btnGenImage" class="rounded-xl bg-indigo-500/20 hover:bg-indigo-500/30 border border-indigo-400/20 p-4 flex flex-col items-center">
112
+ <i data-feather="image" class="w-6 h-6 mb-2"></i>
113
+ <span class="text-sm">Image</span>
114
+ </button>
115
+ <button id="btnGenVideo" class="rounded-xl bg-indigo-500/20 hover:bg-indigo-500/30 border border-indigo-400/20 p-4 flex flex-col items-center">
116
+ <i data-feather="video" class="w-6 h-6 mb-2"></i>
117
+ <span class="text-sm">Vidéo</span>
118
+ </button>
119
+ </div>
120
+ </div>
121
+
122
+ <!-- Recent activity -->
123
+ <div class="md:col-span-2 lg:col-span-3 rounded-2xl border border-white/10 bg-white/5 p-4">
124
+ <div class="text-sm font-semibold mb-4">Activité récente</div>
125
+ <div class="space-y-3">
126
+ <div class="flex items-center gap-3 text-sm">
127
+ <div class="w-8 h-8 rounded-full bg-indigo-500/20 flex items-center justify-center">
128
+ <i data-feather="file-text" class="w-4 h-4"></i>
129
+ </div>
130
+ <div>
131
+ <div>Article de blog généré</div>
132
+ <div class="text-xs text-slate-400">il y a 12 minutes</div>
133
+ </div>
134
+ </div>
135
+ <div class="flex items-center gap-3 text-sm">
136
+ <div class="w-8 h-8 rounded-full bg-indigo-500/20 flex items-center justify-center">
137
+ <i data-feather="image" class="w-4 h-4"></i>
138
+ </div>
139
+ <div>
140
+ <div>Image marketing générée</div>
141
+ <div class="text-xs text-slate-400">il y a 34 minutes</div>
142
+ </div>
143
+ </div>
144
+ <div class="flex items-center gap-3 text-sm">
145
+ <div class="w-8 h-8 rounded-full bg-indigo-500/20 flex items-center justify-center">
146
+ <i data-feather="video" class="w-4 h-4"></i>
147
+ </div>
148
+ <div>
149
+ <div>Vidéo courte générée</div>
150
+ <div class="text-xs text-slate-400">il y a 1 heure</div>
151
+ </div>
152
+ </div>
153
+ </div>
154
+ </div>
155
+ </div>
156
+ </div>
157
+ </section>
158
+ </main>
159
+ <script src="script.js"></script>
160
+ <script>
161
+ feather.replace();
162
+ </script>
163
+ </body>
164
+ </html>
components/ai-model-card.js ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class AIModelCard extends HTMLElement {
2
+ constructor() {
3
+ super();
4
+ this.attachShadow({ mode: 'open' });
5
+ }
6
+
7
+ connectedCallback() {
8
+ const name = this.getAttribute('name') || 'Modèle IA';
9
+ const type = this.getAttribute('type') || 'text';
10
+ const status = this.getAttribute('status') || 'active';
11
+ const lastUsed = this.getAttribute('last-used') || 'N/A';
12
+
13
+ this.shadowRoot.innerHTML = `
14
+ <style>
15
+ .card {
16
+ background: rgba(255, 255, 255, 0.05);
17
+ border: 1px solid rgba(255, 255, 255, 0.1);
18
+ border-radius: 0.75rem;
19
+ padding: 1rem;
20
+ transition: all 0.2s ease;
21
+ }
22
+ .card:hover {
23
+ border-color: rgba(99, 102, 241, 0.5);
24
+ }
25
+ .header {
26
+ display: flex;
27
+ align-items: center;
28
+ margin-bottom: 0.75rem;
29
+ }
30
+ .icon {
31
+ width: 2.5rem;
32
+ height: 2.5rem;
33
+ border-radius: 0.5rem;
34
+ display: flex;
35
+ align-items: center;
36
+ justify-content: center;
37
+ margin-right: 0.75rem;
38
+ }
39
+ .text-icon {
40
+ background: rgba(99, 102, 241, 0.1);
41
+ color: rgba(99, 102, 241, 0.8);
42
+ }
43
+ .image-icon {
44
+ background: rgba(16, 185, 129, 0.1);
45
+ color: rgba(16, 185, 129, 0.8);
46
+ }
47
+ .video-icon {
48
+ background: rgba(236, 72, 153, 0.1);
49
+ color: rgba(236, 72, 153, 0.8);
50
+ }
51
+ .title {
52
+ font-weight: 600;
53
+ flex-grow: 1;
54
+ }
55
+ .status {
56
+ font-size: 0.75rem;
57
+ padding: 0.25rem 0.5rem;
58
+ border-radius: 9999px;
59
+ }
60
+ .active {
61
+ background: rgba(16, 185, 129, 0.1);
62
+ color: rgba(16, 185, 129, 0.8);
63
+ }
64
+ .inactive {
65
+ background: rgba(107, 114, 128, 0.1);
66
+ color: rgba(107, 114, 128, 0.8);
67
+ }
68
+ .training {
69
+ background: rgba(234, 179, 8, 0.1);
70
+ color: rgba(234, 179, 8, 0.8);
71
+ }
72
+ .details {
73
+ font-size: 0.875rem;
74
+ color: rgba(156, 163, 175, 1);
75
+ margin-top: 0.5rem;
76
+ }
77
+ .actions {
78
+ display: flex;
79
+ gap: 0.5rem;
80
+ margin-top: 1rem;
81
+ }
82
+ button {
83
+ flex: 1;
84
+ padding: 0.5rem;
85
+ border-radius: 0.5rem;
86
+ font-size: 0.75rem;
87
+ border: none;
88
+ cursor: pointer;
89
+ transition: all 0.2s ease;
90
+ }
91
+ .primary {
92
+ background: rgba(99, 102, 241, 0.1);
93
+ color: rgba(99, 102, 241, 0.8);
94
+ }
95
+ .primary:hover {
96
+ background: rgba(99, 102, 241, 0.2);
97
+ }
98
+ .secondary {
99
+ background: rgba(255, 255, 255, 0.05);
100
+ color: rgba(255, 255, 255, 0.8);
101
+ }
102
+ .secondary:hover {
103
+ background: rgba(255, 255, 255, 0.1);
104
+ }
105
+ </style>
106
+ <div class="card">
107
+ <div class="header">
108
+ <div class="icon ${type}-icon">
109
+ <i data-feather="${this.getIcon(type)}"></i>
110
+ </div>
111
+ <div class="title">${name}</div>
112
+ <div class="status ${status}">${this.getStatusText(status)}</div>
113
+ </div>
114
+ <div class="details">
115
+ <div>Type: ${this.getTypeText(type)}</div>
116
+ <div>Dernière utilisation: ${lastUsed}</div>
117
+ </div>
118
+ <div class="actions">
119
+ <button class="primary">Utiliser</button>
120
+ <button class="secondary">Configurer</button>
121
+ </div>
122
+ </div>
123
+ `;
124
+ feather.replace();
125
+ }
126
+
127
+ getIcon(type) {
128
+ switch(type) {
129
+ case 'text': return 'file-text';
130
+ case 'image': return 'image';
131
+ case 'video': return 'video';
132
+ default: return 'cpu';
133
+ }
134
+ }
135
+
136
+ getTypeText(type) {
137
+ switch(type) {
138
+ case 'text': return 'Texte';
139
+ case 'image': return 'Image';
140
+ case 'video': return 'Vidéo';
141
+ default: return 'Multimédia';
142
+ }
143
+ }
144
+
145
+ getStatusText(status) {
146
+ switch(status) {
147
+ case 'active': return 'Actif';
148
+ case 'inactive': return 'Inactif';
149
+ case 'training': return 'Entraînement';
150
+ default: return status;
151
+ }
152
+ }
153
+ }
154
+
155
+ customElements.define('ai-model-card', AIModelCard);
index.html CHANGED
@@ -27,8 +27,10 @@
27
  <button id="btnMobile" class="px-3 py-1.5 rounded-lg bg-white/5 hover:bg-white/10 border border-white/10 text-xs">Mobile</button>
28
  <button id="btnRefresh" class="px-3 py-1.5 rounded-lg bg-white/5 hover:bg-white/10 border border-white/10 text-xs">Refresh</button>
29
  <button id="btnExport" class="px-3 py-1.5 rounded-lg bg-white/5 hover:bg-white/10 border border-white/10 text-xs">Export</button>
30
- <button class="px-3 py-1.5 rounded-lg bg-indigo-500/20 hover:bg-indigo-500/30 border border-indigo-400/20 text-xs">Community</button>
31
- </div>
 
 
32
 
33
  <div class="flex items-center gap-2">
34
  <div class="w-8 h-8 rounded-full bg-gradient-to-br from-indigo-500 to-cyan-400"></div>
 
27
  <button id="btnMobile" class="px-3 py-1.5 rounded-lg bg-white/5 hover:bg-white/10 border border-white/10 text-xs">Mobile</button>
28
  <button id="btnRefresh" class="px-3 py-1.5 rounded-lg bg-white/5 hover:bg-white/10 border border-white/10 text-xs">Refresh</button>
29
  <button id="btnExport" class="px-3 py-1.5 rounded-lg bg-white/5 hover:bg-white/10 border border-white/10 text-xs">Export</button>
30
+ <button class="px-3 py-1.5 rounded-lg bg-indigo-500/20 hover:bg-indigo-500/30 border border-indigo-400/20 text-xs">
31
+ <a href="ai-dashboard.html">IA Entreprise</a>
32
+ </button>
33
+ </div>
34
 
35
  <div class="flex items-center gap-2">
36
  <div class="w-8 h-8 rounded-full bg-gradient-to-br from-indigo-500 to-cyan-400"></div>
script.js CHANGED
@@ -122,9 +122,48 @@ document.addEventListener('DOMContentLoaded', () => {
122
  promptEl.addEventListener('keydown', (e) => {
123
  if (e.key === "Enter") sendBtn.click();
124
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
 
126
  // Initialize with default code
127
- codeEl.value = `<!DOCTYPE html>
128
  <html>
129
  <head>
130
  <title>My App</title>
 
122
  promptEl.addEventListener('keydown', (e) => {
123
  if (e.key === "Enter") sendBtn.click();
124
  });
125
+ // AI Generation functions
126
+ document.getElementById('btnGenImg')?.addEventListener('click', async () => {
127
+ setStatus("Génération d'image...", "work");
128
+ try {
129
+ // Simulate image generation
130
+ setTimeout(() => {
131
+ const imgUrl = `http://static.photos/technology/640x360/${Math.floor(Math.random() * 1000)}`;
132
+ mediaOut.innerHTML = `
133
+ <div class="rounded-xl overflow-hidden border border-white/10">
134
+ <img src="${imgUrl}" class="w-full" alt="Generated image">
135
+ <div class="p-2 text-xs text-slate-400">Image générée: ${new Date().toLocaleTimeString()}</div>
136
+ </div>
137
+ `;
138
+ setStatus("Image générée", "ok");
139
+ }, 2000);
140
+ } catch (err) {
141
+ setStatus("Erreur de génération", "err");
142
+ }
143
+ });
144
+
145
+ document.getElementById('btnGenVid')?.addEventListener('click', async () => {
146
+ setStatus("Génération de vidéo...", "work");
147
+ try {
148
+ // Simulate video generation
149
+ setTimeout(() => {
150
+ mediaOut.innerHTML = `
151
+ <div class="rounded-xl overflow-hidden border border-white/10">
152
+ <video controls class="w-full">
153
+ <source src="https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4" type="video/mp4">
154
+ </video>
155
+ <div class="p-2 text-xs text-slate-400">Vidéo générée: ${new Date().toLocaleTimeString()}</div>
156
+ </div>
157
+ `;
158
+ setStatus("Vidéo générée", "ok");
159
+ }, 3000);
160
+ } catch (err) {
161
+ setStatus("Erreur de génération", "err");
162
+ }
163
+ });
164
 
165
  // Initialize with default code
166
+ codeEl.value = `<!DOCTYPE html>
167
  <html>
168
  <head>
169
  <title>My App</title>