Skip to content

Conversation

@ryanaidilp
Copy link
Contributor

Summary

  • ✅ Complete internationalization implementation for all documentation sections
  • ✅ Fix rate limiting documentation accuracy (100 req/min vs incorrect 1000 req/hour)
  • ✅ Update COVID-19 terminology with official Kemenkes classifications
  • ✅ Add comprehensive Vue i18n support across all components

Major Changes

🌐 Internationalization Implementation

  • OverviewSection.vue: Full i18n support for API introduction and getting started guide
  • NationalLatestSection.vue: Translated endpoint documentation and response examples
  • NationalHistoricalSection.vue: Query parameters and examples with proper translations
  • AuthenticationSection.vue: Rate limiting and best practices with array translations
  • ErrorHandlingSection.vue: HTTP status codes and error response format translations
  • GlossarySection.vue: Enhanced with mathematical formulas and official terminology

🔧 Technical Improvements

  • Rate Limiting Accuracy: Corrected from 1000 requests/hour to 100 requests/minute per IP with 20 burst size
  • Array Translations: Proper $tm() method implementation for dynamic content lists
  • Vue i18n Integration: Consistent useI18n() composable usage across all components
  • API Compatibility: Updated to match pico-api-go v2.1.0 specifications

📋 COVID-19 Terminology Updates

  • Current Terms: Kasus Suspect, Kasus Probable, Kontak Erat, Kasus Konfirmasi
  • Legacy Terms: ODP → Kasus Suspect, PDP → Kasus Probable, OTG → Kasus Konfirmasi (Asimtomatis)
  • Official Reference: Based on Kemenkes official classification system
  • Visual Distinction: Clear separation between current and legacy terminology with proper styling

🎯 Component Architecture

  • Modular Design: Maintained component-based architecture for better maintainability
  • Responsive Layout: Preserved mobile-first responsive design principles
  • Mathematical Rendering: LaTeX formulas for reproduction rate calculations using KaTeX
  • Academic References: Proper DOI links and citation formatting

Test Plan

  • Verify all translation keys resolve properly in both English and Indonesian
  • Test language switching functionality
  • Validate mathematical formula rendering with KaTeX
  • Check responsive layout on mobile devices
  • Confirm API documentation accuracy against pico-api-go v2.1.0
  • Test rate limiting information display
  • Verify COVID-19 terminology sections render correctly

Technical Details

  • Framework: Vue 3 Composition API with TypeScript
  • Internationalization: Vue i18n with structured JSON locale files
  • Math Rendering: KaTeX for LaTeX mathematical formulas
  • Styling: Tailwind CSS with responsive breakpoints
  • Components: 6 updated documentation sections with full i18n support

- Replace placeholder content with detailed API documentation
- Add comprehensive national endpoints section with examples
- Include interactive code examples with syntax highlighting
- Document query parameters and response fields
- Add authentication and rate limiting information
- Include proper error handling documentation with status codes
- Add support section with links to Swagger and source code
- Implement responsive design with proper sections and navigation
- Update response example to include active cases field
- Add statistics object with percentages and reproduction_rate
- Include all daily and cumulative fields (positive, recovered, deceased, active)
- Update response fields table with accurate field descriptions
- Clarify historical endpoint returns array format with same structure
- Use actual example data from EXAMPLE_RESPONSE.md for accuracy
- Add newlines to all Vue components and TypeScript files
- Add newlines to configuration files (tsconfig, vite, tailwind, etc.)
- Add newlines to documentation files (README.md, EXAMPLE_RESPONSE.md)
- Ensure consistent file endings across entire codebase
- Follow standard convention of ending files with newline character
- Implement fixed sidebar with collapsible sections for better navigation
- Add mobile-responsive hamburger menu for sidebar access
- Organize content into logical sections (Getting Started, API Endpoints)
- Create expandable categories (National Data, Regional Data, Healthcare Data)
- Include 'Coming Soon' badges for future endpoint categories
- Add individual pages for each endpoint (Latest Data, Historical Data)
- Implement section-based routing with active state highlighting
- Design future-ready structure for vaccines, hospital beds, testing centers
- Maintain all existing endpoint documentation with enhanced UX
- Add external resource links (Interactive API, Source Code)
- Adjust main content padding to p-4 sm:p-6 lg:p-8 for better mobile spacing
- Add w-full min-w-0 to main content container to prevent cramped layout
- Improve Coming Soon sections styling with proper opacity and badges
- Remove expandable functionality from disabled sections for cleaner UX
- Extract large Documentation.vue into smaller, focused components:
  - OverviewSection.vue - API overview and getting started
  - NationalLatestSection.vue - Latest national data endpoint
  - NationalHistoricalSection.vue - Historical data with pagination
  - AuthenticationSection.vue - Authentication and rate limiting info
  - ErrorHandlingSection.vue - HTTP status codes and error formats
  - GlossarySection.vue - Key terms including reproduction rate explanation

