Overview • Setup • Screenshots
WeatherWear is a web app that suggests what to wear based on the current weather. This project was built in a university web services course for the purpose of learning about how to use and create RESTful APIs. API documentation for this project's REST API is available at Apiary.
Note
As we use Spotify for auth, there is no hosted demo site for this project. This is because Spotify restricts non-verified projects from having non-whitelisted users authenticate against their API. To remove this restriction a review process application must be made, which hasn't been done for this project.
- Sign in with a Spotify account.
- Select your current location or search for a specific location.
- Add your clothes to the wardrobe.
- Get outfit suggestion based on current weather.
- What clothes to wear based on current weather
- Playlist that (hopefully) matches the weather
- Current weather for chosen location
- Dark & light mode
- Responsive UI
Name | Description |
---|---|
Weather API | Used to get weather data and geocoding |
Spotify web API | Used to search for Spotify playlists and for auth |
WeatherWear API | Used to provide WeatherWear's functionality |
Name | Description |
---|---|
Next.js | Full-stack JavaScript framework |
Tailwind | CSS styling library |
Kysely | SQL query builder |
Zod | Data validation library |
Shadcn UI | UI component library |
SWR | Client-side data fetching library |
Auth.js | Auth library |
Vercel | Database hosting and deployment |
Note
Remember to add the auth callback url on the Spotify project's settings page. For local setup add: http://localhost:3000/api/auth/callback/spotify. For hosted setup add https://example.org/api/auth/callback/spotify
- Make sure the database is running and is set up using the schema.sql script.
- Rename
.env.example
to.env.local
and fill in the environment variables. - Run
npm install
to install dependencies. - Run
npm run dev
to start the development server. - Open http://localhost:3000.
- Make sure the database is running and is set up using the schema.sql script.
- Clone this repo.
- Visit the Vercel dashboard and create a new project.
- Link the project to your GitHub repository.
- Add the environment variables on the Vercel project settings page. Remember to change the BASE_URL environment variables to point to your Vercel project URL.