ractivaperu commited on
Commit
2df524b
·
verified ·
1 Parent(s): e61092b

Crea una aplicación web con un panel de administración donde pueda gestionar usuarios y suscripciones de servicios de streaming.

Browse files

Requerimientos principales:

Login que su credencial y contraseña sea admin.

Panel donde pueda:

Dar de alta/baja usuarios.

Asignarles una o varias plataformas de streaming: Disney+, HBO Max, Prime Video, Paramount+ y Bantel TV.

Indicar la fecha de inicio y vencimiento de cada servicio.

Ver el estado de cada usuario (activo, vencido, suspendido).

Opción para añadir nuevas plataformas en el futuro sin necesidad de modificar todo el sistema.

Un buscador para encontrar usuarios por nombre, correo o número de WhatsApp.

Dashboard con:

Número de usuarios activos.

Servicios más contratados.

Renovaciones próximas.

Reportes: posibilidad de generar reportes de usuarios, servicios activos, renovaciones, etc., y descargarlos/exportarlos en Excel (ejemplo: .xlsx o .csv).

Estilo moderno, sencillo, responsivo (adaptado a móvil).

Base de datos (ejemplo: MySQL o Firebase).

Lenguaje sugerido: React o Next.js para el frontend y Node.js/Express para backend.

Opcional (si es posible):

Notificaciones por correo o WhatsApp cuando esté por vencer un servicio.

Exportar lista de usuarios filtrada o completa en Excel/CSV desde cualquier vista de reportes. - Initial Deployment

Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +573 -18
  3. prompts.txt +41 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Mi Streaming
