A modern web application built with Vue 3 and Node.js, combining an AI-powered music interface with a robust backend server.
jukebox-ai/
├── client/ # Vue 3 frontend
│ ├── index.html
│ ├── src/
│ │ ├── App.vue
│ │ ├── main.ts
│ │ ├── components/ # Reusable components
│ │ ├── views/ # Page components
│ │ ├── router/ # Vue Router configuration
│ │ ├── stores/ # Pinia state management
│ │ └── types/ # TypeScript definitions
│ ├── public/ # Static assets
│ └── vite.config.ts # Vite configuration
├── server/ # Node.js backend
│ ├── server.js # Express server
│ ├── routes/ # API routes
│ └── middleware/ # Express middleware
├── package.json # Shared dependencies
├── Dockerfile # Docker configuration
├── .dockerignore # Docker ignore file
└── tsconfig.json # TypeScript configuration
- Node.js 18.x or later
- npm 8.x or later
- Docker (optional)
-
Clone the repository
git clone <repository-url> cd jukebox-ai
-
Install dependencies
npm install
-
Configure environment variables
cp .env.example .env
Edit
.env
file with your settings:PORT=3000 API_URL=http://your-backend-api-url
Run both the frontend and backend in development mode:
npm run dev
This will start:
- Vue dev server at http://localhost:5173
- Node.js backend at http://localhost:3000
To run only the frontend or backend:
# Frontend only
npm run dev:client
# Backend only
npm run dev:server
-
Build the application
npm run build
This creates a production build in
dist/client/
-
Start the production server
npm start
The application will be available at http://localhost:3000
Build and run the application using Docker:
# Build the Docker image
docker build -t jukebox-ai .
# Run the container
docker run -p 3000:3000 --env-file .env jukebox-ai
Environment variables can be passed to the container:
docker run -p 3000:3000 \
-e PORT=3000 \
-e API_URL=http://your-backend-api-url \
jukebox-ai
[Previous sections remain the same...]
src/components/
- Reusable Vue componentssrc/views/
- Page-level Vue componentssrc/router/
- Vue Router configurationsrc/stores/
- Pinia state managementsrc/types/
- TypeScript type definitions
server.js
- Main Express applicationroutes/
- API route definitionsmiddleware/
- Custom Express middleware
Dockerfile
- Docker build configuration.dockerignore
- Files excluded from Docker buildpackage.json
- Project dependencies and scriptstsconfig.json
- TypeScript configuration
[Rest of the README remains the same...]