Skip to content

Latest commit

 

History

History
257 lines (217 loc) · 8.68 KB

File metadata and controls

257 lines (217 loc) · 8.68 KB

Comprehensive Progress Log for LLM Handoff

Project Overview

Project Name: Nigerian Meteorological Agency (NiMet) Dashboard
Tech Stack: Next.js 14 (App Router), React, Tailwind CSS
Current Status: Dashboard skeleton phase (3 of 5 sections complete)


Project Structure

.
├── app
│   ├── components/
│   │   ├── DashboardLayout.jsx          ✅ COMPLETE
│   │   ├── ObservedValuesSection.jsx    ✅ COMPLETE
│   │   ├── DerivedValuesSection.jsx     ✅ COMPLETE
│   │   ├── TrendForecastSection.jsx     ✅ COMPLETE
│   │   ├── ImagerySection.jsx           ⏳ PENDING
│   │   ├── DigitalClock.jsx             ✅ EXISTING
│   │   ├── MeteorologicalNavbar.jsx     ✅ EXISTING
│   │   ├── NavbarParts.jsx              ✅ EXISTING
│   │   └── ServerTimeWrapper.jsx        ✅ EXISTING
│   ├── config/
│   │   └── stations.js                  ✅ EXISTING
│   ├── hooks/
│   │   └── useTime.js                   ✅ EXISTING
│   ├── favicon.ico
│   ├── globals.css                      ✅ EXISTING (Tailwind)
│   ├── layout.js
│   └── page.js                          ✅ UPDATED

Completed Components (Detailed)

1. MeteorologicalNavbar.jsx

  • Purpose: Top navigation bar with system info, agency branding, station data, and real-time clock
  • Key Features:
    • Server-time initialized clock (prevents hydration mismatch)
    • Modular sub-components from NavbarParts.jsx
    • Station configuration via stations.js
    • Status indicator and logout button
  • State: time (Date object, updates every second)
  • Props: serverTime, stationConfig, systemConfig, isOnline, onLogout, onClose

2. DashboardLayout.jsx

  • Purpose: Main layout coordinator for dashboard body
  • Structure: 3-column flexbox layout
    • Left (25%): Observed Values
    • Center (40%): Derived Values
    • Right (33%): Trend/Forecast + Imagery (stacked)
  • Imports: All section components via @/app/components/ alias
  • No State: Pure layout component

3. ObservedValuesSection.jsx

  • Purpose: Left panel for manual weather observation data entry
  • State Object: observedData with 15 fields:
    • date, time, dryBulb, wetBulb, digitalBarometer, astreadBarometer
    • attachThermometer, visibility, windDirection, windSpeed
    • qnhFmFm, precipAmount, solarimeter, cloudAmount, cloudGenus, weather
  • Key Features:
    • Form inputs (text, select dropdowns)
    • Retrieve & Meteo buttons (placeholders)
    • Color-coded inputs (yellow backgrounds for key fields)
    • Reusable InputRow component for consistency
  • Handler: handleChange(field, value) for state updates

4. DerivedValuesSection.jsx

  • Purpose: Center panel displaying calculated meteorological values
  • State Object: derivedData with 16 fields:
    • relativeHumidity, vaporPressure, dewPoint, feelTemperature
    • heightBaseCloud, cloudBaseHeight, cloudBaseHeightYellow
    • refEvapotranspiration, estEvaporation, estVisibility
    • slp, slpTemp, mslp, mslpTemp, qnh, qnhTemp
  • Key Features:
    • Read-only inputs (calculated values)
    • Color-coded sections (green for cloud height, yellow for agrometeorological data)
    • Grid layout for pressure values (SLP, MSLP, QNH)
    • Reusable components: DerivedRow, PressureRow
    • LLWAS button (Low-Level Windshear Alert System)

5. TrendForecastSection.jsx

  • Purpose: Right-top panel for METAR/TAF message creation
  • State Object: forecastData with 12 fields:
    • message, time, wind, windVis, temp, dew
    • qfe, qfeDec, qnh, qnhDec, weather, cloud, remarks
  • Key Features:
    • Message type selector (METAR/SPECI/TAF)
    • Yellow-highlighted editable fields
    • Textarea for remarks/trends
    • Officer name input with checkbox
    • Three action buttons: Read, Print MET REPORT, Build METAR
    • Reusable ForecastInputRow for paired inputs
  • Handler: handleChange(field, value) for state updates

