API keys are in .env so NEXT_PUBLIC prefix is necessary to use them in the client side. But it means that make the API keys to be exposed to the browsers.
To avoid that, implement API routes and access them from the client side so that keep the API keys secret.
Proposal
Use Zod for request validation
Tasks
[x] API route for currentWeather
[x] API route for geocoding
[x] API route for geolocation
[x] API route for forecast
[ ] Validations
[ ] Error handlings
[ ] (Optional) Middleware to make validations and error handlings shareable
Overview
Implement API routes
Purpose
To hide API keys
API keys are in .env so NEXT_PUBLIC prefix is necessary to use them in the client side. But it means that make the API keys to be exposed to the browsers.
To avoid that, implement API routes and access them from the client side so that keep the API keys secret.
Proposal
Tasks