3
- emoji: 📚
4
- colorFrom: red
5
- colorTo: purple
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: mi-streaming
3
+ emoji: 🐳
4
+ colorFrom: purple
5
+ colorTo: red
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,574 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </html>
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>StreamAdmin - Panel de Control</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
9
+ <script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
10
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
11
+ <script src="https://unpkg.com/feather-icons"></script>
12
+ <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
13
+ <style>
14
+ .sidebar {
15
+ transition: all 0.3s;
16
+ }
17
+ .sidebar-collapsed {
18
+ width: 80px;
19
+ }
20
+ .sidebar-expanded {
21
+ width: 260px;
22
+ }
23
+ .main-content {
24
+ transition: margin-left 0.3s;
25
+ }
26
+ .content-expanded {
27
+ margin-left: 260px;
28
+ }
29
+ .content-collapsed {
30
+ margin-left: 80px;
31
+ }
32
+ .active-menu {
33
+ background-color: #6366f1;
34
+ color: white;
35
+ }
36
+ .active-menu:hover {
37
+ background-color: #4f46e5 !important;
38
+ }
39
+ .dropdown-enter {
40
+ opacity: 0;
41
+ transform: translateY(-10px);
42
+ }
43
+ .dropdown-enter-active {
44
+ opacity: 1;
45
+ transform: translateY(0);
46
+ transition: all 0.2s ease;
47
+ }
48
+ .dropdown-exit {
49
+ opacity: 1;
50
+ transform: translateY(0);
51
+ }
52
+ .dropdown-exit-active {
53
+ opacity: 0;
54
+ transform: translateY(-10px);
55
+ transition: all 0.2s ease;
56
+ }
57
+ @media (max-width: 768px) {
58
+ .sidebar {
59
+ position: fixed;
60
+ z-index: 50;
61
+ transform: translateX(-100%);
62
+ }
63
+ .sidebar-mobile-show {
64
+ transform: translateX(0);
65
+ }
66
+ .main-content {
67
+ margin-left: 0 !important;
68
+ }
69
+ }
70
+ </style>
71
+ </head>
72
+ <body class="bg-gray-100 font-sans">
73
+ <!-- Login Page -->
74
+ <div id="login-page" class="min-h-screen flex items-center justify-center bg-gradient-to-br from-indigo-600 to-purple-600">
75
+ <div class="bg-white p-8 rounded-lg shadow-xl w-full max-w-md" data-aos="zoom-in">
76
+ <div class="text-center mb-8">
77
+ <h1 class="text-3xl font-bold text-gray-800">StreamAdmin</h1>
78
+ <p class="text-gray-600 mt-2">Panel de administración de servicios</p>
79
+ </div>
80
+ <form id="login-form" class="space-y-6">
81
+ <div>
82
+ <label for="username" class="block text-sm font-medium text-gray-700">Usuario</label>
83
+ <input type="text" id="username" name="username" required
84
+ class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500">
85
+ </div>
86
+ <div>
87
+ <label for="password" class="block text-sm font-medium text-gray-700">Contraseña</label>
88
+ <input type="password" id="password" name="password" required
89
+ class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500">
90
+ </div>
91
+ <div>
92
+ <button type="submit"
93
+ class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
94
+ Iniciar sesión
95
+ </button>
96
+ </div>
97
+ </form>
98
+ </div>
99
+ </div>
100
+
101
+ <!-- Admin Dashboard (initially hidden) -->
102
+ <div id="admin-dashboard" class="hidden">
103
+ <!-- Sidebar -->
104
+ <div id="sidebar" class="sidebar sidebar-expanded fixed h-full bg-gray-800 text-white overflow-y-auto">
105
+ <div class="p-4 flex items-center justify-between border-b border-gray-700">
106
+ <h1 class="text-xl font-semibold whitespace-nowrap">StreamAdmin</h1>
107
+ <button id="toggle-sidebar" class="text-gray-400 hover:text-white focus:outline-none">
108
+ <i data-feather="menu"></i>
109
+ </button>
110
+ </div>
111
+ <nav class="mt-6">
112
+ <div class="px-4">
113
+ <div class="relative">
114
+ <input type="text" placeholder="Buscar..."
115
+ class="w-full bg-gray-700 text-white px-4 py-2 rounded-md focus:outline-none focus:ring-1 focus:ring-indigo-500">
116
+ <i data-feather="search" class="absolute right-3 top-2.5 text-gray-400"></i>
117
+ </div>
118
+ </div>
119
+ <div class="mt-6">
120
+ <a href="#" class="menu-item active-menu flex items-center px-4 py-3 text-sm font-medium hover:bg-gray-700">
121
+ <i data-feather="home" class="mr-3"></i>
122
+ <span class="menu-text">Dashboard</span>
123
+ </a>
124
+ <a href="#" class="menu-item flex items-center px-4 py-3 text-sm font-medium hover:bg-gray-700">
125
+ <i data-feather="users" class="mr-3"></i>
126
+ <span class="menu-text">Usuarios</span>
127
+ </a>
128
+ <a href="#" class="menu-item flex items-center px-4 py-3 text-sm font-medium hover:bg-gray-700">
129
+ <i data-feather="tv" class="mr-3"></i>
130
+ <span class="menu-text">Servicios</span>
131
+ </a>
132
+ <a href="#" class="menu-item flex items-center px-4 py-3 text-sm font-medium hover:bg-gray-700">
133
+ <i data-feather="file-text" class="mr-3"></i>
134
+ <span class="menu-text">Reportes</span>
135
+ </a>
136
+ <a href="#" class="menu-item flex items-center px-4 py-3 text-sm font-medium hover:bg-gray-700">
137
+ <i data-feather="settings" class="mr-3"></i>
138
+ <span class="menu-text">Configuración</span>
139
+ </a>
140
+ </div>
141
+ </nav>
142
+ <div class="absolute bottom-0 w-full p-4 border-t border-gray-700">
143
+ <div class="flex items-center">
144
+ <div class="w-10 h-10 rounded-full bg-indigo-600 flex items-center justify-center">
145
+ <i data-feather="user"></i>
146
+ </div>
147
+ <div class="ml-3 menu-text">
148
+ <p class="text-sm font-medium">Administrador</p>
149
+ <p class="text-xs text-gray-400">admin@streamadmin.com</p>
150
+ </div>
151
+ </div>
152
+ <button id="logout-btn" class="mt-4 w-full flex items-center justify-center py-2 px-4 bg-gray-700 rounded-md hover:bg-gray-600">
153
+ <i data-feather="log-out" class="mr-2"></i>
154
+ <span class="menu-text">Cerrar sesión</span>
155
+ </button>
156
+ </div>
157
+ </div>
158
+
159
+ <!-- Main Content -->
160
+ <div id="main-content" class="main-content content-expanded min-h-screen">
161
+ <!-- Top Navigation -->
162
+ <header class="bg-white shadow-sm">
163
+ <div class="max-w-7xl mx-auto px-4 py-4 sm:px-6 lg:px-8 flex justify-between items-center">
164
+ <h1 class="text-lg font-semibold text-gray-900">Dashboard</h1>
165
+ <div class="flex items-center space-x-4">
166
+ <button class="p-2 rounded-full text-gray-500 hover:text-gray-700 hover:bg-gray-100 focus:outline-none">
167
+ <i data-feather="bell"></i>
168
+ </button>
169
+ <button class="md:hidden p-2 rounded-full text-gray-500 hover:text-gray-700 hover:bg-gray-100 focus:outline-none" id="mobile-menu-button">
170
+ <i data-feather="menu"></i>
171
+ </button>
172
+ </div>
173
+ </div>
174
+ </header>
175
+
176
+ <!-- Dashboard Content -->
177
+ <main class="max-w-7xl mx-auto px-4 py-6 sm:px-6 lg:px-8">
178
+ <!-- Stats Cards -->
179
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
180
+ <div class="bg-white rounded-lg shadow p-6" data-aos="fade-up">
181
+ <div class="flex items-center">
182
+ <div class="p-3 rounded-full bg-indigo-100 text-indigo-600">
183
+ <i data-feather="users"></i>
184
+ </div>
185
+ <div class="ml-4">
186
+ <p class="text-sm font-medium text-gray-500">Usuarios activos</p>
187
+ <p class="text-2xl font-semibold text-gray-900">1,248</p>
188
+ </div>
189
+ </div>
190
+ </div>
191
+ <div class="bg-white rounded-lg shadow p-6" data-aos="fade-up" data-aos-delay="100">
192
+ <div class="flex items-center">
193
+ <div class="p-3 rounded-full bg-green-100 text-green-600">
194
+ <i data-feather="tv"></i>
195
+ </div>
196
+ <div class="ml-4">
197
+ <p class="text-sm font-medium text-gray-500">Servicios activos</p>
198
+ <p class="text-2xl font-semibold text-gray-900">2,543</p>
199
+ </div>
200
+ </div>
201
+ </div>
202
+ <div class="bg-white rounded-lg shadow p-6" data-aos="fade-up" data-aos-delay="200">
203
+ <div class="flex items-center">
204
+ <div class="p-3 rounded-full bg-yellow-100 text-yellow-600">
205
+ <i data-feather="clock"></i>
206
+ </div>
207
+ <div class="ml-4">
208
+ <p class="text-sm font-medium text-gray-500">Por renovar</p>
209
+ <p class="text-2xl font-semibold text-gray-900">187</p>
210
+ </div>
211
+ </div>
212
+ </div>
213
+ <div class="bg-white rounded-lg shadow p-6" data-aos="fade-up" data-aos-delay="300">
214
+ <div class="flex items-center">
215
+ <div class="p-3 rounded-full bg-red-100 text-red-600">
216
+ <i data-feather="alert-circle"></i>
217
+ </div>
218
+ <div class="ml-4">
219
+ <p class="text-sm font-medium text-gray-500">Vencidos</p>
220
+ <p class="text-2xl font-semibold text-gray-900">92</p>
221
+ </div>
222
+ </div>
223
+ </div>
224
+ </div>
225
+
226
+ <!-- Charts -->
227
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8">
228
+ <div class="bg-white rounded-lg shadow p-6" data-aos="fade-right">
229
+ <h2 class="text-lg font-medium text-gray-900 mb-4">Servicios más contratados</h2>
230
+ <div class="h-64">
231
+ <canvas id="servicesChart"></canvas>
232
+ </div>
233
+ </div>
234
+ <div class="bg-white rounded-lg shadow p-6" data-aos="fade-left">
235
+ <h2 class="text-lg font-medium text-gray-900 mb-4">Renovaciones próximas</h2>
236
+ <div class="h-64">
237
+ <canvas id="renewalsChart"></canvas>
238
+ </div>
239
+ </div>
240
+ </div>
241
+
242
+ <!-- Recent Users -->
243
+ <div class="bg-white rounded-lg shadow overflow-hidden" data-aos="fade-up">
244
+ <div class="px-6 py-4 border-b border-gray-200 flex justify-between items-center">
245
+ <h2 class="text-lg font-medium text-gray-900">Usuarios recientes</h2>
246
+ <button class="text-sm text-indigo-600 hover:text-indigo-800">Ver todos</button>
247
+ </div>
248
+ <div class="overflow-x-auto">
249
+ <table class="min-w-full divide-y divide-gray-200">
250
+ <thead class="bg-gray-50">
251
+ <tr>
252
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Nombre</th>
253
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Email</th>
254
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">WhatsApp</th>
255
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Servicios</th>
256
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Estado</th>
257
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Acciones</th>
258
+ </tr>
259
+ </thead>
260
+ <tbody class="bg-white divide-y divide-gray-200">
261
+ <tr>
262
+ <td class="px-6 py-4 whitespace-nowrap">
263
+ <div class="flex items-center">
264
+ <div class="flex-shrink-0 h-10 w-10">
265
+ <img class="h-10 w-10 rounded-full" src="http://static.photos/people/200x200/1" alt="">
266
+ </div>
267
+ <div class="ml-4">
268
+ <div class="text-sm font-medium text-gray-900">Juan Pérez</div>
269
+ </div>
270
+ </div>
271
+ </td>
272
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">juan@example.com</td>
273
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">+1 234 567 890</td>
274
+ <td class="px-6 py-4 whitespace-nowrap">
275
+ <div class="flex space-x-1">
276
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-purple-100 text-purple-800">Disney+</span>
277
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800">HBO Max</span>
278
+ </div>
279
+ </td>
280
+ <td class="px-6 py-4 whitespace-nowrap">
281
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Activo</span>
282
+ </td>
283
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
284
+ <button class="text-indigo-600 hover:text-indigo-900 mr-3"><i data-feather="edit" class="w-4 h-4"></i></button>
285
+ <button class="text-red-600 hover:text-red-900"><i data-feather="trash-2" class="w-4 h-4"></i></button>
286
+ </td>
287
+ </tr>
288
+ <tr>
289
+ <td class="px-6 py-4 whitespace-nowrap">
290
+ <div class="flex items-center">
291
+ <div class="flex-shrink-0 h-10 w-10">
292
+ <img class="h-10 w-10 rounded-full" src="http://static.photos/people/200x200/2" alt="">
293
+ </div>
294
+ <div class="ml-4">
295
+ <div class="text-sm font-medium text-gray-900">María González</div>
296
+ </div>
297
+ </div>
298
+ </td>
299
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">maria@example.com</td>
300
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">+1 987 654 321</td>
301
+ <td class="px-6 py-4 whitespace-nowrap">
302
+ <div class="flex space-x-1">
303
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800">HBO Max</span>
304
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">Prime Video</span>
305
+ </div>
306
+ </td>
307
+ <td class="px-6 py-4 whitespace-nowrap">
308
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">Por vencer</span>
309
+ </td>
310
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
311
+ <button class="text-indigo-600 hover:text-indigo-900 mr-3"><i data-feather="edit" class="w-4 h-4"></i></button>
312
+ <button class="text-red-600 hover:text-red-900"><i data-feather="trash-2" class="w-4 h-4"></i></button>
313
+ </td>
314
+ </tr>
315
+ <tr>
316
+ <td class="px-6 py-4 whitespace-nowrap">
317
+ <div class="flex items-center">
318
+ <div class="flex-shrink-0 h-10 w-10">
319
+ <img class="h-10 w-10 rounded-full" src="http://static.photos/people/200x200/3" alt="">
320
+ </div>
321
+ <div class="ml-4">
322
+ <div class="text-sm font-medium text-gray-900">Carlos López</div>
323
+ </div>
324
+ </div>
325
+ </td>
326
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">carlos@example.com</td>
327
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">+1 555 123 456</td>
328
+ <td class="px-6 py-4 whitespace-nowrap">
329
+ <div class="flex space-x-1">
330
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">Paramount+</span>
331
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Bantel TV</span>
332
+ </div>
333
+ </td>
334
+ <td class="px-6 py-4 whitespace-nowrap">
335
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">Vencido</span>
336
+ </td>
337
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
338
+ <button class="text-indigo-600 hover:text-indigo-900 mr-3"><i data-feather="edit" class="w-4 h-4"></i></button>
339
+ <button class="text-red-600 hover:text-red-900"><i data-feather="trash-2" class="w-4 h-4"></i></button>
340
+ </td>
341
+ </tr>
342
+ </tbody>
343
+ </table>
344
+ </div>
345
+ </div>
346
+ </main>
347
+ </div>
348
+
349
+ <!-- Add User Modal -->
350
+ <div id="add-user-modal" class="fixed inset-0 z-50 hidden overflow-y-auto">
351
+ <div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
352
+ <div class="fixed inset-0 transition-opacity" aria-hidden="true">
353
+ <div class="absolute inset-0 bg-gray-500 opacity-75"></div>
354
+ </div>
355
+ <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
356
+ <div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-2xl sm:w-full" role="dialog" aria-modal="true" aria-labelledby="modal-headline">
357
+ <div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
358
+ <div class="sm:flex sm:items-start">
359
+ <div class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-indigo-100 sm:mx-0 sm:h-10 sm:w-10">
360
+ <i data-feather="user-plus" class="text-indigo-600"></i>
361
+ </div>
362
+ <div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full">
363
+ <h3 class="text-lg leading-6 font-medium text-gray-900" id="modal-headline">Agregar nuevo usuario</h3>
364
+ <div class="mt-2">
365
+ <form class="space-y-4">
366
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
367
+ <div>
368
+ <label for="name" class="block text-sm font-medium text-gray-700">Nombre completo</label>
369
+ <input type="text" id="name" name="name" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500">
370
+ </div>
371
+ <div>
372
+ <label for="email" class="block text-sm font-medium text-gray-700">Email</label>
373
+ <input type="email" id="email" name="email" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500">
374
+ </div>
375
+ <div>
376
+ <label for="phone" class="block text-sm font-medium text-gray-700">Teléfono</label>
377
+ <input type="tel" id="phone" name="phone" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500">
378
+ </div>
379
+ <div>
380
+ <label for="whatsapp" class="block text-sm font-medium text-gray-700">WhatsApp</label>
381
+ <input type="tel" id="whatsapp" name="whatsapp" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500">
382
+ </div>
383
+ </div>
384
+
385
+ <div>
386
+ <label class="block text-sm font-medium text-gray-700 mb-2">Servicios de streaming</label>
387
+ <div class="grid grid-cols-2 md:grid-cols-3 gap-3">
388
+ <div class="flex items-center">
389
+ <input id="disney" name="services" type="checkbox" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded">
390
+ <label for="disney" class="ml-2 block text-sm text-gray-700">Disney+</label>
391
+ </div>
392
+ <div class="flex items-center">
393
+ <input id="hbo" name="services" type="checkbox" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded">
394
+ <label for="hbo" class="ml-2 block text-sm text-gray-700">HBO Max</label>
395
+ </div>
396
+ <div class="flex items-center">
397
+ <input id="prime" name="services" type="checkbox" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded">
398
+ <label for="prime" class="ml-2 block text-sm text-gray-700">Prime Video</label>
399
+ </div>
400
+ <div class="flex items-center">
401
+ <input id="paramount" name="services" type="checkbox" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded">
402
+ <label for="paramount" class="ml-2 block text-sm text-gray-700">Paramount+</label>
403
+ </div>
404
+ <div class="flex items-center">
405
+ <input id="bantel" name="services" type="checkbox" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded">
406
+ <label for="bantel" class="ml-2 block text-sm text-gray-700">Bantel TV</label>
407
+ </div>
408
+ </div>
409
+ </div>
410
+
411
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
412
+ <div>
413
+ <label for="start-date" class="block text-sm font-medium text-gray-700">Fecha de inicio</label>
414
+ <input type="date" id="start-date" name="start-date" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500">
415
+ </div>
416
+ <div>
417
+ <label for="end-date" class="block text-sm font-medium text-gray-700">Fecha de vencimiento</label>
418
+ <input type="date" id="end-date" name="end-date" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500">
419
+ </div>
420
+ </div>
421
+
422
+ <div>
423
+ <label for="status" class="block text-sm font-medium text-gray-700">Estado</label>
424
+ <select id="status" name="status" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md">
425
+ <option value="active">Activo</option>
426
+ <option value="pending">Por vencer</option>
427
+ <option value="expired">Vencido</option>
428
+ <option value="suspended">Suspendido</option>
429
+ </select>
430
+ </div>
431
+ </form>
432
+ </div>
433
+ </div>
434
+ </div>
435
+ </div>
436
+ <div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
437
+ <button type="button" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-indigo-600 text-base font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:ml-3 sm:w-auto sm:text-sm">
438
+ Guardar
439
+ </button>
440
+ <button type="button" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm cancel-modal">
441
+ Cancelar
442
+ </button>
443
+ </div>
444
+ </div>
445
+ </div>
446
+ </div>
447
+ </div>
448
+
449
+ <script>
450
+ // Initialize AOS animations
451
+ AOS.init({
452
+ duration: 800,
453
+ easing: 'ease-in-out',
454
+ once: true
455
+ });
456
+
457
+ // Initialize Feather Icons
458
+ feather.replace();
459
+
460
+ // Login functionality
461
+ document.getElementById('login-form').addEventListener('submit', function(e) {
462
+ e.preventDefault();
463
+ const username = document.getElementById('username').value;
464
+ const password = document.getElementById('password').value;
465
+
466
+ if (username === 'admin' && password === 'admin') {
467
+ document.getElementById('login-page').classList.add('hidden');
468
+ document.getElementById('admin-dashboard').classList.remove('hidden');
469
+ } else {
470
+ alert('Credenciales incorrectas. Usuario: admin, Contraseña: admin');
471
+ }
472
+ });
473
+
474
+ // Logout functionality
475
+ document.getElementById('logout-btn').addEventListener('click', function() {
476
+ document.getElementById('admin-dashboard').classList.add('hidden');
477
+ document.getElementById('login-page').classList.remove('hidden');
478
+ document.getElementById('username').value = '';
479
+ document.getElementById('password').value = '';
480
+ });
481
+
482
+ // Toggle sidebar
483
+ document.getElementById('toggle-sidebar').addEventListener('click', function() {
484
+ const sidebar = document.getElementById('sidebar');
485
+ const mainContent = document.getElementById('main-content');
486
+
487
+ if (sidebar.classList.contains('sidebar-expanded')) {
488
+ sidebar.classList.remove('sidebar-expanded');
489
+ sidebar.classList.add('sidebar-collapsed');
490
+ mainContent.classList.remove('content-expanded');
491
+ mainContent.classList.add('content-collapsed');
492
+ } else {
493
+ sidebar.classList.remove('sidebar-collapsed');
494
+ sidebar.classList.add('sidebar-expanded');
495
+ mainContent.classList.remove('content-collapsed');
496
+ mainContent.classList.add('content-expanded');
497
+ }
498
+
499
+ // Update menu text visibility
500
+ document.querySelectorAll('.menu-text').forEach(el => {
501
+ el.classList.toggle('hidden');
502
+ });
503
+ });
504
+
505
+ // Mobile menu toggle
506
+ document.getElementById('mobile-menu-button').addEventListener('click', function() {
507
+ document.getElementById('sidebar').classList.toggle('sidebar-mobile-show');
508
+ });
509
+
510
+ // Close modals
511
+ document.querySelectorAll('.cancel-modal').forEach(btn => {
512
+ btn.addEventListener('click', function() {
513
+ this.closest('.fixed').classList.add('hidden');
514
+ });
515
+ });
516
+
517
+ // Charts
518
+ document.addEventListener('DOMContentLoaded', function() {
519
+ // Services Chart
520
+ const servicesCtx = document.getElementById('servicesChart').getContext('2d');
521
+ const servicesChart = new Chart(servicesCtx, {
522
+ type: 'doughnut',
523
+ data: {
524
+ labels: ['Disney+', 'HBO Max', 'Prime Video', 'Paramount+', 'Bantel TV'],
525
+ datasets: [{
526
+ data: [35, 25, 20, 15, 5],
527
+ backgroundColor: [
528
+ '#8b5cf6',
529
+ '#3b82f6',
530
+ '#f59e0b',
531
+ '#ef4444',
532
+ '#10b981'
533
+ ],
534
+ borderWidth: 0
535
+ }]
536
+ },
537
+ options: {
538
+ responsive: true,
539
+ maintainAspectRatio: false,
540
+ plugins: {
541
+ legend: {
542
+ position: 'right',
543
+ }
544
+ }
545
+ }
546
+ });
547
+
548
+ // Renewals Chart
549
+ const renewalsCtx = document.getElementById('renewalsChart').getContext('2d');
550
+ const renewalsChart = new Chart(renewalsCtx, {
551
+ type: 'bar',
552
+ data: {
553
+ labels: ['Hoy', 'Mañana', 'En 3 días', 'En 1 semana', 'En 2 semanas'],
554
+ datasets: [{
555
+ label: 'Renovaciones',
556
+ data: [12, 19, 8, 15, 24],
557
+ backgroundColor: '#6366f1',
558
+ borderWidth: 0
559
+ }]
560
+ },
561
+ options: {
562
+ responsive: true,
563
+ maintainAspectRatio: false,
564
+ scales: {
565
+ y: {
566
+ beginAtZero: true
567
+ }
568
+ }
569
+ }
570
+ });
571
+ });
572
+ </script>
573
+ </body>
574
  </html>
