sentiment-backend-api
See the codeGerçek zamanlı duygu analizi ile çalışan, oda tabanlı sohbet uygulaması. React Web, React Native Mobile, .NET Core API ve Python AI servisi ile geliştirilmiştir.
Bu proje, kullanıcıların şifre korumalı odalarda sohbet edebileceği ve her mesajın otomatik olarak duygu analizi yapılarak pozitif/nötr/negatif olarak etiketlendiği bir chat uygulamasıdır.
┌─────────────────────┐
│ React Web App │ ←→ Polling (3s)
│ (Vercel) │
└──────────┬──────────┘
│
↓ REST API
┌─────────────────────┐
│ .NET Core API │ ←→ SQLite Database
│ (Render) │
└──────────┬──────────┘
│
↓ HTTP Request
┌─────────────────────┐
│ Python AI Service │
│ (HF Spaces) │ → BERT Sentiment Analysis
└─────────────────────┘
sentiment-chat/
├── frontend/ # React Web Uygulaması (Vite)
├── mobile/ # React Native CLI Uygulaması
├── backend/ # .NET Core 8 Web API
├── ai-service/ # Python Gradio AI Servisi
└── README.md # Bu dosya
mobile/BUILD_APK.md dosyasına bakınfrontend/src/services/api.js)mobile/src/services/api.js)backend/Data/AppDbContext.cs)backend/Services/GradioSentimentService.cs)ai-service/app.py)git clone <repository-url>
cd sentiment-chat
cd frontend
npm install
cp .env.example .env
# .env dosyasında VITE_API_URL'i düzenleyin
npm run dev
Frontend: http://localhost:5174
cd backend
dotnet restore
dotnet run
Backend: http://localhost:5000 Swagger: http://localhost:5000/swagger
cd ai-service
pip install -r requirements.txt
python app.py
AI Service: http://localhost:7860
cd mobile
npm install
# Android
npm run android
# iOS (Mac gerekli)
npm run ios
frontend/)src/App.jsx - Ana uygulama bileşeni, routing ve state yönetimi
src/services/api.js - Backend API çağrıları
src/components/)UserLogin.jsx - Kullanıcı giriş ekranı
RoomSelection.jsx - Oda seçimi ve oluşturma
ChatWindow.jsx - Ana sohbet ekranı
MessageList.jsx - Mesaj listesi
MessageItem.jsx - Tekil mesaj bileşeni
MessageInput.jsx - Mesaj giriş alanı
*.css - Tüm stil dosyaları
backend/)Controllers/)UsersController.cs - Kullanıcı yönetimi
RoomsController.cs - Oda yönetimi
MessagesController.cs - Mesaj yönetimi
Models/)User.cs - Kullanıcı modeliRoom.cs - Oda modeliRoomMember.cs - Oda üyelik modeliMessage.cs - Mesaj modeli
Data/)AppDbContext.cs - Entity Framework context
Services/)ISentimentService.cs - Sentiment service interface
GradioSentimentService.cs - Gradio AI service entegrasyonu
HuggingFaceSentimentService.cs - Alternatif HF implementation
Program.cs - Uygulama başlangıç noktası
ai-service/)app.py - Gradio uygulaması
requirements.txt - Python bağımlılıkları
README.md - AI servis dokümantasyonu
mobile/)src/screens/)LoginScreen.js - Giriş ekranı
ChatScreen.js - Sohbet ekranı
src/components/)MessageList.js - Mesaj listesiMessageItem.js - Mesaj öğesiMessageInput.js - Mesaj girişi
src/services/)api.js - API servisi
Id (PK)Rumuz (Unique)CreatedAtId (PK)Name (Unique)PasswordHashCreatedByCreatedAtId (PK)RoomId (FK)Rumuz (FK)JoinedAtId (PK)Rumuz (FK)RoomId (FK)TextSentimentLabel (pozitif/nötr/negatif)SentimentScore (0-1)CreatedAtcd backend.Tests
dotnet test
cd frontend
npm test
cd mobile/android
./gradlew assembleRelease
# APK: android/app/build/outputs/apk/release/app-release.apk
frontendnpm run builddistVITE_API_URLbackenddotnet publish -c Release -o outdotnet out/backend.dllai-service/ klasörünü upload edinBu proje, AI destekli geliştirme araçları (Kiro AI, GitHub Copilot) kullanılarak geliştirilmiştir. Kritik iş mantığı ve güvenlik katmanları elle yazılmıştır.
MIT License
Sorularınız için issue açabilirsiniz.
Not: Bu proje eğitim amaçlıdır. Production kullanımı için ek güvenlik önlemleri alınmalıdır.
sentiment-backend-api
See the codeGerçek zamanlı duygu analizi ile çalışan, oda tabanlı sohbet uygulaması. React Web, React Native Mobile, .NET Core API ve Python AI servisi ile geliştirilmiştir.
Bu proje, kullanıcıların şifre korumalı odalarda sohbet edebileceği ve her mesajın otomatik olarak duygu analizi yapılarak pozitif/nötr/negatif olarak etiketlendiği bir chat uygulamasıdır.
┌─────────────────────┐
│ React Web App │ ←→ Polling (3s)
│ (Vercel) │
└──────────┬──────────┘
│
↓ REST API
┌─────────────────────┐
│ .NET Core API │ ←→ SQLite Database
│ (Render) │
└──────────┬──────────┘
│
↓ HTTP Request
┌─────────────────────┐
│ Python AI Service │
│ (HF Spaces) │ → BERT Sentiment Analysis
└─────────────────────┘
sentiment-chat/
├── frontend/ # React Web Uygulaması (Vite)
├── mobile/ # React Native CLI Uygulaması
├── backend/ # .NET Core 8 Web API
├── ai-service/ # Python Gradio AI Servisi
└── README.md # Bu dosya
mobile/BUILD_APK.md dosyasına bakınfrontend/src/services/api.js)mobile/src/services/api.js)backend/Data/AppDbContext.cs)backend/Services/GradioSentimentService.cs)ai-service/app.py)git clone <repository-url>
cd sentiment-chat
cd frontend
npm install
cp .env.example .env
# .env dosyasında VITE_API_URL'i düzenleyin
npm run dev
Frontend: http://localhost:5174
cd backend
dotnet restore
dotnet run
Backend: http://localhost:5000 Swagger: http://localhost:5000/swagger
cd ai-service
pip install -r requirements.txt
python app.py
AI Service: http://localhost:7860
cd mobile
npm install
# Android
npm run android
# iOS (Mac gerekli)
npm run ios
frontend/)src/App.jsx - Ana uygulama bileşeni, routing ve state yönetimi
src/services/api.js - Backend API çağrıları
src/components/)UserLogin.jsx - Kullanıcı giriş ekranı
RoomSelection.jsx - Oda seçimi ve oluşturma
ChatWindow.jsx - Ana sohbet ekranı
MessageList.jsx - Mesaj listesi
MessageItem.jsx - Tekil mesaj bileşeni
MessageInput.jsx - Mesaj giriş alanı
*.css - Tüm stil dosyaları
backend/)Controllers/)UsersController.cs - Kullanıcı yönetimi
RoomsController.cs - Oda yönetimi
MessagesController.cs - Mesaj yönetimi
Models/)User.cs - Kullanıcı modeliRoom.cs - Oda modeliRoomMember.cs - Oda üyelik modeliMessage.cs - Mesaj modeli
Data/)AppDbContext.cs - Entity Framework context
Services/)ISentimentService.cs - Sentiment service interface
GradioSentimentService.cs - Gradio AI service entegrasyonu
HuggingFaceSentimentService.cs - Alternatif HF implementation
Program.cs - Uygulama başlangıç noktası
ai-service/)app.py - Gradio uygulaması
requirements.txt - Python bağımlılıkları
README.md - AI servis dokümantasyonu
mobile/)src/screens/)LoginScreen.js - Giriş ekranı
ChatScreen.js - Sohbet ekranı
src/components/)MessageList.js - Mesaj listesiMessageItem.js - Mesaj öğesiMessageInput.js - Mesaj girişi
src/services/)api.js - API servisi
Id (PK)Rumuz (Unique)CreatedAtId (PK)Name (Unique)PasswordHashCreatedByCreatedAtId (PK)RoomId (FK)Rumuz (FK)JoinedAtId (PK)Rumuz (FK)RoomId (FK)TextSentimentLabel (pozitif/nötr/negatif)SentimentScore (0-1)CreatedAtcd backend.Tests
dotnet test
cd frontend
npm test
cd mobile/android
./gradlew assembleRelease
# APK: android/app/build/outputs/apk/release/app-release.apk
frontendnpm run builddistVITE_API_URLbackenddotnet publish -c Release -o outdotnet out/backend.dllai-service/ klasörünü upload edinBu proje, AI destekli geliştirme araçları (Kiro AI, GitHub Copilot) kullanılarak geliştirilmiştir. Kritik iş mantığı ve güvenlik katmanları elle yazılmıştır.
MIT License
Sorularınız için issue açabilirsiniz.
Not: Bu proje eğitim amaçlıdır. Production kullanımı için ek güvenlik önlemleri alınmalıdır.