A modern web application for comprehensive document analysis and text insights. Upload PDF, DOCX, or TXT files to get detailed analytics including word statistics, readability scores, sentiment analysis, and visual data representations.
- Word count, character count, and document structure analysis
- Reading time estimation and readability scoring
- Sentence and paragraph statistics
- Interactive word frequency charts
- Word length distribution histograms
- Sentence complexity trends
- Sentiment analysis with confidence scores
- Keyword extraction and topic modeling
- Writing style assessment
- Document complexity indicators
- Drag-and-drop file upload interface
- Real-time analysis progress tracking
- Responsive design for all devices
- Frontend: Next.js 14, React 18, TypeScript
- Styling: Tailwind CSS
- File Processing: pdf-parse, mammoth, papaparse
- Text Analysis: NLP models (have yet to decide which ones to use)
- Charts: Chart.js / Recharts
- Deployment: Vercel (probably, might be different)
- Node.js 18+
- npm or yarn
- Clone the repository
git clone https://github.com/yourusername/textanalyzer.git
cd textanalyzer
- Install dependencies
npm install
# or
yarn install
- Run the development server
npm run dev
# or
yarn dev
- Open http://localhost:3000 in your browser
src/
├── app/ # Next.js app directory
│ ├── api/ # API routes
│ │ ├── analyze/ # Document analysis endpoint
│ │ └── upload/ # File upload handler
│ ├── components/ # React components
│ │ ├── upload/ # File upload components
│ │ ├── analysis/ # Analysis result components
│ │ └── charts/ # Chart components
│ ├── lib/ # Utility functions
│ │ ├── textAnalysis.ts # Core analysis logic
│ │ ├── fileProcessing.ts # File parsing utilities
│ │ └── calculations.ts # Statistical calculations
│ └── types/ # TypeScript type definitions
├── public/ # Static assets
└── docs/ # Documentation
POST /api/upload
- Handle file uploadsPOST /api/analyze
- Process document analysisGET /api/analysis/:id
- Retrieve analysis results
- PDF: Text extraction from PDF documents
- DOCX: Microsoft Word document processing
- TXT: Plain text file analysis