prompts.txt ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Crea una aplicación web con un panel de administración donde pueda gestionar usuarios y suscripciones de servicios de streaming.
2
+
3
+ Requerimientos principales:
4
+
5
+ Login que su credencial y contraseña sea admin.
6
+
7
+ Panel donde pueda:
8
+
9
+ Dar de alta/baja usuarios.
10
+
11
+ Asignarles una o varias plataformas de streaming: Disney+, HBO Max, Prime Video, Paramount+ y Bantel TV.
12
+
13
+ Indicar la fecha de inicio y vencimiento de cada servicio.
14
+
15
+ Ver el estado de cada usuario (activo, vencido, suspendido).
16
+
17
+ Opción para añadir nuevas plataformas en el futuro sin necesidad de modificar todo el sistema.
18
+
19
+ Un buscador para encontrar usuarios por nombre, correo o número de WhatsApp.
20
+
21
+ Dashboard con:
22
+
23
+ Número de usuarios activos.
24
+
25
+ Servicios más contratados.
26
+
27
+ Renovaciones próximas.
28
+
29
+ Reportes: posibilidad de generar reportes de usuarios, servicios activos, renovaciones, etc., y descargarlos/exportarlos en Excel (ejemplo: .xlsx o .csv).
30
+
31
+ Estilo moderno, sencillo, responsivo (adaptado a móvil).
32
+
33
+ Base de datos (ejemplo: MySQL o Firebase).
34
+
35
+ Lenguaje sugerido: React o Next.js para el frontend y Node.js/Express para backend.
36
+
37
+ Opcional (si es posible):
38
+
39
+ Notificaciones por correo o WhatsApp cuando esté por vencer un servicio.
40
+
41
+ Exportar lista de usuarios filtrada o completa en Excel/CSV desde cualquier vista de reportes.