Skip to content

Commit 757a73c

Browse files
refactor: add lombok annotation
2 parents 8f2d4c8 + 7ec9875 commit 757a73c

File tree

1 file changed

+170
-0
lines changed

1 file changed

+170
-0
lines changed

README.md

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
# 🎵 Audio Recognition System (Shazam-like) 🎶
2+
3+
![Microservices Architecture Diagram](https://d3mxt5v3yxgcsr.cloudfront.net/courses/14946/course_14946_image.jpg)
4+
5+
## Table of Contents
6+
- [Technology Stack](#-technology-stack)
7+
- [System Components](#-system-components)
8+
- [Prerequisites](#-prerequisites)
9+
- [Quick Start](#-quick-start)
10+
- [API Documentation](#-api-documentation)
11+
- [Environment Variables](#-environment-variables)
12+
- [Service Architecture](#-service-architecture)
13+
- [License](#-license)
14+
15+
## 🚀 Technology Stack
16+
17+
**Core Components:**
18+
- ☕ Java 17
19+
- 🌱 Spring Boot 3
20+
- ☁️ Spring Cloud
21+
- 🐳 Docker Compose
22+
23+
**Data Layer:**
24+
- 🐘 PostgreSQL (Metadata)
25+
- 🔴 Redis (Caching)
26+
- 🔍 Elasticsearch (Fingerprints)
27+
28+
**Infrastructure:**
29+
- 📨 Apache Kafka (Events)
30+
- 🗄️ MinIO (Audio Storage)
31+
- 📊 Kibana (Monitoring)
32+
33+
## 🏗 System Architecture
34+
35+
```mermaid
36+
graph TD
37+
%% Clients
38+
A[📱 Client] --> B[🚪 API Gateway]
39+
40+
%% Services
41+
B --> C[📤 Ingestion Service]
42+
B --> D[📝 Metadata Service]
43+
B --> E[🔍 Fingerprint Service]
44+
45+
%% Data Stores
46+
C --> F[🪣 MinIO]
47+
C --> G[📨 Kafka]
48+
D --> H[🐘 PostgreSQL]
49+
D --> J[🔴 Redis]
50+
E --> I[🔎 Elasticsearch]
51+
52+
%% Connections
53+
G --> E
54+
C -.-> D
55+
J -.-> D
56+
57+
%% Styling
58+
classDef client fill:#f9f,stroke:#333,color:#000;
59+
classDef gateway fill:#7af,stroke:#333,color:#000;
60+
classDef service fill:#aef,stroke:#333,color:#000;
61+
classDef storage fill:#fea,stroke:#333,color:#000;
62+
classDef queue fill:#afa,stroke:#333,color:#000;
63+
64+
class A client;
65+
class B gateway;
66+
class C,D,E service;
67+
class F,H,I storage;
68+
class G,J queue;
69+
70+
linkStyle 0,1,2,3,4,5,6,7,8 stroke:#666,stroke-width:2px;
71+
```
72+
73+
74+
## 📦 System Components
75+
76+
| Service | Port | Description |
77+
|----------------------|-------|--------------------------------------|
78+
| Gateway Service | 8081 | API Gateway |
79+
| Service Registry | 8761 | Eureka Discovery Server |
80+
| Config Service | 8888 | Centralized Configuration |
81+
| Audio Ingestion | 8000 | Audio Upload Processing |
82+
| Metadata Service | 8010 | Track Metadata Management |
83+
| Fingerprint Service | 8080 | Audio Fingerprint Matching |
84+
85+
## ⚙️ Supporting Services
86+
87+
| Service | Port | Description |
88+
|--------------|-------|----------------------------|
89+
| PostgreSQL | 5432 | Metadata Storage |
90+
| Redis | 6379 | Caching |
91+
| MinIO | 9000 | Audio File Storage |
92+
| Kafka | 9092 | Event Streaming |
93+
| Elasticsearch| 9200 | Fingerprint Storage |
94+
| Kibana | 5601 | Monitoring Dashboard |
95+
96+
## 📋 Prerequisites
97+
98+
- Docker 20.10+
99+
- Docker Compose 2.0+
100+
- 8GB+ RAM recommended
101+
102+
Вот красивый, отформатированный Markdown текст, который можно скопировать одним кликом:
103+
104+
```markdown
105+
## 🚀 Quick Start
106+
107+
1. **Clone the repository**:
108+
```bash
109+
git clone https://github.com/BogdanPryadko4853/audio-shazam.git
110+
cd audio-shazam
111+
```
112+
113+
2. **Start all services**:
114+
```bash
115+
docker-compose up -d
116+
```
117+
118+
3. **Verify services are running**:
119+
```bash
120+
docker-compose ps
121+
```
122+
123+
## 📚 API Documentation
124+
125+
All APIs are available through the Gateway:
126+
127+
### 🎵 Ingestion Service
128+
```
129+
POST /api/v1/audio - Upload audio file
130+
GET /api/v1/audio/{id} - Get audio metadata
131+
```
132+
133+
### 📝 Metadata Service
134+
```
135+
GET /api/v1/tracks - List all tracks
136+
POST /api/v1/tracks - Create track metadata
137+
GET /api/v1/tracks/{id} - Get track details
138+
```
139+
140+
### 🔍 Fingerprint Service
141+
```
142+
POST /api/v1/fingerprints/search - Search by audio sample
143+
GET /api/v1/fingerprints/{id} - Get fingerprint details
144+
```
145+
146+
## 🔧 Environment Variables
147+
148+
Key configuration options:
149+
```ini
150+
# Database Configuration
151+
SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/audio_metadata
152+
SPRING_DATASOURCE_USERNAME=audio_admin
153+
SPRING_DATASOURCE_PASSWORD=securepass
154+
155+
# Storage Configuration
156+
MINIO_ENDPOINT=http://minio:9000
157+
MINIO_ACCESS_KEY=minioadmin
158+
MINIO_SECRET_KEY=minioadmin
159+
MINIO_BUCKET=audio-bucket
160+
161+
# Messaging Configuration
162+
SPRING_KAFKA_BOOTSTRAP_SERVERS=kafka:9092
163+
```
164+
165+
### 💡 Access Points
166+
- **API Gateway**: `http://localhost:8081`
167+
- **Swagger UI**: `http://localhost:8081/swagger-ui.html`
168+
- **MinIO Console**: `http://localhost:9001` (credentials: minioadmin/minioadmin)
169+
```
170+

0 commit comments

Comments
 (0)