How deepakthakur10/fake-news-detection works
This is a Kotlin Android client backed by a FastAPI fake-news classifier. The documented main workflow is news text entry, an HTTP prediction request, backend text processing and classification, then a prediction response. The tree also shows login/registration, news-listing and real-news API modules, but their runtime wiring is not evidenced in the sampled source; those components are shown without guessed call chains. Backend processing and model use are explicit in app.py.
Main entry points: app.py Prediction endpoint · FakeNewsDetectionActivity.kt News detection screen · FakeNewsRetrofitInstance.kt Prediction API client · models Client data models
Components 17
Android client
- App entry
Frontend/FakeNewsDetection/app/src/main/java/com/example/fakenewsdetection/MainActivity.kt - Login and registration
Frontend/FakeNewsDetection/app/src/main/java/com/example/fakenewsdetection/LoginActivity.kt - Registration screen
Frontend/FakeNewsDetection/app/src/main/java/com/example/fakenewsdetection/RegisterActivity.kt - Splash screen
Frontend/FakeNewsDetection/app/src/main/java/com/example/fakenewsdetection/SplashActivity.kt - News detection screen
Frontend/FakeNewsDetection/app/src/main/java/com/example/fakenewsdetection/FakeNewsDetectionActivity.kt - News list adapter
Frontend/FakeNewsDetection/app/src/main/java/com/example/fakenewsdetection/ui/adapters/NewsAdapter.kt
Client data
- News repository
Frontend/FakeNewsDetection/app/src/main/java/com/example/fakenewsdetection/data/repository/NewsRepository.kt - User repository
Frontend/FakeNewsDetection/app/src/main/java/com/example/fakenewsdetection/data/repository/UserRepository.kt - Prediction API client
Frontend/FakeNewsDetection/app/src/main/java/com/example/fakenewsdetection/data/api/FakeNewsRetrofitInstance.kt - Real news API client
Frontend/FakeNewsDetection/app/src/main/java/com/example/fakenewsdetection/data/api/RealNewsRetrofitInstance.kt - News API contract
Frontend/FakeNewsDetection/app/src/main/java/com/example/fakenewsdetection/data/api/NewsApiService.kt - Client data models
Frontend/FakeNewsDetection/app/src/main/java/com/example/fakenewsdetection/data/models
Prediction service
- Prediction endpoint
backend_api/app.py - Text cleaning
backend_api/app.py - TF-IDF vectorizer
backend_api/tfidf_vectorizer.pkl - News classifier
backend_api/fake_news_model.pkl
Other components
- App user
Connections 12
- App user → App entry: uses
- App user → News detection screen: enters text
README.md - News detection screen → Prediction endpoint: sends prediction request
README.md - Prediction endpoint → Text cleaning: cleans text
backend_api/app.py - Prediction endpoint → TF-IDF vectorizer: transforms text
backend_api/app.py - Prediction endpoint → News classifier: predicts class
backend_api/app.py - Prediction endpoint → News detection screen: returns prediction
README.md - News detection screen → Prediction API client: uses client
- Prediction API client → News API contract: uses contract
- News repository → Real news API client: uses client
- News list adapter → Client data models: renders items
- User repository → Client data models: uses models