-
+
+
+
Sincronizando con el estudio…
) : projects.length === 0 ? (
-
- Aún no has generado ningún proyecto
-
+
+
+
Aún no hay proyectos generados
+
Describe un track y verás los renders aquí
+
) : (
projects.map((project) => (
-
-
-
-
- handleDownload(project)}
- />
- handleDeleteProject(project.id, e)}
- />
-
+
+
+
-
{project.name}
-
-
Género: {project.genre}
-
BPM: {project.bpm}
-
Tonalidad: {project.key}
+
+
+
{project.name}
+
+
+
+
+
+
+ {project.genre}
+ {project.bpm} BPM
+ {project.key}
+
))
)}
-
+
);
}
diff --git a/frontend/src/index.css b/frontend/src/index.css
index b93d44d..1e5d6ed 100644
--- a/frontend/src/index.css
+++ b/frontend/src/index.css
@@ -1,35 +1,718 @@
+@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');
+
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
+ :root {
+ --daw-bg: #040507;
+ --daw-panel: #0d1016;
+ --daw-panel-dark: #090b0f;
+ --daw-border: rgba(255, 255, 255, 0.08);
+ --daw-border-strong: rgba(255, 255, 255, 0.25);
+ --accent-orange: #f47d25;
+ --accent-green: #59f7bb;
+ --accent-purple: #7b8bff;
+ }
+
+ * {
+ box-sizing: border-box;
+ }
+
body {
- @apply bg-gray-50 text-gray-900;
+ margin: 0;
+ min-height: 100vh;
+ font-family: 'Space Grotesk', 'Inter', sans-serif;
+ background: radial-gradient(circle at 20% 20%, rgba(255, 120, 0, 0.15), transparent 40%),
+ radial-gradient(circle at 80% 0%, rgba(74, 131, 255, 0.15), transparent 30%),
+ linear-gradient(120deg, #050607 0%, #0d1119 55%, #050607 100%);
+ color: #f5f5f5;
+ }
+
+ body::before {
+ content: '';
+ position: fixed;
+ inset: 0;
+ pointer-events: none;
+ background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
+ background-size: 120px 120px;
+ opacity: 0.15;
+ mix-blend-mode: screen;
+ }
+
+ #root {
+ min-height: 100vh;
}
}
@layer components {
- .btn-primary {
- @apply bg-primary-600 hover:bg-primary-700 text-white font-medium py-2 px-4 rounded-lg transition-colors;
+ .app-shell {
+ min-height: 100vh;
+ display: flex;
+ flex-direction: column;
+ background: linear-gradient(180deg, rgba(8, 10, 14, 0.9), rgba(5, 6, 7, 0.98));
}
- .btn-secondary {
- @apply bg-gray-200 hover:bg-gray-300 text-gray-800 font-medium py-2 px-4 rounded-lg transition-colors;
+ .transport-bar {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 1rem 2rem;
+ border-bottom: 1px solid rgba(255, 255, 255, 0.06);
+ background: linear-gradient(90deg, rgba(19, 21, 29, 0.95), rgba(9, 10, 14, 0.95));
+ box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}
- .card {
- @apply bg-white rounded-lg shadow-md p-6;
+ .transport-section {
+ display: flex;
+ align-items: center;
+ gap: 1.5rem;
}
- .input-field {
- @apply w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent;
+ .brand-mark {
+ display: flex;
+ align-items: center;
+ gap: 0.8rem;
+ text-transform: uppercase;
+ letter-spacing: 0.08em;
}
- .chat-bubble-user {
- @apply bg-primary-600 text-white ml-auto rounded-lg rounded-br-sm px-4 py-2 max-w-xs lg:max-w-md;
+ .brand-spark {
+ width: 36px;
+ height: 36px;
+ border-radius: 8px;
+ background: linear-gradient(135deg, #f47d25, #ffb347);
+ box-shadow: 0 0 20px rgba(255, 149, 41, 0.45);
+ display: inline-block;
}
- .chat-bubble-ai {
- @apply bg-gray-200 text-gray-800 rounded-lg rounded-bl-sm px-4 py-2 max-w-xs lg:max-w-md;
+ .brand-name {
+ margin: 0;
+ font-size: 1rem;
+ font-weight: 600;
+ color: #fff1d6;
+ }
+
+ .brand-mode {
+ margin: 0;
+ font-size: 0.75rem;
+ color: rgba(255, 255, 255, 0.5);
+ }
+
+ .transport-controls {
+ display: flex;
+ gap: 0.6rem;
+ }
+
+ .transport-btn {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.4rem;
+ padding: 0.5rem 0.9rem;
+ border-radius: 6px;
+ border: 1px solid rgba(255, 255, 255, 0.1);
+ background: rgba(255, 255, 255, 0.02);
+ color: rgba(255, 255, 255, 0.8);
+ font-size: 0.8rem;
+ text-transform: uppercase;
+ letter-spacing: 0.08em;
+ cursor: pointer;
+ transition: border-color 0.2s, color 0.2s;
+ }
+
+ .transport-btn.primary {
+ border-color: rgba(244, 125, 37, 0.8);
+ color: #fff;
+ background: linear-gradient(135deg, #f47d25, #ffb347);
+ box-shadow: 0 0 20px rgba(244, 125, 37, 0.4);
+ }
+
+ .transport-btn:hover {
+ border-color: rgba(255, 255, 255, 0.35);
+ }
+
+ .transport-stats {
+ display: flex;
+ align-items: center;
+ gap: 1rem;
+ padding: 0.4rem 0.8rem;
+ border-radius: 8px;
+ background: rgba(255, 255, 255, 0.03);
+ border: 1px solid rgba(255, 255, 255, 0.08);
+ }
+
+ .stat-block {
+ display: flex;
+ flex-direction: column;
+ font-size: 0.75rem;
+ color: rgba(255, 255, 255, 0.7);
+ }
+
+ .stat-block .value {
+ font-size: 0.95rem;
+ font-weight: 600;
+ color: #fff0d8;
+ }
+
+ .transport-link {
+ text-decoration: none;
+ font-size: 0.85rem;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: rgba(255, 255, 255, 0.8);
+ padding: 0.4rem 0.8rem;
+ border-radius: 6px;
+ border: 1px solid rgba(255, 255, 255, 0.1);
+ transition: color 0.2s, border-color 0.2s;
+ }
+
+ .transport-link:hover {
+ color: #ffb347;
+ border-color: rgba(244, 125, 37, 0.6);
+ }
+
+ .daw-layout {
+ display: grid;
+ grid-template-columns: 260px minmax(0, 1fr) 320px;
+ gap: 1.2rem;
+ padding: 1.2rem 1.8rem 1.8rem;
+ height: calc(100vh - 86px);
+ }
+
+ .scene-panel,
+ .console-panel,
+ .project-rack {
+ background: var(--daw-panel);
+ border: 1px solid var(--daw-border);
+ border-radius: 18px;
+ box-shadow: 0 15px 40px rgba(0, 0, 0, 0.55);
+ }
+
+ .scene-panel,
+ .project-rack {
+ padding: 1.1rem;
+ display: flex;
+ flex-direction: column;
+ gap: 1rem;
+ }
+
+ .panel-header,
+ .rack-header,
+ .console-header,
+ .input-meta {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.4rem;
+ }
+
+ .panel-title {
+ margin: 0;
+ font-size: 0.95rem;
+ text-transform: uppercase;
+ letter-spacing: 0.12em;
+ color: rgba(255, 255, 255, 0.75);
+ }
+
+ .panel-subtitle {
+ margin: 0.15rem 0 0;
+ font-size: 0.75rem;
+ color: rgba(255, 255, 255, 0.45);
+ }
+
+ .led {
+ width: 12px;
+ height: 12px;
+ border-radius: 50%;
+ display: inline-flex;
+ opacity: 0.4;
+ }
+
+ .led-green {
+ background: var(--accent-green);
+ box-shadow: 0 0 8px rgba(89, 247, 187, 0.6);
+ }
+
+ .scene-grid {
+ display: flex;
+ flex-direction: column;
+ gap: 0.8rem;
+ }
+
+ .scene-row {
+ display: flex;
+ align-items: center;
+ gap: 0.8rem;
+ padding: 0.75rem;
+ border-radius: 12px;
+ background: rgba(255, 255, 255, 0.02);
+ border: 1px solid rgba(255, 255, 255, 0.05);
+ }
+
+ .scene-marker {
+ width: 12px;
+ height: 36px;
+ border-radius: 6px;
+ background: linear-gradient(180deg, #7b8bff, #59f7bb);
+ }
+
+ .scene-name {
+ margin: 0;
+ font-size: 0.9rem;
+ }
+
+ .scene-meta,
+ .scene-bpm {
+ font-size: 0.7rem;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: rgba(255, 255, 255, 0.4);
+ }
+
+ .scene-bpm {
+ margin-left: auto;
+ }
+
+ .macro-section {
+ border-top: 1px solid rgba(255, 255, 255, 0.04);
+ padding-top: 1rem;
+ }
+
+ .macro-grid {
+ margin-top: 0.6rem;
+ display: grid;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ gap: 0.8rem;
+ }
+
+ .macro-card {
+ background: rgba(255, 255, 255, 0.02);
+ border: 1px solid rgba(255, 255, 255, 0.06);
+ border-radius: 12px;
+ padding: 0.8rem;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 0.6rem;
+ }
+
+ .macro-label {
+ font-size: 0.7rem;
+ letter-spacing: 0.16em;
+ color: rgba(255, 255, 255, 0.5);
+ }
+
+ .macro-track {
+ width: 100%;
+ height: 72px;
+ border-radius: 8px;
+ background: rgba(255, 255, 255, 0.04);
+ border: 1px solid rgba(255, 255, 255, 0.08);
+ display: flex;
+ align-items: flex-end;
+ padding: 4px;
+ }
+
+ .macro-level {
+ width: 100%;
+ border-radius: 6px;
+ background: linear-gradient(180deg, var(--accent-green), rgba(89, 247, 187, 0.1));
+ box-shadow: 0 0 12px rgba(89, 247, 187, 0.3);
+ }
+
+ .macro-value {
+ font-size: 0.85rem;
+ color: rgba(255, 255, 255, 0.7);
+ }
+
+ .console-panel {
+ padding: 1.2rem;
+ display: flex;
+ flex-direction: column;
+ gap: 1.2rem;
+ }
+
+ .console-status {
+ display: flex;
+ align-items: center;
+ gap: 0.4rem;
+ font-size: 0.8rem;
+ color: rgba(255, 255, 255, 0.6);
+ }
+
+ .status-dot {
+ width: 10px;
+ height: 10px;
+ border-radius: 50%;
+ background: rgba(255, 255, 255, 0.3);
+ }
+
+ .status-dot.active {
+ background: var(--accent-orange);
+ box-shadow: 0 0 8px rgba(244, 125, 37, 0.75);
+ }
+
+ .arrangement-surface {
+ flex: 1;
+ border-radius: 16px;
+ border: 1px solid rgba(255, 255, 255, 0.05);
+ background: linear-gradient(180deg, rgba(9, 11, 16, 0.9), rgba(6, 7, 9, 0.96));
+ display: flex;
+ flex-direction: column;
+ overflow: hidden;
+ box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.45);
+ }
+
+ .timeline {
+ display: grid;
+ grid-template-columns: repeat(10, minmax(0, 1fr));
+ font-size: 0.65rem;
+ letter-spacing: 0.2em;
+ padding: 0.6rem 1rem;
+ border-bottom: 1px solid rgba(255, 255, 255, 0.05);
+ text-transform: uppercase;
+ color: rgba(255, 255, 255, 0.35);
+ background: rgba(255, 255, 255, 0.01);
+ }
+
+ .arrangement-grid {
+ flex: 1;
+ padding: 1.2rem;
+ overflow-y: auto;
+ display: flex;
+ flex-direction: column;
+ gap: 1rem;
+ background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
+ linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
+ background-size: 100% 48px, 120px 100%;
+ }
+
+ .clip {
+ border-radius: 12px;
+ padding: 0.9rem 1.1rem;
+ border: 1px solid rgba(255, 255, 255, 0.08);
+ background: rgba(255, 255, 255, 0.02);
+ box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
+ transition: transform 0.2s;
+ }
+
+ .clip-user {
+ border-color: rgba(244, 125, 37, 0.5);
+ background: rgba(244, 125, 37, 0.08);
+ box-shadow: 0 0 25px rgba(244, 125, 37, 0.2);
+ }
+
+ .clip-ai {
+ border-color: rgba(91, 179, 255, 0.4);
+ background: rgba(91, 179, 255, 0.06);
+ box-shadow: 0 0 25px rgba(91, 179, 255, 0.15);
+ }
+
+ .clip.ghost {
+ opacity: 0.65;
+ }
+
+ .clip:hover {
+ transform: translateY(-2px);
+ }
+
+ .clip-header {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-bottom: 0.65rem;
+ }
+
+ .clip-role {
+ margin: 0;
+ letter-spacing: 0.15em;
+ font-size: 0.7rem;
+ color: rgba(255, 255, 255, 0.65);
+ text-transform: uppercase;
+ }
+
+ .clip-time {
+ margin: 0.1rem 0 0;
+ font-size: 0.75rem;
+ color: rgba(255, 255, 255, 0.4);
+ }
+
+ .clip-bar {
+ width: 44px;
+ height: 6px;
+ border-radius: 10px;
+ background: linear-gradient(90deg, var(--accent-orange), var(--accent-purple));
+ display: inline-block;
+ }
+
+ .clip-bar.spinning {
+ animation: pulse 1.2s linear infinite;
+ }
+
+ .clip-content {
+ margin: 0;
+ font-size: 0.95rem;
+ line-height: 1.5;
+ color: rgba(255, 255, 255, 0.9);
+ }
+
+ .console-input {
+ border-radius: 16px;
+ border: 1px solid rgba(255, 255, 255, 0.05);
+ padding: 1rem 1.1rem 1.1rem;
+ background: rgba(8, 10, 14, 0.85);
+ display: flex;
+ flex-direction: column;
+ gap: 0.9rem;
+ }
+
+ .input-stats {
+ display: flex;
+ gap: 0.8rem;
+ font-size: 0.75rem;
+ letter-spacing: 0.1em;
+ text-transform: uppercase;
+ color: rgba(255, 255, 255, 0.4);
+ }
+
+ .input-row {
+ display: flex;
+ gap: 0.8rem;
+ }
+
+ .prompt-input {
+ flex: 1;
+ resize: none;
+ border-radius: 14px;
+ border: 1px solid rgba(255, 255, 255, 0.08);
+ background: rgba(255, 255, 255, 0.02);
+ color: #fff;
+ padding: 1rem;
+ font-size: 0.95rem;
+ font-family: inherit;
+ outline: none;
+ transition: border-color 0.2s, box-shadow 0.2s;
+ }
+
+ .prompt-input:focus {
+ border-color: rgba(244, 125, 37, 0.8);
+ box-shadow: 0 0 12px rgba(244, 125, 37, 0.25);
+ }
+
+ .send-btn {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ gap: 0.4rem;
+ padding: 0 1.4rem;
+ border-radius: 14px;
+ border: 1px solid rgba(255, 255, 255, 0.08);
+ background: linear-gradient(135deg, #f47d25, #ffb347);
+ color: #111;
+ font-weight: 600;
+ text-transform: uppercase;
+ letter-spacing: 0.08em;
+ cursor: pointer;
+ transition: transform 0.15s ease;
+ }
+
+ .send-btn:disabled {
+ opacity: 0.5;
+ cursor: not-allowed;
+ }
+
+ .send-btn:not(:disabled):hover {
+ transform: translateY(-2px);
+ }
+
+ .project-rack {
+ display: flex;
+ flex-direction: column;
+ gap: 1rem;
+ }
+
+ .rack-refresh {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.4rem;
+ padding: 0.35rem 0.7rem;
+ border-radius: 6px;
+ border: 1px solid rgba(255, 255, 255, 0.08);
+ background: rgba(255, 255, 255, 0.02);
+ color: rgba(255, 255, 255, 0.7);
+ font-size: 0.75rem;
+ text-transform: uppercase;
+ letter-spacing: 0.08em;
+ cursor: pointer;
+ }
+
+ .project-list {
+ flex: 1;
+ overflow-y: auto;
+ display: flex;
+ flex-direction: column;
+ gap: 0.9rem;
+ }
+
+ .loading-state,
+ .empty-state {
+ margin: auto;
+ text-align: center;
+ color: rgba(255, 255, 255, 0.6);
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 0.6rem;
+ }
+
+ .empty-state span {
+ font-size: 0.75rem;
+ letter-spacing: 0.1em;
+ text-transform: uppercase;
+ color: rgba(255, 255, 255, 0.4);
+ }
+
+ .project-strip {
+ display: flex;
+ gap: 0.8rem;
+ padding: 0.8rem;
+ border-radius: 14px;
+ border: 1px solid rgba(255, 255, 255, 0.05);
+ background: rgba(255, 255, 255, 0.02);
+ position: relative;
+ }
+
+ .strip-meter {
+ width: 6px;
+ border-radius: 999px;
+ background: rgba(255, 255, 255, 0.05);
+ position: relative;
+ overflow: hidden;
+ }
+
+ .strip-meter span {
+ position: absolute;
+ inset: 0;
+ background: linear-gradient(180deg, var(--accent-purple), transparent);
+ animation: meterFlow 3s ease-in-out infinite;
+ }
+
+ .strip-details {
+ flex: 1;
+ }
+
+ .strip-head {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ gap: 0.6rem;
+ }
+
+ .project-name {
+ margin: 0;
+ font-weight: 600;
+ }
+
+ .strip-actions {
+ display: inline-flex;
+ gap: 0.4rem;
+ }
+
+ .strip-actions button {
+ background: rgba(255, 255, 255, 0.05);
+ border: 1px solid rgba(255, 255, 255, 0.08);
+ border-radius: 8px;
+ padding: 0.3rem;
+ color: rgba(255, 255, 255, 0.7);
+ cursor: pointer;
+ transition: color 0.2s, border-color 0.2s;
+ }
+
+ .strip-actions button:hover {
+ color: #fff;
+ border-color: rgba(255, 255, 255, 0.3);
+ }
+
+ .strip-meta {
+ margin-top: 0.4rem;
+ display: flex;
+ flex-wrap: wrap;
+ gap: 0.5rem;
+ font-size: 0.75rem;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: rgba(255, 255, 255, 0.45);
+ }
+
+ .spinner {
+ width: 32px;
+ height: 32px;
+ border-radius: 50%;
+ border: 3px solid rgba(255, 255, 255, 0.2);
+ border-top-color: var(--accent-orange);
+ animation: spin 1s linear infinite;
+ }
+
+ .custom-scrollbar::-webkit-scrollbar {
+ width: 8px;
+ }
+
+ .custom-scrollbar::-webkit-scrollbar-track {
+ background: transparent;
+ }
+
+ .custom-scrollbar::-webkit-scrollbar-thumb {
+ background: rgba(255, 255, 255, 0.08);
+ border-radius: 999px;
+ }
+
+ .custom-scrollbar::-webkit-scrollbar-thumb:hover {
+ background: rgba(255, 255, 255, 0.2);
+ }
+
+ .fade-in {
+ animation: fadeIn 0.4s ease;
+ }
+
+ @keyframes fadeIn {
+ from {
+ opacity: 0;
+ transform: translateY(8px);
+ }
+ to {
+ opacity: 1;
+ transform: translateY(0);
+ }
+ }
+
+ @keyframes spin {
+ to {
+ transform: rotate(360deg);
+ }
+ }
+
+ @keyframes pulse {
+ 0% {
+ opacity: 0.4;
+ }
+ 50% {
+ opacity: 1;
+ }
+ 100% {
+ opacity: 0.4;
+ }
+ }
+
+ @keyframes meterFlow {
+ 0% {
+ transform: translateY(100%);
+ }
+ 50% {
+ transform: translateY(0);
+ }
+ 100% {
+ transform: translateY(100%);
+ }
}
}
diff --git a/frontend/src/services/api.ts b/frontend/src/services/api.ts
index 57132f5..fbac5e1 100644
--- a/frontend/src/services/api.ts
+++ b/frontend/src/services/api.ts
@@ -3,7 +3,9 @@
* Handles all communication with the FastAPI backend
*/
-const API_BASE_URL = 'http://localhost:8000';
+const API_BASE_URL = typeof window !== 'undefined'
+ ? `${window.location.protocol}//${window.location.hostname}:8000`
+ : 'http://localhost:8000';
export interface ChatMessageRequest {
user_id: string;
@@ -49,44 +51,54 @@ class ApiService {
* Send a chat message to the AI
*/
async sendChatMessage(message: string): Promise
{
- const response = await fetch(`${API_BASE_URL}/api/chat`, {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- },
- body: JSON.stringify({
- user_id: this.userId,
- message,
- } as ChatMessageRequest),
- });
+ try {
+ const response = await fetch(`${API_BASE_URL}/api/chat`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify({
+ user_id: this.userId,
+ message,
+ } as ChatMessageRequest),
+ });
- if (!response.ok) {
- throw new Error(`Chat request failed: ${response.statusText}`);
+ if (!response.ok) {
+ throw new Error(`Chat request failed: ${response.statusText}`);
+ }
+
+ return response.json();
+ } catch (error) {
+ console.error('Chat API Error:', error);
+ throw error;
}
-
- return response.json();
}
/**
* Generate a music project from requirements
*/
async generateProject(requirements: string): Promise {
- const response = await fetch(`${API_BASE_URL}/api/generate`, {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- },
- body: JSON.stringify({
- user_id: this.userId,
- requirements,
- } as ProjectRequest),
- });
+ try {
+ const response = await fetch(`${API_BASE_URL}/api/generate`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify({
+ user_id: this.userId,
+ requirements,
+ } as ProjectRequest),
+ });
- if (!response.ok) {
- throw new Error(`Project generation failed: ${response.statusText}`);
+ if (!response.ok) {
+ throw new Error(`Project generation failed: ${response.statusText}`);
+ }
+
+ return response.json();
+ } catch (error) {
+ console.error('Generate API Error:', error);
+ throw error;
}
-
- return response.json();
}
/**