Styling Conventions

  • Framework: Tailwind CSS (core utilities only, no custom config)
  • Color Scheme:
    • Gray backgrounds: bg-gray-200, bg-gray-300
    • Borders: border-gray-300 (2px)
    • Highlights: bg-yellow-100, bg-yellow-300 (editable fields)
    • Status colors: bg-green-200/300 (cloud data), bg-blue-100 (special fields)
  • Typography:
    • Headers: text-sm font-bold
    • Labels: text-xs font-bold
    • Inputs: text-sm or text-xs
  • Spacing: gap-2, space-y-2, p-3, px-3 py-1
  • Buttons:
    • Default: bg-gray-300 hover:bg-zinc-300
    • Primary: bg-yellow-200 hover:bg-yellow-300
    • Action: bg-red-400, bg-blue-400 (with white text)

Code Patterns & Conventions

State Management

const [data, setData] = useState({ field1: 'value', field2: 'value' });

const handleChange = (field, value) => {
  setData(prev => ({ ...prev, [field]: value }));
};

Component Structure

const ComponentName = () => {
  // State declarations
  // Handlers
  
  return (
    <div className="bg-gray-300 border-2 border-gray-300 rounded">
      {/* Header */}
      <div className="bg-gray-300 border-b-2 border-gray-300 px-3 py-1.5">
        <h2 className="font-bold text-sm">SECTION TITLE</h2>
      </div>
      
      {/* Content */}
      <div className="p-3 space-y-2">
        {/* Form elements */}
      </div>
    </div>
  );
};

Import Aliases

  • ALWAYS use: @/app/components/ComponentName
  • NEVER use: Relative paths like ./ComponentName or ../components/

Configuration Files

app/config/stations.js

export const defaultStationConfig = {
  name: "Asaba",
  lat: "06.20", lon: "06.66", elev: "82.40", const: "1.00533",
  id: "65282", network: "DNAS",
  airport: "ASABA AIRPORT",
  agency: "NIGERIAN METEOROLOGICAL AGENCY"
};

export const systemConfig = {
  version: "MeteoWX 1.0",
  poweredBy: "PSSIMATHEMATICS, NIGERIA",
  website: "Website: Pssimathematicsbusiness.site"
};

app/page.js

import ServerTimeWrapper from '@/app/components/ServerTimeWrapper';
import DashboardLayout from '@/app/components/DashboardLayout';

export default function HomePage() {
  return (
    <div>
      <ServerTimeWrapper />
      <DashboardLayout />
    </div>
  );
}

Pending Work

NEXT IMMEDIATE TASK:

ImagerySection.jsx (Right-bottom panel)

  • Display weather graphics/widgets
  • Graphical display area (placeholder for now)
  • NOWCAST section with city temperature (27°C Asaba)
  • NOSIG indicator
  • 7-day forecast icons (weather symbols)
  • Footer with "Nowcast [AT]"

Workflow Phases (Not Started):

  1. Skeleton Phase - Structure only (95% complete - only Imagery pending)
  2. Logic Phase - State management, data flow, calculations
  3. Styling Phase - Refinement, responsiveness, polish
  4. Refactor Phase - Modularity improvements, performance optimization

Design Requirements Reference

  • Source: Nigerian Meteorological Agency DNAS dashboard screenshot
  • Key visual elements:
    • Station: Asaba (65282 DNAS)
    • Date: Wednesday 03-09-2025
    • Real-time clock display
    • Three-panel layout (Observed/Derived/Forecast)
    • Color-coded input fields
    • Weather widget with 7-day forecast

Developer Guidelines (CRITICAL)

  1. Scope: Work ONLY on requested parts, no extras
  2. Output: Max 180 lines per response (split if needed)
  3. Format: Triple backticks + 3-5 sentence beginner explanation
  4. Comments: Ample inline comments in code
  5. Continuity: End every response with "Progress Log Update"
  6. Consistency: Same styling/state patterns throughout
  7. Modularity: Small, composable components preferred
  8. Clarification: Ask questions if request is ambiguous

Current Session Progress

  • ✅ Scaffolded DashboardLayout (3-column structure)
  • ✅ Built ObservedValuesSection (15 form inputs + 2 buttons)
  • ✅ Built DerivedValuesSection (16 calculated fields + LLWAS button)
  • ✅ Built TrendForecastSection (12 METAR fields + 3 action buttons)
  • ⏳ ImagerySection pending (weather graphics + 7-day forecast)

Handoff Notes

  • All components use client-side rendering ("use client")
  • No external API calls yet (mock data only)
  • No localStorage/sessionStorage (per Claude.ai restrictions)
  • State is component-local (no Context API or global state yet)
  • Responsive design not implemented (desktop-first for now)
  • Accessibility features minimal (add ARIA labels in refactor phase)

END OF PROGRESS LOG
Last Updated: Part 3 Complete (TrendForecastSection)