This is the Next.js web application for displaying historical weather data from the Yesterday's Weather API.
- Clone the repository
- Install dependencies:
npm install
- Copy the example environment file:
cp .env.local.example .env.local
- Update the
.env.localfile with your Supabase credentials - Start the development server:
npm run dev
-
Install the Vercel CLI:
npm install -g vercel
-
Log in to Vercel:
vercel login
-
Deploy the project:
vercel
-
For production deployment:
vercel --prod
- Push your code to a GitHub repository
- Log in to Vercel
- Click "New Project"
- Import your GitHub repository
- Configure project settings:
- Set the Framework Preset to "Next.js"
- Configure the following environment variables:
NEXT_PUBLIC_SUPABASE_URL: Your Supabase URLNEXT_PUBLIC_SUPABASE_ANON_KEY: Your Supabase anonymous key
- Click "Deploy"
The following environment variables need to be set in your Vercel project settings:
NEXT_PUBLIC_SUPABASE_URL: Your Supabase URLNEXT_PUBLIC_SUPABASE_ANON_KEY: Your Supabase anonymous key
app/: Next.js app router pages and layoutscomponents/: React componentslib/: Utility functions and shared codepublic/: Static assetsservices/: API services and data fetching logictypes/: TypeScript type definitions
- View historical weather data for cities across the United States
- Detailed city pages with temperature and precipitation charts
- Mobile-responsive design with dark mode support
- SEO-friendly with metadata for all pages
- Server-side rendering and static generation for optimal performance and SEO
- Next.js - React framework with server-side rendering
- TypeScript - Type-safe JavaScript
- Tailwind CSS - Utility-first CSS framework
- Chart.js - JavaScript charting library
- Supabase - Open source Firebase alternative
- date-fns - JavaScript date utility library
This application is designed to be crawlable by Google and other search engines:
- Uses server-side rendering and static generation for SEO
- Implements dynamic metadata for all pages
- Includes a sitemap and robots.txt
- Provides semantic HTML structure
- Contains appropriate accessibility attributes
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!