Finished website (Deployed)
https://superb-dango-1d77e8.netlify.app
APIs:
- OpenWeatherMap
- Geopify
- API Ninja (quote)
- Unsplash
React:
- useEffect
- useState
React Redux:
- Provider
- useDispatch
- useSelector
Redux Toolkit:
- configureStore
- createSlice
- createAsyncThunk
There is this browser extension that I love, it is called Momentum. I thought, what if I want to build something like this? What is involved in order for this to run as a web app instead of an extension?
Here is what the extension looks like, and the next image is what my web app looks like:
Momentum:
My Inspirational Homepage:
- app
- store.js - configureStore()
- features
- backgroundImage
- BackgroundImage.js
- displays background image
- dispatches getBackgroundImage()
- import getBackgroundImage from backgroundImageSlice
- backgroundImageSlice.js
- createSlice()
- contains switchToNextBackgroundImage, switchToPreviousBackgroundImage, getBackgroundImage (Thunk) logic
- BackgroundImage.js
- error
- Error.js
- displays error message
- dispatches retryHandler
- dispatches clearErrorMessage
- errorSlice.js
- contains retryHandler, clearErrorMessage logic
- Error.js
- journal
- Journal.js
- dispatches addJournalEntry
- journalSlice.js
- contains addJournalEntry, removeEntry, toggleEntryDone logic
- Journal.js
- quote
- Quote.js
- dispatches getQuote
- quoteslice.js
- contains getQuote logic (Thunk)
- Quote.js
- weather
- weather.js
- dispatches getWeather
- weatherSlice.js
- contains getCoords (Thunk), getWeather (Thunk)
- weather.js
- backgroundImage
- components
- BackgroundImagePreviousImage.js
- dispatches switchToPreviousBackgroundImage
- displays button
- BackgroundImageNextImage.js
- dispatches switchToNextBackgroundImage
- displays button
- JournalEntries.js
- displays a list of journals
- JournalEntry.js
- displays journal
- dispatches removeEntry(id)
- dispatches toggleEntryDone(id)
- use third party library called react-dom-confetti
- BackgroundImagePreviousImage.js
- api
- openWeatherMap
- fetches weather data (weatherMetadata, temperature) from openWeatherMap https://api.openweathermap.org
- quotes
- fetches a quote data (quote, author) from quotes https://api.api-ninjas.com/v1/quotes
- unsplash
- fetches image data (image url) from unsplash https://api.unsplash.com/
- geopify
- using user's IP to determine lat/lon, lat/lon are used to fetch local weather for user, getWeather(coords) (Thunk)
- https://www.geoapify.com
- openWeatherMap