Hi there! Just a weather forecast by an octopus π
See it in action here π₯
- React (Hooks)
- TypeScript
- TailwindCSS
- Axios
- OpenWeatherMap API
- usePosition
- Jest
- React Testing Library
- Firebase
To run the project locally you will need to set environment variables, which will be secrets ignored by git like API KEYS or related.
For this, create a .env
file in the root of the project with the following:
// OpenWeather API KEY:
REACT_APP_OPENWEATHER_API_KEY = YourApiKeyHere
Just replace YourApiKeyHere
with your real API KEY (if you don't have any real API KEY, you will have to contact the project owner to get the secret).
This file is already set to be ignored by git in .gitignore
, and will be also the place to store and hide any new secret that should not be commited. Just remember to add any new secret here in the above .env
file reference to keep the list of required enviroment variables up to date.
The project is hosted in firebase, for deploy you will have to install Firebase Cli.
With the Firebase Cli installed, and the correct access to the project in the Firebase Console, you just will need to run yarn build
to generate a production build folder, and after that, firebase deploy
to deploy the build.
The project will be deployed in https://weather-octopus.web.app/ and https://weather-octopus.firebaseapp.com/.
weather-octopus
β
β -> public (index.html, manifest.json, etc)
β
β .env <-- (To hide secrets. It's required to run the project locally.
β Please read the "Environment Variables" section of the README)
β
β .gitattributes
β .gitignore
β .firebase
β .firebaserc
β firebase.json
β postcss.config.js
β tailwind.config.js
β tsconfig.json
β packgae.json
β yarn.lock
β README.md
β
βββββ> src
β -> tests
β index.tsx
β App.tsx
β
ββββ> components (All stateless and presentational React Functional Components)
β -> tests
β
ββββ> containers (All stateful React Components intended as independent modules)
β -> tests
β
ββββ> helpers
β ββββ> constants
β ββββ> methods
β β types.ts
β
ββββ> providers (All state providers builded with React API Context and Hooks)
β -> tests
β
ββββ> services (All external services, as OpenWeather)
β
β
ββββ> images
β ββββ> gallery (All images files as .svg or .jpg)
β β index.ts (Exports one only images object)
β
ββββ> styles
β main.css (All css generated by tailwind, it should not be edited)
β tailwind.css (A place to put custom classes if it's necesary)