Skip to content

fervailanti/weather-octopus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hi there! Just a weather forecast by an octopus πŸ™
See it in action here πŸ”₯

Builded with:

Environment Variables:

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.

Deployment:

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/.

Project Structure:


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)