A modern full-stack web application that displays weather data for your current location and any city you search for.
Frontend built with React, Vite, TailwindCSS, and Recharts. Backend powered by Express.js and Node.js. Data provided by the Tomorrow.io Weather API.
- π Current Location Weather: Automatically detects and displays your local weather.
- π City Search: Get weather data for any city worldwide.
- π Interactive Charts: Visualize temperature, humidity, wind speed, cloud cover, UV index, and more for the next 5 days.
- β‘ Fast & Responsive: Optimized for mobile, tablet, and desktop.
- ποΈ Secure Backend API: Express.js server handles API requests and protects the Tomorrow.io key.
- Frontend: React, Vite, TailwindCSS, Recharts
- Backend: Express.js, Node.js
- API: Tomorrow.io Weather API
git clone https://github.com/miguelPRG/WeatherApp.git
cd WeatherAppSwitch to the develop branch for local frontend-backend communication, as it points to the correct backend URL.
git switch develop- Create a .env file inside the backend directory and add your Tomorrow.io API key:
TOMORROW_API_KEY=your_api_key_here
This project includes Docker configuration to simplify development setup.
It allows you to run both frontend and backend in isolated containers without installing Node.js or npm locally for each part.
β οΈ Note: Docker is configured for development purposes only, not for production deployment. For production, you would need to build the frontend and backend separately and deploy each one to a server or a cloud service. This project runs in Render(backend) and Vercel(frontend).
From the project root, run (as administrator):
docker-compose up --buildThis will start:
. Backend on http://localhost:8000 . Frontend on http://localhost:3000
We can also stop the container to shutdown the application as a whole.
docker-compose down- Go to the backend folder:
cd backend- Install dependencies:
npm install- Start the backend server:
npm run serverThe backend will run on [http://localhost:8000](http://localhost:8000)
- Open a new terminal and go to the frontend folder:
cd frontend- Install dependencies:
npm install- Start the development server:
npm run devThe frontend will run on [http://localhost:3000](http://localhost:3000)
- On load, the app requests your location and shows weather data automatically.
- Search for any city to get its forecast.
- Data is cached in local storage to reduce API calls.
- Explore charts for temperature, humidity, wind speed, cloud cover, evapotranspiration, and UV index.
Here is a screenshot where the user's current location is not correctly fetched, weather if it's because the user's browser has not location permissions or some other problem.
Here is a screenshot where the user's asked city was not found.
This project also includes unitary tests in frontend/src/tests directory. In order to them, run the following commands:
cd frontend
npm run testThis project is operating in constant integration and deployment. Every time a commit is pushed in several diferent branches, the GitHub workflow is executed. This workflow runs 4 jobs: install-in-cache-and-audit, test-frontend, build-app, deploy
.github/
workflows/
action.yml
backend/
app.js
package.json
Dockerfile
.dockerignore
.env
frontend/
src/
components/
hooks/
styles/
App.tsx
main.tsx
tests/
components/
hooks/
public/
package.json
vite.config.ts
Dockerfile
.dockerignore
docker-compose.yml
LICENSE
README.md
Made by Miguel GonΓ§alves.


