How dlinrt-eu/website works
Project type and purpose
• This is a single‐page application (SPA) built with React, TypeScript, Vite, and Tailwind CSS.
• Its goal is to present and filter information about deep‐learning radiotherapy products, using static JSON data and custom analytics tracking.
File structure
• Top‐level:
• public/ – static assets (PDF roadmap, logos, robots.txt, sitemap.xml)
• src/ – application source, subdivided into pages, components, hooks, services, data, providers, utils, config, types
• config: ESLint, PostCSS, Tailwind, Vite, TypeScript
• CI/CD: .github/workflows/deploy.yml
• src/pages: defines routes (Index, Products, ProductDetails, Dashboard, News, etc.)
• src/components: reusable UI, feature UI (product cards, filters, dashboards, revision charts)
• src/services: DataService reads local JSON; AnalyticsTracker logs page views to localStorage or remote endpoint
• src/data: static product, news, initiative datasets
• Providers & hooks implement context and data‐fetching patterns
README for additional insights
• Confirms tech stack (Vite, TypeScript, React, Tailwind CSS)
• Encourages contributions to data files under src/data and config/tags.ts
• No external backend: all product data is shipped in JSON
Main components and interactions
a. Frontend (browser)
• index.html → main.tsx → App.tsx
• React Router (in App.tsx) dispatches to page components in src/pages
• Page components invoke hooks (useInitiativeFilters, useChartData, etc.)
• Hooks call services (DataService.getProducts(), AnalyticsTracker.trackPage())
• Components render UI, styled via Tailwind and custom components/ui library
b. Static Data Layer
• JSON files under src/data loaded by DataService at build time or runtime
c. Analytics
• AnalyticsProvider wraps App → injects context
• AnalyticsTracker writes to localStorage or posts to an analytics endpoint (if configured)
d. Build & Deploy
• Vite compiles TSX, bundles CSS, outputs to dist/
• GitHub Actions (.github/workflows/deploy.yml) runs on push → builds & deploys to hosting (e.g., GitHub Pages or Netlify)
e. CI/CD & Repo Management
• .github/ISSUE_TEMPLATE encourages bug/feature reporting
• CONTRIBUTING.md, CODE_OF_CONDUCT, SECURITY.md guide maintainers and contributors
Architectural patterns and design principles
• Component‐based UI with a clear separation: pages vs. feature components vs. shared UI primitives
• Hooks for encapsulating data fetching and side effects
• Service layer (DataService, AnalyticsTracker) abstracts data sources and tracking logic
• Provider pattern for global state (analytics context)
• Static site generation approach: local JSON as “data store,” no runtime backend
• How JSON under src/data flows into the UI via DataService
• Provider/Hooks/Service relationship for analytics
• CI/CD workflow as an independent component that triggers on repo events
• Relevant configuration files (vite.config.ts, tailwind.config.ts) alongside the build tool
• Major technologies (React, TypeScript, Tailwind, Vite, GitHub Actions) are called out