Syed Arfan Claude commited on
Commit
d60e06b
Β·
1 Parent(s): 52cdaa9

Update README with live demo links and tech badges

Browse files

- Added prominent Live Demo and API Status badges
- Added tech stack badges (Python, FastAPI, React, TypeScript, etc.)
- Added live demo section with all deployment URLs
- Updated deployment section with architecture diagram
- Added Hugging Face Spaces deployment instructions
- Updated tech stack table with all technologies

πŸ€– Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

Files changed (1) hide show
  1. README.md +83 -11
README.md CHANGED
@@ -9,9 +9,35 @@ app_port: 7860
9
 
10
  # Sentiment Analysis API
11
 
12
- ![Tests](https://github.com/simplyarfan/sentiment-api/actions/workflows/test.yml/badge.svg)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
- A production-ready sentiment analysis API built with FastAPI, featuring multi-service architecture with PostgreSQL, Redis caching, and nginx load balancing. Analyzes text sentiment (POSITIVE/NEGATIVE) with 99%+ accuracy using DistilBERT transformer model.
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
  ## Features
17
 
@@ -143,14 +169,18 @@ graph TD
143
 
144
  | Category | Technology | Purpose |
145
  |----------|-----------|---------|
 
 
146
  | **API Framework** | FastAPI | High-performance async API |
147
- | **ML Model** | DistilBERT | Sentiment classification |
148
  | **Database** | PostgreSQL 15 | Persistent data storage |
149
  | **Cache** | Redis 7 | Sub-millisecond lookups |
150
- | **Load Balancer** | nginx | Reverse proxy & distribution |
151
  | **Containerization** | Docker + Compose | Service orchestration |
152
- | **Testing** | pytest | Automated unit testing |
153
- | **CI/CD** | GitHub Actions | Automated testing pipeline |
 
 
 
154
 
155
  ---
156
 
@@ -319,16 +349,58 @@ services:
319
 
320
  ## Deployment
321
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
322
  ### Local Development
323
  ```bash
324
  docker-compose up
325
  ```
326
 
327
- ### Production (Coming Soon)
328
- - AWS ECS/Fargate deployment
329
- - CloudWatch monitoring
330
- - Auto-scaling configuration
331
- - SSL/TLS certificates
 
 
 
 
 
 
 
 
332
 
333
  ---
334
 
 
9
 
10
  # Sentiment Analysis API
11
 
12
+ [![Live Demo](https://img.shields.io/badge/Live%20Demo-Visit%20Site-brightgreen?style=for-the-badge&logo=github)](https://simplyarfan.github.io/Sentiment-API/)
13
+ [![API Status](https://img.shields.io/badge/API-Hugging%20Face-yellow?style=for-the-badge&logo=huggingface)](https://huggingface.co/spaces/simplyarfan/sentiment-api)
14
+
15
+ ![Tests](https://github.com/simplyarfan/Sentiment-API/actions/workflows/test.yml/badge.svg)
16
+ ![Deploy](https://github.com/simplyarfan/Sentiment-API/actions/workflows/deploy-frontend.yml/badge.svg)
17
+
18
+ ### Tech Stack
19
+ ![Python](https://img.shields.io/badge/Python-3.11-3776AB?style=flat-square&logo=python&logoColor=white)
20
+ ![FastAPI](https://img.shields.io/badge/FastAPI-0.115-009688?style=flat-square&logo=fastapi&logoColor=white)
21
+ ![React](https://img.shields.io/badge/React-18-61DAFB?style=flat-square&logo=react&logoColor=black)
22
+ ![TypeScript](https://img.shields.io/badge/TypeScript-5-3178C6?style=flat-square&logo=typescript&logoColor=white)
23
+ ![PostgreSQL](https://img.shields.io/badge/PostgreSQL-15-4169E1?style=flat-square&logo=postgresql&logoColor=white)
24
+ ![Redis](https://img.shields.io/badge/Redis-7-DC382D?style=flat-square&logo=redis&logoColor=white)
25
+ ![Docker](https://img.shields.io/badge/Docker-Compose-2496ED?style=flat-square&logo=docker&logoColor=white)
26
+ ![Hugging Face](https://img.shields.io/badge/Hugging%20Face-Spaces-FFD21E?style=flat-square&logo=huggingface&logoColor=black)
27
 
28
+ ---
29
+
30
+ A production-ready sentiment analysis API built with FastAPI, featuring multi-service architecture with PostgreSQL, Redis caching, and a modern React frontend. Analyzes text sentiment (POSITIVE/NEGATIVE) with 99%+ accuracy using DistilBERT transformer model.
31
+
32
+ ## Live Demo
33
+
34
+ **Try it now:** [https://simplyarfan.github.io/Sentiment-API/](https://simplyarfan.github.io/Sentiment-API/)
35
+
36
+ | Component | URL |
37
+ |-----------|-----|
38
+ | **Frontend** | [simplyarfan.github.io/Sentiment-API](https://simplyarfan.github.io/Sentiment-API/) |
39
+ | **API** | [huggingface.co/spaces/simplyarfan/sentiment-api](https://huggingface.co/spaces/simplyarfan/sentiment-api) |
40
+ | **API Docs** | [simplyarfan-sentiment-api.hf.space/docs](https://simplyarfan-sentiment-api.hf.space/docs) |
41
 
42
  ## Features
43
 
 
169
 
170
  | Category | Technology | Purpose |
171
  |----------|-----------|---------|
172
+ | **Frontend** | React 18 + TypeScript | Modern, type-safe UI |
173
+ | **Styling** | Tailwind CSS | Utility-first CSS framework |
174
  | **API Framework** | FastAPI | High-performance async API |
175
+ | **ML Model** | DistilBERT (Hugging Face) | Sentiment classification |
176
  | **Database** | PostgreSQL 15 | Persistent data storage |
177
  | **Cache** | Redis 7 | Sub-millisecond lookups |
 
178
  | **Containerization** | Docker + Compose | Service orchestration |
179
+ | **Frontend Hosting** | GitHub Pages | Static site hosting |
180
+ | **API Hosting** | Hugging Face Spaces | ML-optimized container hosting |
181
+ | **Database Hosting** | Render | Managed PostgreSQL & Redis |
182
+ | **Testing** | pytest + Vitest | Backend & frontend testing |
183
+ | **CI/CD** | GitHub Actions | Automated testing & deployment |
184
 
185
  ---
186
 
 
349
 
350
  ## Deployment
351
 
352
+ ### Live Production Environment
353
+
354
+ The application is deployed and running:
355
+
356
+ | Service | Platform | URL |
357
+ |---------|----------|-----|
358
+ | **Frontend** | GitHub Pages | [simplyarfan.github.io/Sentiment-API](https://simplyarfan.github.io/Sentiment-API/) |
359
+ | **API** | Hugging Face Spaces | [simplyarfan-sentiment-api.hf.space](https://simplyarfan-sentiment-api.hf.space) |
360
+ | **Database** | Render PostgreSQL | Managed cloud database |
361
+ | **Cache** | Render Redis | Managed Redis instance |
362
+
363
+ ### Architecture
364
+ ```
365
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
366
+ β”‚ GitHub Pages (Frontend) β”‚
367
+ β”‚ React + TypeScript + Tailwind CSS β”‚
368
+ β”‚ https://simplyarfan.github.io/Sentiment-API/ β”‚
369
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
370
+ β”‚
371
+ β–Ό API Calls
372
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€οΏ½οΏ½οΏ½β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
373
+ β”‚ Hugging Face Spaces (API) β”‚
374
+ β”‚ FastAPI + DistilBERT (2GB RAM, Docker) β”‚
375
+ β”‚ https://simplyarfan-sentiment-api.hf.space β”‚
376
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
377
+ β”‚
378
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
379
+ β–Ό β–Ό
380
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
381
+ β”‚ Render PostgreSQL β”‚ β”‚ Render Redis β”‚
382
+ β”‚ Persistent Storage β”‚ β”‚ Caching Layer β”‚
383
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
384
+ ```
385
+
386
  ### Local Development
387
  ```bash
388
  docker-compose up
389
  ```
390
 
391
+ ### Deploy Your Own
392
+
393
+ **Frontend (GitHub Pages):**
394
+ 1. Fork this repository
395
+ 2. Enable GitHub Pages in Settings
396
+ 3. Set `VITE_API_BASE_URL` in Actions variables
397
+ 4. Push to trigger deployment
398
+
399
+ **API (Hugging Face Spaces):**
400
+ 1. Create a Space at [huggingface.co/spaces](https://huggingface.co/spaces)
401
+ 2. Select Docker SDK
402
+ 3. Push code: `git push https://huggingface.co/spaces/YOUR_USERNAME/sentiment-api main`
403
+ 4. Add `DATABASE_URL` and `REDIS_URL` as secrets
404
 
405
  ---
406