Spaces:
Running
Running
Syed Arfan
Claude
commited on
Commit
·
89be708
1
Parent(s):
d60e06b
Add custom favicon, fix LinkedIn URL, improve Mermaid diagrams
Browse files- Created professional SVG favicon (chat bubble with sentiment indicator)
- Fixed LinkedIn URL in footer to linkedin.com/in/syedarfan
- Fixed LinkedIn URL in README
- Updated Mermaid diagrams:
- Changed arrow colors to white for better visibility
- Fixed overlapping text with line breaks
- Changed theme to dark for better contrast
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- README.md +41 -43
- frontend/index.html +1 -1
- frontend/public/favicon.svg +32 -0
- frontend/src/components/Footer.tsx +1 -1
README.md
CHANGED
|
@@ -63,30 +63,28 @@ A production-ready sentiment analysis API built with FastAPI, featuring multi-se
|
|
| 63 |
## Architecture
|
| 64 |
### System Overview
|
| 65 |
```mermaid
|
| 66 |
-
%%{init: {'theme':'
|
| 67 |
graph TB
|
| 68 |
Client[Client Browser]
|
| 69 |
Nginx[nginx Load Balancer<br/>Port 80]
|
| 70 |
-
API[
|
| 71 |
-
Redis[(Redis Cache<br/>Port 6379
|
| 72 |
-
Postgres[(PostgreSQL<br/>Port 5432
|
| 73 |
-
|
| 74 |
Client -->|HTTP Request| Nginx
|
| 75 |
Nginx -->|Proxy| API
|
| 76 |
-
API -->|
|
| 77 |
-
Redis
|
| 78 |
-
API -->|
|
| 79 |
-
API -->|
|
| 80 |
-
API -->|4. Store Result| Postgres
|
| 81 |
-
API -->|5. Cache Result| Redis
|
| 82 |
API -->|Response| Nginx
|
| 83 |
Nginx -->|Response| Client
|
| 84 |
-
|
| 85 |
-
style Client fill:#4fc3f7,stroke:#
|
| 86 |
-
style Nginx fill:#ffb74d,stroke:#
|
| 87 |
-
style API fill:#81c784,stroke:#
|
| 88 |
-
style Redis fill:#e57373,stroke:#
|
| 89 |
-
style Postgres fill:#ba68c8,stroke:#
|
| 90 |
```
|
| 91 |
|
| 92 |
### Request Flow
|
|
@@ -120,47 +118,47 @@ sequenceDiagram
|
|
| 120 |
|
| 121 |
### Container Architecture
|
| 122 |
```mermaid
|
| 123 |
-
%%{init: {'theme':'
|
| 124 |
graph LR
|
| 125 |
subgraph "Docker Compose"
|
| 126 |
-
N[nginx:
|
| 127 |
-
A[sentiment-
|
| 128 |
-
R[redis:7-
|
| 129 |
-
P[postgres:15-
|
| 130 |
end
|
| 131 |
-
|
| 132 |
N -.->|depends_on| A
|
| 133 |
A -.->|depends_on| R
|
| 134 |
A -.->|depends_on| P
|
| 135 |
-
|
| 136 |
-
V1[(
|
| 137 |
P -.->|persists to| V1
|
| 138 |
-
|
| 139 |
-
style N fill:#ffb74d,stroke:#
|
| 140 |
-
style A fill:#81c784,stroke:#
|
| 141 |
-
style R fill:#e57373,stroke:#
|
| 142 |
-
style P fill:#ba68c8,stroke:#
|
| 143 |
-
style V1 fill:#4fc3f7,stroke:#
|
| 144 |
```
|
| 145 |
|
| 146 |
### Performance Comparison
|
| 147 |
```mermaid
|
| 148 |
-
%%{init: {'theme':'
|
| 149 |
graph TD
|
| 150 |
subgraph "Without Cache"
|
| 151 |
-
A1[Request 1
|
| 152 |
-
A2 --> A3[Request 3
|
| 153 |
-
A3 --> A4[1000 requests
|
| 154 |
end
|
| 155 |
-
|
| 156 |
subgraph "With Redis Cache"
|
| 157 |
-
B1[Request 1:
|
| 158 |
-
B2 --> B3[Request 3:
|
| 159 |
-
B3 --> B4[1000 requests
|
| 160 |
end
|
| 161 |
-
|
| 162 |
-
style A4 fill:#e57373,stroke:#
|
| 163 |
-
style B4 fill:#81c784,stroke:#
|
| 164 |
```
|
| 165 |
|
| 166 |
---
|
|
@@ -599,7 +597,7 @@ MIT License - feel free to use this project for learning or portfolio purposes.
|
|
| 599 |
|
| 600 |
**Syed Arfan Hussain**
|
| 601 |
- GitHub: [@simplyarfan](https://github.com/simplyarfan)
|
| 602 |
-
- LinkedIn: [Syed Arfan Hussain](https://linkedin.com/in/syedarfan)
|
| 603 |
|
| 604 |
---
|
| 605 |
|
|
|
|
| 63 |
## Architecture
|
| 64 |
### System Overview
|
| 65 |
```mermaid
|
| 66 |
+
%%{init: {'theme':'dark', 'themeVariables': { 'primaryColor':'#4fc3f7','primaryTextColor':'#fff','primaryBorderColor':'#fff','lineColor':'#ffffff','secondaryColor':'#ffb74d','tertiaryColor':'#81c784'}}}%%
|
| 67 |
graph TB
|
| 68 |
Client[Client Browser]
|
| 69 |
Nginx[nginx Load Balancer<br/>Port 80]
|
| 70 |
+
API[FastAPI Application<br/>Port 8000]
|
| 71 |
+
Redis[(Redis Cache<br/>Port 6379)]
|
| 72 |
+
Postgres[(PostgreSQL<br/>Port 5432)]
|
| 73 |
+
|
| 74 |
Client -->|HTTP Request| Nginx
|
| 75 |
Nginx -->|Proxy| API
|
| 76 |
+
API -->|Check Cache| Redis
|
| 77 |
+
Redis -.->|Cache Hit| API
|
| 78 |
+
API -->|Store Result| Postgres
|
| 79 |
+
API -->|Cache Result| Redis
|
|
|
|
|
|
|
| 80 |
API -->|Response| Nginx
|
| 81 |
Nginx -->|Response| Client
|
| 82 |
+
|
| 83 |
+
style Client fill:#4fc3f7,stroke:#fff,stroke-width:2px,color:#000
|
| 84 |
+
style Nginx fill:#ffb74d,stroke:#fff,stroke-width:2px,color:#000
|
| 85 |
+
style API fill:#81c784,stroke:#fff,stroke-width:2px,color:#000
|
| 86 |
+
style Redis fill:#e57373,stroke:#fff,stroke-width:2px,color:#fff
|
| 87 |
+
style Postgres fill:#ba68c8,stroke:#fff,stroke-width:2px,color:#fff
|
| 88 |
```
|
| 89 |
|
| 90 |
### Request Flow
|
|
|
|
| 118 |
|
| 119 |
### Container Architecture
|
| 120 |
```mermaid
|
| 121 |
+
%%{init: {'theme':'dark', 'themeVariables': { 'primaryColor':'#4fc3f7','primaryTextColor':'#fff','primaryBorderColor':'#fff','lineColor':'#ffffff'}}}%%
|
| 122 |
graph LR
|
| 123 |
subgraph "Docker Compose"
|
| 124 |
+
N[nginx:alpine<br/>15MB]
|
| 125 |
+
A[sentiment-api<br/>1.2GB]
|
| 126 |
+
R[redis:7-alpine<br/>15MB]
|
| 127 |
+
P[postgres:15-alpine<br/>240MB]
|
| 128 |
end
|
| 129 |
+
|
| 130 |
N -.->|depends_on| A
|
| 131 |
A -.->|depends_on| R
|
| 132 |
A -.->|depends_on| P
|
| 133 |
+
|
| 134 |
+
V1[(postgres_data<br/>Volume)]
|
| 135 |
P -.->|persists to| V1
|
| 136 |
+
|
| 137 |
+
style N fill:#ffb74d,stroke:#fff,stroke-width:2px,color:#000
|
| 138 |
+
style A fill:#81c784,stroke:#fff,stroke-width:2px,color:#000
|
| 139 |
+
style R fill:#e57373,stroke:#fff,stroke-width:2px,color:#fff
|
| 140 |
+
style P fill:#ba68c8,stroke:#fff,stroke-width:2px,color:#fff
|
| 141 |
+
style V1 fill:#4fc3f7,stroke:#fff,stroke-width:2px,color:#000
|
| 142 |
```
|
| 143 |
|
| 144 |
### Performance Comparison
|
| 145 |
```mermaid
|
| 146 |
+
%%{init: {'theme':'dark', 'themeVariables': { 'primaryColor':'#4fc3f7','primaryTextColor':'#fff','primaryBorderColor':'#fff','lineColor':'#ffffff'}}}%%
|
| 147 |
graph TD
|
| 148 |
subgraph "Without Cache"
|
| 149 |
+
A1[Request 1<br/>100ms] --> A2[Request 2<br/>100ms]
|
| 150 |
+
A2 --> A3[Request 3<br/>100ms]
|
| 151 |
+
A3 --> A4[1000 requests<br/>100 seconds]
|
| 152 |
end
|
| 153 |
+
|
| 154 |
subgraph "With Redis Cache"
|
| 155 |
+
B1[Request 1: 100ms<br/>Cache Miss] --> B2[Request 2: 2ms<br/>Cache Hit]
|
| 156 |
+
B2 --> B3[Request 3: 2ms<br/>Cache Hit]
|
| 157 |
+
B3 --> B4[1000 requests<br/>2.1 seconds]
|
| 158 |
end
|
| 159 |
+
|
| 160 |
+
style A4 fill:#e57373,stroke:#fff,stroke-width:2px,color:#fff
|
| 161 |
+
style B4 fill:#81c784,stroke:#fff,stroke-width:2px,color:#000
|
| 162 |
```
|
| 163 |
|
| 164 |
---
|
|
|
|
| 597 |
|
| 598 |
**Syed Arfan Hussain**
|
| 599 |
- GitHub: [@simplyarfan](https://github.com/simplyarfan)
|
| 600 |
+
- LinkedIn: [Syed Arfan Hussain](https://www.linkedin.com/in/syedarfan)
|
| 601 |
|
| 602 |
---
|
| 603 |
|
frontend/index.html
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8" />
|
| 5 |
-
<link rel="icon"
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 7 |
|
| 8 |
<!-- SEO Meta Tags -->
|
|
|
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8" />
|
| 5 |
+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 7 |
|
| 8 |
<!-- SEO Meta Tags -->
|
frontend/public/favicon.svg
ADDED
|
|
frontend/src/components/Footer.tsx
CHANGED
|
@@ -32,7 +32,7 @@ const Footer = () => {
|
|
| 32 |
<Github className="w-5 h-5" />
|
| 33 |
</a>
|
| 34 |
<a
|
| 35 |
-
href="https://www.linkedin.com/in/
|
| 36 |
target="_blank"
|
| 37 |
rel="noopener noreferrer"
|
| 38 |
className="p-2 text-gray-500 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-colors"
|
|
|
|
| 32 |
<Github className="w-5 h-5" />
|
| 33 |
</a>
|
| 34 |
<a
|
| 35 |
+
href="https://www.linkedin.com/in/syedarfan"
|
| 36 |
target="_blank"
|
| 37 |
rel="noopener noreferrer"
|
| 38 |
className="p-2 text-gray-500 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-colors"
|