How neha150803/scriptural-sentiment-text-analyzer-final works
This is a Next.js scripture sentiment-analysis frontend and API proxy. Users submit text or a PDF; the UI posts to a route, which forwards to a configurable backend and falls back to mock results when unavailable. Results expose word statistics and ML, VADER, and TextBlob sentiment, with comparison views, charts, and JSON/CSV/PDF downloads. The README describes a broader Python/pandas/NLTK analyzer, but no such implementation appears in the supplied tree; backend analysis internals are therefore represented only as an external service. The graph follows shown calls and documented capabilities.
Main entry points: page.tsx Analysis workspace · analysis-results.tsx Analysis results · file-upload.tsx PDF upload · text-input.tsx Text entry
Components 17
Analysis Inputs
- Analysis workspace
app/page.tsx - Text entry
components/text-input.tsx - PDF upload
components/file-upload.tsx
API and Analysis
- Text prediction route
app/api/sentiment/predict-text/route.ts - File prediction route
app/api/sentiment/predict-file/route.ts - Demo result data
lib/mock-data.ts
Result Views
- Analysis results
components/analysis-results.tsx - Text statistics
components/statistics-cards.tsx - Model comparison
components/model-comparison.tsx - Sentiment charts
components/sentiment-charts.tsx - Result exports
components/analysis-results.tsx
Interface Components
- Input mode tabs
components/ui/tabs.tsx - Card primitives
components/ui/card.tsx - Button primitive
components/ui/button.tsx - Application layout
app/layout.tsx
Other components
- Scripture analyst
- Sentiment backend
Connections 21
- Scripture analyst → Analysis workspace: opens
app/page.tsx - Analysis workspace → Input mode tabs: renders
app/page.tsx - Analysis workspace → Text entry: renders
app/page.tsx - Analysis workspace → PDF upload: renders
app/page.tsx - Text entry → Text prediction route: posts text
components/text-input.tsx - PDF upload → File prediction route: posts PDF
components/file-upload.tsx - Text prediction route → Sentiment backend: forwards text
app/api/sentiment/predict-text/route.ts - File prediction route → Sentiment backend: forwards file
app/api/sentiment/predict-file/route.ts - Text prediction route → Demo result data: fallback data
app/api/sentiment/predict-text/route.ts - File prediction route → Demo result data: fallback data
app/api/sentiment/predict-file/route.ts - Text entry → Analysis workspace: sets results
app/page.tsx - PDF upload → Analysis workspace: sets results
components/file-upload.tsx - Analysis workspace → Analysis results: renders results
app/page.tsx - Analysis results → Text statistics: renders
components/analysis-results.tsx - Analysis results → Model comparison: renders
components/analysis-results.tsx - Analysis results → Sentiment charts: renders
components/analysis-results.tsx - Analysis results → Result exports: provides downloads
components/analysis-results.tsx - Analysis workspace → Card primitives: renders
app/page.tsx - Analysis results → Card primitives: renders
components/analysis-results.tsx - PDF upload → Button primitive: uses
components/file-upload.tsx - Application layout → Analysis workspace: wraps page