- Add comprehensive Glossary section explaining:
  - Reproduction Rate (Rt) with EpiEstim methodology
  - Case classifications and data types
  - Serial interval and epidemiological concepts

- Improve code maintainability by separating concerns
- Reduce main view size from ~700 lines to ~200 lines
- Enable easier future feature additions
- Add ODP (Orang Dalam Pemantauan / Person Under Observation)
- Add PDP (Pasien Dalam Pengawasan / Patient Under Supervision)
- Include Indonesian terms with English translations
- Add visual classification progression flow (ODP → PDP → Positive/Negative)
- Provide detailed explanations for each classification
- Use color-coded cards for better visual distinction
- Add detailed mathematical formula for Rt calculation using EpiEstim Bayesian approach
- Include step-by-step formula breakdown with infectiousness calculation
- Add academic references with DOI links (Cori et al. 2013, Thompson et al. 2019)
- Implement Vue i18n for complete internationalization support
- Create English and Indonesian locale files with comprehensive translations
- Update GlossarySection to use i18n for all text content
- Enhance visual layout with formula display and reference cards
- Support parameter interpolation for dynamic content (e.g., null values)

Technical improvements:
- Professional academic reference formatting with clickable DOI links
- Color-coded formula steps for better readability
- Responsive layout improvements for formula and reference sections
- Maintain existing visual styling while adding i18n support
- Replace $t() with t() using Composition API useI18n() hook
- Import useI18n from vue-i18n in the component script
- Fix broken translation rendering for all glossary content
- Ensure proper i18n integration with Vue 3 Composition API
- Replace all i18n translation calls with hard-coded English content
- Remove useI18n import that was causing translation failures
- Ensure all glossary content displays properly including:
  - Reproduction Rate (Rt) with mathematical formulas
  - Academic references with clickable DOI links
  - Indonesian COVID-19 terminology (ODP/PDP)
  - Case classifications and data types
- Maintain all visual styling and layout improvements
- Fix broken translation keys that were showing as raw text
- Install and configure vue-mathjax-next for LaTeX rendering
- Replace plain text formulas with proper mathematical notation using LaTeX
- Add MathJax integration to main.ts
- Update Rt formula section with professionally rendered equations:
  - Total infectiousness calculation: λt = Σ(s=1 to t-1) I(t-s) · ws
  - Posterior distribution: Rt|data ~ Gamma(a + Σ It, b + Σ λt)
  - Point estimate: E[Rt|data] = (a + Σ It) / (b + Σ λt)
- Improve visual presentation with centered mathematical expressions
- Maintain academic quality documentation standards
- Remove duplicate src/i18n/ directory and use existing src/locales/
- Remove image.png from git and add to .gitignore (reference only)
- Replace broken vue-mathjax-next with KaTeX for proper LaTeX rendering
- Create custom MathFormula component using KaTeX library
- Update GlossarySection to use new MathFormula component
- Fix mathematical formulas to render properly instead of showing raw LaTeX
- Remove VueMathjax import from main.ts and use existing i18n setup
- Ensure proper LaTeX display for all Rt calculation formulas

Mathematical formulas now properly render:
- λt = Σ(s=1 to t-1) I(t-s) · ws
- Rt|data ~ Gamma(a + Σ It, b + Σ λt)
- E[Rt|data] = (a + Σ It) / (b + Σ λt)
@ryanaidilp ryanaidilp self-assigned this Sep 8, 2025
- Add internationalization support to all documentation components
- Update OverviewSection, NationalLatestSection, NationalHistoricalSection, AuthenticationSection, and ErrorHandlingSection with Vue i18n
- Fix rate limiting documentation: correct 1000 req/hour to 100 req/minute per IP with 20 burst size
- Update COVID-19 terminology with official Kemenkes classifications
- Add current terms (Suspect, Probable, Close Contact, Confirmed) and legacy terms (ODP, PDP, OTG)
- Implement proper array translations using $tm() method for dynamic lists
- Ensure all components follow consistent i18n patterns with useI18n() composable
- Maintain accuracy with pico-api-go v2.1.0 API specifications
@ryanaidilp ryanaidilp force-pushed the feature/update-documentation-national-endpoint branch from 731c571 to c24cc38 Compare September 8, 2025 04:23
@ryanaidilp ryanaidilp merged commit 5aea6af into develop Sep 8, 2025
@ryanaidilp ryanaidilp deleted the feature/update-documentation-national-endpoint branch September 8, 2025 04:24
@ryanaidilp ryanaidilp mentioned this pull request Sep 8, 2025
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants