How ajagtapdev/yaad works
Based on our analysis of the file tree and README, “Yaad” is a full-stack Next.js web application built to serve as a “living memory” database for users—especially those with degenerative cognitive conditions. The purpose is to record, transcribe, store, and later retrieve cherished memories using AI-assisted methods together with vector search capabilities through Pinecone. In addition, authentication is handled via Clerk, and the application features a modern, responsive design with Tailwind CSS.
Main Components
• Client/User Interface: Represented by the Next.js frontend with pages (e.g., home, about, contact, team, privacy, terms, and the specialized “yaad” page) and UI components like Navbar, Footer, TextToSpeech, and TranscriptionComponent.
• API Layers: Inside the src/app/api folder you have multiple API endpoints (retrieve, speak, speakandstore, and transcribe) that handle memory processing:
– /api/retrieve: Likely handles searching for memories based on prompts.
– /api/speak: Handles text-to-speech functionalities.
– /api/speakandstore: Likely integrates both text-to-speech and storing memories.
– /api/transcribe: Processes audio inputs into text.
• Authentication Module: Although Clerk is an external service used for sign-in and sign-up, note that the app contains dedicated authentication pages in the “src/app/auth” folder, which interface with Clerk.
• External Services:
– Pinecone: The vector database service that stores embeddings of memories, enabling advanced retrieval.
– Clerk: Provides secure user authentication.
• Shared Libraries and Utilities: Found in directories like “src/lib” and “src/utils” that hold utility functions (e.g., apiHelpers and general application utilities).
• Static Assets: Represented by the “public” and “src/public” directories (audio files, fonts) and design assets such as Tailwind CSS classes and configurations.
Architectural Patterns and Design Principles
– Highlight the Next.js app structure with clear segmentation between pages, API routes, and components.
– Show a separation of concerns: Frontend (application UI) versus Backend (API endpoints and processing logic).
– Emphasize modularity in the API design, treating each endpoint as a distinct microservice that interacts with both internal utilities and external services.
– Note the use of external authentication (Clerk) and a specialized vector database (Pinecone), illustrating modern cloud service integration.