How duncanritchie/velut works
High-Level Architecture Overview
a. Client Layer:
• Next.js Frontend (Server-Side Rendered)
• Client-Side Components (for specific features like Multi-word search)
b. Server Layer:
• Next.js Server
• API Routes (/api/word/*)
c. Data Layer:
• MongoDB Collections (lemmata, words, summary)
Component Breakdown
Create sub-sections showing:
a. Page Components:
• Main pages (home, word details, advanced search, etc.)
• Layout components (header, footer)
• Specialized components (search, forms tables, parsing lists)
b. Core Features:
• Word Processing
• Rhyming Logic
• Inflection Handling
• Multi-word Search
Data Flow Architecture
Following flows:
a. Search Flow:
• User Input → Server-Side Processing → MongoDB Queries → Rendered Results
• Special handling for client-side rendering in Multi-word search
b. Word Processing Flow:
• Input Processing → Diacritics Handling → Database Lookup → Results Formation
External Integrations
• MongoDB Atlas Connection
• Fly.io Deployment
• External Dictionary Links (Logeion, Wiktionary)
Specific elements
• MongoDB collections (lemmata, words, summary)
• Next.js pages structure
• API routes
• Component hierarchy
• Data processing pipeline
Server-side rendering architecture
• How Next.js handles page requests
• Where client-side rendering is used (Multi-word search)
Data Processing Pipeline
• Flow from raw input to processed results
• Diacritics handling and word normalization
Search Functionality
• Different search types (rhymes, anagrams, subwords)
• Advanced search features
• Multi-word processing
Database Interaction
• MongoDB connection handling
• Collection relationships
• Query patterns