A modern React application that analyzes text and provides various metrics such as word count, character count, sentence count, and more. Built with React, TypeScript, and Tailwind CSS.
- 📊 Real-time text analysis
- 📝 Word count and character count
- 📈 Sentence and paragraph count
- 🔍 Most frequent word detection
- 📏 Longest word identification
- 💻 Responsive design
- ⚡ High performance
- 🎨 Modern UI with Tailwind CSS
- React 18
- TypeScript
- Tailwind CSS
- Lucide React (for icons)
- Vite (for build tooling)
src/
├── components/ # React components
│ ├── TextInput.tsx # Text input component
│ └── AnalysisResults.tsx # Results display component
├── types/ # TypeScript type definitions
│ └── index.ts
├── utils/ # Utility functions
│ └── textAnalyzer.ts # Text analysis logic
└── App.tsx # Main application component
- Node.js (v14 or higher)
- npm or yarn
- Clone the repository:
git clone <repository-url>
cd text-analyzer- Install dependencies:
npm install- Start the development server:
npm run dev- Open your browser and navigate to
http://localhost:5173
The application follows a component-based architecture with clear separation of concerns:
-
Components:
TextInput: Handles user input with proper event handlingAnalysisResults: Displays analysis metrics in a grid layout
-
Utils:
textAnalyzer: Contains core text analysis logic- Implements efficient algorithms for text processing
-
Types:
- Clear TypeScript interfaces for type safety
- Shared types between components
- TypeScript for type safety
- ESLint for code quality
- Modular component structure
- Clear separation of concerns
- Consistent code style