How ilmarikyl/semanttuli works
Main System Components
a) Client-Side (Frontend):
• Sub-components for:
• Game UI Components (src/lib/components)
• State Management (src/stores)
• i18n System (src/lib/i18n)
• Game Logic (src/lib/utils)
b) Server-Side:
• API Routes (src/routes/api)
• Database Service Layer (src/lib/services)
c) External Services:
• MongoDB Database
• Fly.io Deployment Platform (show two instances for EN/FI)
Component Relationships
a) Data Flow:
• Client → Server API Endpoints (for word similarities, hints, etc.)
• Server → MongoDB (for word vectors and similarity scores)
• i18n System → UI Components (localization flow)
• Stores → Components (state management flow)
b) API Integration:
• Distinct endpoints:
• /api/getSecret
• /api/hint
• /api/model
• /api/nearby_10
• /api/nearby_1k
• /api/top_similarities
Specific Implementation Details
• Language-specific configurations (EN/FI)
• Docker containerization boundary
• Local storage interaction
• Game state management flow
Technical Stack Indicators
• SvelteKit
• TypeScript
• Tailwind CSS
• MongoDB
• Docker
• Fly.io
Environment Configuration
Configuration flow:
• Environment variables
• Language selection
• Database connection
Deployment configuration for both language versions
Keep the abstraction level focused on the architectural components while showing enough detail to understand the game's unique features, particularly the word similarity calculation system and bilingual support.
• Component boundaries
• Environment-specific configurations
This will create a comprehensive yet clear visualization of the system's architecture while highlighting its key features as a bilingual word guessing game.