A modern Next.js application that displays a curated daily experience with a random Unsplash image, a daily quote, and live weather based on a user-selected city.
This project uses server-side API routes for secure data fetching and client-side rendering for a smooth, app-like dashboard experience.
- Uses the Unsplash API
- Shows a new image each time the dashboard loads
- Displays the photographer’s name + alt description
- Fetches quotes from API-Ninjas Quotes API
- Pulls multiple quotes and selects one at random
- Automatically changes on reload
- Powered by Weatherstack API
- Shows:
- Current temperature (converted to Fahrenheit)
- Weather icon + description
- Feels-like temperature
- Humidity
- Wind speed
- Includes a city search bar (users can enter any location)
- Displays fallback errors if a request fails
- Gradient dashboard background
- Custom “glass card” style inspired by CodePen article UI
- Compact layout designed to fit on a single screen
- Responsive structure using CSS + inline Next.js styling
- Next.js 14 (App Router)
- React
- Server Components + Client Components
- API Routes (
/api/dashboardand/api/search) - Unsplash API
- Weatherstack API
- API-Ninjas Quotes API
app/
├── api/
│ ├── dashboard/
│ │ └── route.ts # Combines weather, quote, and image API calls
│ ├── search/
│ │ └── route.ts # Unsplash search route
│
├── dashboard/
│ ├── page.tsx # Redirect target page
│ └── DashboardClient.tsx # Full dashboard UI + client logic
│
├── lib/
│ └── dashboard.ts # Fetch helpers for weather, quotes, images
│
└── page.tsx # Redirects / → /dashboard
Create a .env.local file in your project root:
UNSPLASH_ACCESS_KEY=your_unsplash_access_key
WEATHERSTACK_API_KEY=your_weatherstack_api_key
NINJAS_API_KEY=your_api_ninjas_keyNever commit this file.
npm installnpm run devVisit:
http://localhost:3000/dashboard
Use the search bar to update the weather card instantly.
Returns:
{
"city": "Fort Walton Beach, Florida",
"weather": { ... },
"quote": { ... },
"image": { ... }
}Proxy route for Unsplash search.
- Unsplash API — Daily/random photography
- Weatherstack — Live weather data
- API-Ninjas — Daily quotes
- Some of the UI styling inspired by RAFA3L on CodePen