How fusemachines/covid-nepal-web works
Project type and purpose
• This is a single‐page, full‐stack “front‐end” application (bootstrapped with Create React App) written in React + TypeScript.
• It presents COVID-19 information for Nepal: case counts, hospital data, contacts, news, FAQs, etc., by calling a separate COVID-Nepal backend and other external services (push notifications, Google Translate, Google Maps).
File structure
• Top level:
• OneSDK/ – OneSignal push-notification worker scripts (PWA push integration)
• public/ – static assets (index.html, manifest.json, images)
• src/ – all app code
• Inside src/:
• App.tsx & Router.tsx – root component and route definitions
• components/ – reusable UI elements (buttons, badges, cards, modals, loader, navbar, etc.)
• routes/ – page-level containers organized by feature (dashboard, landing, contacts, news, notices, etc.)
• services/ – API client modules (contacts.ts, news.ts, hospitals.ts, covidCases.ts, etc.)
• utils/ – shared helpers (axios config, error handling, translation, storage, analytics)
• i18n/ & customHooks/ – internationalization (en, ne) and a useLanguage hook
• config/ & constants/ – environment setup and static data (routes, options, faq, notices, hospital list)
• scss/ – global and per‐component styles
• serviceWorker.ts – PWA service worker registration & lifecycle
README
• Confirms React+TS, CRA, PWA capabilities, push notifications via OneSignal, and reliance on a separate backend.