How sarf-esports/website works
• Frontend – Represented by the Svelte/SvelteKit app:
• Routes: Group the main pages (home, news, privacy, sitemap) found under src/routes.
• Components: Include the various elements (header, footer, home, news, modal, etc.) that are rendered.
• API Endpoints – Highlight the backend-like APIs provided within the routes folder:
• API for articles (in src/routes/api/articles and its subpaths).
• API for thumbnail images (src/routes/api/articles/thumbnail-imgs).
• Content Management – The articles directory:
• Markdown files under articles organized by year/month represent the content that is rendered on the site.
• The assets/scripts/create-article.ts tool hints at the internal process for creating/updating articles.
• Internationalization & Data:
• The src/lib/scripts/i18n and data directories indicate how localization and data-driven components (like MEMBERS, SPONSORS, etc.) are managed.
• Documentation & Development:
• Docs, README, and CONTRIBUTING files inform the overall process, guidelines, and best practices.
• Build & Configuration:
• Configuration files like svelte.config.js, vite.config.js, tsconfig.json, and others show the build system, linting, and formatting standards.
Out the Relationships and Data Flow
• Client Browser (User’s side) interacts with the Frontend Rendering Layer:
• Browser requests pages via the routing logic in src/routes (layout, error, news pages, etc.).
• Static assets (from static folder) are loaded as needed.
• Server/Build Process:
• At build (or run) time, SvelteKit compiles the components–incorporating markdown content from the articles folder to generate pages.
• API endpoints (under src/routes/api) serve JSON or image data for dynamic UI parts.
• Component Interconnection:
• The UI is built from reusable Svelte components stored in src/lib/components.
• There is a clear separation of concerns, with components dedicated to layout (header, footer) and content (news list, article card).
• The i18n scripts ensure that language-specific content is dynamically selected.
• External Integration:
• The README lists external deployments and multiple URLs, which might be represented as different environments (dev, production, legacy).
Architectural Patterns and Design Principles
• Modular Component-Based Architecture:
• The folder structure clearly separates