Skip to content

Commit 32276b5

Browse files
committed
feat: update references from Auralyze to Mixtapelabs API across the codebase
1 parent 9f76628 commit 32276b5

9 files changed

Lines changed: 32 additions & 32 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@mixtapelabs/api",
33
"version": "0.0.1",
44
"private": true,
5-
"description": "Auralyze API built with Express, Prisma, and TypeScript.",
5+
"description": "Mixtapelabs API built with Express, Prisma, and TypeScript.",
66
"type": "module",
77
"main": "dist/server.js",
88
"types": "dist/server.d.ts",

src/clients/index.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/**
2-
* Dependency injection factory for Auralyze Engine clients.
2+
* Dependency injection factory for Mixtapelabs Engine clients.
33
*
4-
* Builds AuralyzeEngineDeps object containing HTTP clients for microservices.
4+
* Builds MixtapelabsEngineDeps object containing HTTP clients for microservices.
55
* **STUBS DISABLED:** Always requires real service configuration or fails at startup.
66
*
77
* **Architecture:**
8-
* Auralyze API orchestrates 3 microservices via HTTP:
8+
* Mixtapelabs API orchestrates 3 microservices via HTTP:
99
* 1. **audio-metadata-service**: Extract file info with ffprobe
1010
* 2. **audio-analysis-service**: DSP processing (loudness, dynamics, spectrum, stereo)
1111
* 3. **audio-feedback-service**: LLM-based feedback generation (optional - can use OpenAI direct)
@@ -34,14 +34,14 @@
3434
* @module clients/index
3535
*/
3636
import { OpenAIFeedbackClient } from '@mixtapelabs/engine';
37-
import type { AuralyzeEngineDeps } from '@mixtapelabs/engine';
37+
import type { MixtapelabsEngineDeps } from '@mixtapelabs/engine';
3838
import { HttpAudioMetadataClient } from './http-audio-metadata-client.ts';
3939
import { HttpAudioAnalysisClient } from './http-audio-analysis-client.ts';
4040
import { HttpAudioFeedbackClient } from './http-audio-feedback-client.ts';
4141
import type { AppEnv } from '../config/env.ts';
4242

