Start by cloning the Weather Platform repository and exploring its structure.
# Clone the Weather Platform project
git clone https://github.com/Itea-Lab/Weather-Platform.git
cd Weather-Platform
The project uses pnpm as the package manager:
# Install dependencies with pnpm
pnpm install
Explore the key directories:
Weather-Platform/
├── amplify/ # Amplify backend configuration
│ ├── backend.ts # Main backend definition
│ ├── auth/ # Cognito authentication
│ ├── custom/ # Custom CDK constructs
│ │ ├── CloudFront/ # CDN configuration
│ │ ├── EventBridge/ # Scheduled data processing
│ │ ├── GetDataset/ # Dataset API
│ │ ├── WeatherDataGlue/ # ETL processing
│ │ └── WeatherDatasetStorage/ # S3 storage
│ └── functions/ # Lambda functions
│ ├── addThing/ # Add IoT devices
│ ├── deleteThing/ # Remove IoT devices
│ ├── fetchThings/ # List IoT devices
│ ├── getDataset/ # Retrieve processed data
│ ├── getIoTEndpoint/ # Get IoT endpoint URL
│ └── getTotalReadings/ # Get telemetry statistics
├── src/ # Next.js frontend
│ ├── app/ # App Router pages
│ ├── components/ # React components
│ ├── contexts/ # React contexts
│ ├── hooks/ # Custom hooks
│ ├── lib/ # Utility libraries
│ └── types/ # TypeScript type definitions
│ └── utils/ # Utility functions
├── public/ # Static assets
├── package.json # Dependencies and scripts
└── amplify_outputs.json # Generated after deployment
The amplify/backend.ts
file defines:
Core Services:
Custom CDK Constructs:
Create .env.local
for development:
# Copy environment template
cp .env.example .env.local
# Edit with your specific values
# DEFAULT_REGION=us-east-1
The amplify_outputs.json
file is generated after backend deployment and contains all the necessary configuration for the frontend.
Remember to update the hardcoded bucket names in the backend code as mentioned in the Data Lake section.