How jnaraujo/teste-de-leiturabilidade works
High-Level Architecture Overview
• Frontend Layer (Next.js App Router structure)
• API Layer (Next.js API routes)
• External Services Integration
• State Management Layer
• Core Business Logic Layer
Detailed Component Breakdown
Frontend Layer (Rectangle with nested components):
• Main Layout (src/app/layout.tsx)
• Editor Route (src/app/(editor))
• Blog Route (src/app/(main)/blog)
• Word Counter Route (src/app/(main)/contador-de-palavras)
Core Features Layer (Hexagons):
• Text Analysis Engine (src/libs/ReadingEase)
• Reading Time Calculator (src/utils/ReadingTime)
• Text Import System (src/libs/ImportExternalPage)
State Management (Rounded Rectangle):
• Zustand Stores (src/store/*)
• Achievements Store
• Config Store
• Content Store
• Reading Store
• Stats Store
• Google Docs Service
• Notion Service
• Sentry Integration
• User input flow through the editor
• Text analysis processing path
• State updates and persistence
• API calls to external services
• Error reporting to Sentry
Implementation Details to Highlight
• Next.js App Router architecture
• Client-side vs Server-side components
• Text analysis algorithm implementation
• State management pattern
• External service integration points
┌─────────────────────────────────────┐
• Client Layer (UI/Components) │
• ┤
• Business Logic Layer (Analysis) │
• ┤
• State Management │
• ┤
• External Services & Integration │
• ┘
Additional Notes
Annotations for:
• Performance optimization points (debouncing, caching)
• Security considerations
• Accessibility features
• Analytics integration points