4343
/**
44-
* Build AuralyzeEngineDeps from environment configuration.
44+
* Build MixtapelabsEngineDeps from environment configuration.
4545
*
4646
* **STUBS DISABLED - Configuration Modes:**
4747
*
@@ -73,7 +73,7 @@ import type { AppEnv } from '../config/env.ts';
7373
* Better to fail at startup than during workflow execution.
7474
*
7575
* @param env - Application environment configuration (from config/env.ts)
76-
* @returns Initialized AuralyzeEngineDeps for engine workflows
76+
* @returns Initialized MixtapelabsEngineDeps for engine workflows
7777
* @throws {Error} If required service URLs or API keys are missing
7878
*
7979
* @example
@@ -83,10 +83,10 @@ import type { AppEnv } from '../config/env.ts';
8383
*
8484
* const env = loadEnv();
8585
* const deps = buildEngineDeps(env); // May throw if misconfigured
86-
* const engine = new AuralyzeEngine(deps);
86+
* const engine = new MixtapelabsEngine(deps);
8787
* ```
8888
*/
89-
export function buildEngineDeps(env: AppEnv): AuralyzeEngineDeps {
89+
export function buildEngineDeps(env: AppEnv): MixtapelabsEngineDeps {
9090
// STUBS DISABLED: Always use real services or fail
9191
if (!env.METADATA_SERVICE_URL || !env.ANALYSIS_SERVICE_URL) {
9292
throw new Error('Both METADATA_SERVICE_URL and ANALYSIS_SERVICE_URL are required');
@@ -105,7 +105,7 @@ export function buildEngineDeps(env: AppEnv): AuralyzeEngineDeps {
105105
apiKey: env.ANALYSIS_SERVICE_API_KEY,
106106
});
107107

108-
let feedbackClient: AuralyzeEngineDeps['feedbackClient'];
108+
let feedbackClient: MixtapelabsEngineDeps['feedbackClient'];
109109
if (env.FEEDBACK_MODE === 'service') {
110110
if (!env.FEEDBACK_SERVICE_URL || !env.FEEDBACK_SERVICE_API_KEY) {
111111
throw new Error('FEEDBACK_SERVICE_URL and FEEDBACK_SERVICE_API_KEY are required');

src/clients/stub-clients.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* @module clients/stub-clients
3232
*/
3333
import type {
34-
AuralyzeEngineDeps,
34+
MixtapelabsEngineDeps,
3535
AudioMetadataClient,
3636
AudioAnalysisClient,
3737
FeedbackClient,
@@ -106,7 +106,7 @@ const stubFeedbackClient: FeedbackClient = {
106106
};
107107

108108
/**
109-
* Create AuralyzeEngineDeps with stub clients for all services.
109+
* Create MixtapelabsEngineDeps with stub clients for all services.
110110
*
111111
* **Use Cases:**
112112
* - Integration tests: Mock external services
@@ -116,18 +116,18 @@ const stubFeedbackClient: FeedbackClient = {
116116
* **Activation:**
117117
* Called by buildEngineDeps() when `USE_STUB_CLIENTS=true` in environment.
118118
*
119-
* @returns Complete AuralyzeEngineDeps with stub implementations
119+
* @returns Complete MixtapelabsEngineDeps with stub implementations
120120
*
121121
* @example
122122
* ```typescript
123123
* // In tests:
124124
* const deps = createStubDeps();
125-
* const engine = new AuralyzeEngine(deps);
125+
* const engine = new MixtapelabsEngine(deps);
126126
* const result = await engine.runWorkflow({ url: 'stub://test.wav' });
127127
* // Result uses stub data, no HTTP calls made
128128
* ```
129129
*/
130-
export function createStubDeps(): AuralyzeEngineDeps {
130+
export function createStubDeps(): MixtapelabsEngineDeps {
131131
return {
132132
audioMetadataClient: stubMetadataClient,
133133
audioAnalysisClient: stubAnalysisClient,

src/controllers/session-controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export class SessionController {
121121
/**
122122
* **POST /** - Create and run a new analysis session
123123
*
124-
* Triggers the complete Auralyze workflow:
124+
* Triggers the complete Mixtapelabs workflow:
125125
* 1. Validates request payload (sessionId, uploadUrl, userContext)
126126
* 2. Extracts userId from authenticated user
127127
* 3. Runs engine workflow (metadata → analysis → feedback)

src/repositories/user-repository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* User data access layer for Auralyze API.
2+
* User data access layer for Mixtapelabs API.
33
*
44
* Manages all database operations for the User entity using Prisma ORM.
55
* Implements email normalization (lowercase) for case-insensitive lookups

src/server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async function bootstrap() {
4242
});
4343

4444
// Log startup configuration
45-
console.log('=== Auralyze API Configuration ===');
45+
console.log('=== Mixtapelabs API Configuration ===');
4646
console.log('PORT:', env.PORT);
4747
console.log('NODE_ENV:', env.NODE_ENV);
4848
console.log('DATABASE_URL:', env.DATABASE_URL ? '***configured***' : 'NOT SET');
@@ -53,7 +53,7 @@ async function bootstrap() {
5353
console.log('==================================');
5454

5555
app.listen(env.PORT, () => {
56-
console.log(`Auralyze API listening on port ${env.PORT}`);
56+
console.log(`Mixtapelabs API listening on port ${env.PORT}`);
5757
});
5858
}
5959

src/services/local-auth-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Local authentication service for Auralyze API.
2+
* Local authentication service for Mixtapelabs API.
33
*
44
* Handles user registration, login, and JWT token management using bcrypt for
55
* password hashing and jsonwebtoken for stateless session management.

src/services/session-service.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
import { describe, expect, it, vi } from 'vitest';
2-
import type { AuralyzeEngineDeps, RunSessionInput, EngineState } from '@mixtapelabs/engine';
2+
import type { MixtapelabsEngineDeps, RunSessionInput, EngineState } from '@mixtapelabs/engine';
33
import { SessionService } from './session-service.js';
44
import { SessionRepository } from '../repositories/session-repository.js';
5-
import { runAuralyzeSession } from '@mixtapelabs/engine';
5+
import { runMixtapelabsSession } from '@mixtapelabs/engine';
66

77
vi.mock('../repositories/session-repository.js', () => ({
88
SessionRepository: vi.fn().mockImplementation(() => ({ save: vi.fn() })),
99
}));
1010

1111
vi.mock('@mixtapelabs/engine', () => ({
12-
runAuralyzeSession: vi
12+
runMixtapelabsSession: vi
1313
.fn()
1414
.mockResolvedValue({ sessionId: 'test-session' } satisfies EngineState),
1515
}));
1616

17-
const runAuralyzeSessionMock = vi.mocked(runAuralyzeSession);
17+
const runMixtapelabsSessionMock = vi.mocked(runMixtapelabsSession);
1818

19-
const mockDeps: AuralyzeEngineDeps = {
19+
const mockDeps: MixtapelabsEngineDeps = {
2020
audioMetadataClient: {
2121
getMetadata: vi.fn().mockResolvedValue({
2222
durationSec: 1,
@@ -41,7 +41,7 @@ describe('SessionService', () => {
4141
};
4242

4343
const state = await service.runSession(input, 'test-user-id');
44-
expect(runAuralyzeSessionMock).toHaveBeenCalledWith(input, mockDeps);
44+
expect(runMixtapelabsSessionMock).toHaveBeenCalledWith(input, mockDeps);
4545
expect(repository.save).toHaveBeenCalledWith(state, 'test-user-id');
4646
});
4747
});

src/services/session-service.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Session Service - Orchestration Layer for Analysis Workflows
33
*
4-
* Thin service layer that coordinates between the Auralyze Engine and
4+
* Thin service layer that coordinates between the Mixtapelabs Engine and
55
* the SessionRepository. Primary responsibilities:
66
*
77
* 1. **Workflow Execution**: Delegates to engine for analysis pipeline
@@ -21,8 +21,8 @@
2121
*
2222
* @module api/services/session
2323
*/
24-
import type { RunSessionInput, EngineState, AuralyzeEngineDeps } from '@mixtapelabs/engine';
25-
import { runAuralyzeSession } from '@mixtapelabs/engine';
24+
import type { RunSessionInput, EngineState, MixtapelabsEngineDeps } from '@mixtapelabs/engine';
25+
import { runMixtapelabsSession } from '@mixtapelabs/engine';
2626
import { SessionRepository } from '../repositories/session-repository.ts';
2727

2828
/**
@@ -48,12 +48,12 @@ import { SessionRepository } from '../repositories/session-repository.ts';
4848
*/
4949
export class SessionService {
5050
constructor(
51-
private readonly deps: AuralyzeEngineDeps,
51+
private readonly deps: MixtapelabsEngineDeps,
5252
private readonly repository: SessionRepository,
5353
) {}
5454

5555
/**
56-
* Executes the complete Auralyze workflow and persists the result.
56+
* Executes the complete Mixtapelabs workflow and persists the result.
5757
*
5858
* This is the core business operation of the entire system:
5959
* - User uploads audio file (separate upload endpoint)
@@ -112,7 +112,7 @@ export class SessionService {
112112
}
113113

114114
// Execute complete workflow (metadata → analysis → feedback)
115-
const state = await runAuralyzeSession(input, this.deps);
115+
const state = await runMixtapelabsSession(input, this.deps);
116116

117117
// Persist result (success or error) to database with final status
118118
await this.repository.save(state, userId);

0 commit comments

Comments
 (0)