From 5e0d91e8fad0642e9ee52c730584ea099f042b69 Mon Sep 17 00:00:00 2001 From: Gabriel Mattos Teixeira dos Santos <129562117+gabrielmatsan@users.noreply.github.com> Date: Sun, 25 May 2025 07:46:05 -0300 Subject: [PATCH 1/3] Create README.md --- README.md | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..8e1fa74d --- /dev/null +++ b/README.md @@ -0,0 +1,102 @@ +# 🌊 Weather Sync + +> Sistema inteligente de monitoramento de enchentes com notificações em tempo real + +
+ Amazon Hacking 2025 + Eixo Climático + Status +
+ +## 📋 Sobre o Projeto + +O **Weather Sync** é uma solução inovadora desenvolvida durante o Amazon Hacking 2025 (Eixo Climático) para monitoramento inteligente de enchentes urbanas. O sistema permite que usuários acompanhem condições meteorológicas críticas em seus bairros favoritos e recebam alertas instantâneos via email e WhatsApp quando há risco de alagamentos. + +### 🎯 Principais Funcionalidades + +- 🌧️ **Monitoramento em Tempo Real** - Acompanhamento contínuo das condições meteorológicas +- 📍 **Sistema de Favoritos** - Adicione bairros de interesse para monitoramento personalizado +- 📧 **Notificações por Email** - Alertas automáticos sobre condições críticas +- 📱 **SMS via WhatsApp** - Notificações instantâneas no seu celular +- 🚨 **Alertas Inteligentes** - Sistema que identifica padrões de risco de enchente +- 🎨 **Interface Intuitiva** - Dashboard responsivo e amigável + +## 🏗️ Arquitetura + +### Server +- **Runtime**: [Bun](https://bun.sh/) - JavaScript runtime ultrarrápido +- **Framework**: [Elysia](https://elysiajs.com/) - Framework web TypeScript de alta performance + +### Website +- **Framework**: [React](https://react.dev/) - Biblioteca para interfaces de usuário +- **Build Tool**: [Vite](https://vitejs.dev/) - Ferramenta de build moderna e rápida +- **Package Manager**: [npm](https://www.npmjs.com/) - Gerenciador de pacotes + +### Infraestrutura +- **Monorepo**: [Turborepo](https://turbo.build/) - Sistema de build de alta performance +- **Package Manager**: [pnpm](https://pnpm.io/) - Gerenciador de pacotes eficiente +- **Deploy**: [Pulumi](https://www.pulumi.com/) - Infraestrutura como código + +## 🚀 Começando + +### Pré-requisitos + +```bash +# Instalar Node.js e npm +# Baixe em: https://nodejs.org/ +``` + +#### Instalar Bun +```bash +curl -fsSL https://bun.sh/install | bash +``` + +#### Instalar pnpm +```bash +npm install -g pnpm +```` + +### Instalação + +- Clone o repositório + +- Instale as dependências + +```bash +pnpm install +``` + +### Configure as variáveis de ambiente + +#### Copie os arquivos de exemplo + +```bash +cp .env.example .env +``` + +#### Configure suas chaves de API +#### - API de clima +#### - Credenciais de email +#### - Token do WhatsApp +#### - Configurações do banco de dados + +Execute o projeto + +```bash +pnpm run dev +``` + +``` +📁 Estrutura do Projeto +weather-sync/ +├── apps/ +│ ├── server/ # API Elysia + Bun +│ └── website/ # React + Vite +├── packages/ +│ ├── shared/ # Tipos e utilitários compartilhados +│ └── config/ # Configurações do projeto +├── infra/ # Configurações Pulumi +├── turbo.json # Configuração Turborepo +├── package.json +└── pnpm-workspace.yaml +``` From 5d6dcccc97ee2c72f408c23d924d28f627aa529d Mon Sep 17 00:00:00 2001 From: Gabriel Mattos Teixeira dos Santos <129562117+gabrielmatsan@users.noreply.github.com> Date: Sun, 25 May 2025 07:53:04 -0300 Subject: [PATCH 2/3] Create README-EN.md --- README-EN.md | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 README-EN.md diff --git a/README-EN.md b/README-EN.md new file mode 100644 index 00000000..35668cd2 --- /dev/null +++ b/README-EN.md @@ -0,0 +1,103 @@ +# 🌊 Weather Sync + +> Intelligent flood monitoring system with real-time notifications + +
+ Amazon Hacking 2025 + Climate Axis + Status +
+ +## 📋 About the Project + +**Weather Sync** is an innovative solution developed during Amazon Hacking 2025 (Climate Axis) for intelligent monitoring of urban floods. The system allows users to track critical weather conditions in their favorite neighborhoods and receive instant alerts via email and WhatsApp when there is a risk of flooding. + +### 🎯 Key Features + +- 🌧️ **Real-Time Monitoring** - Continuous tracking of weather conditions +- 📍 **Favorites System** - Add neighborhoods of interest for personalized monitoring +- 📧 **Email Notifications** - Automatic alerts about critical conditions +- 📱 **SMS via WhatsApp** - Instant notifications on your cell phone +- 🚨 **Intelligent Alerts** - System that identifies flood risk patterns +- 🎨 **Intuitive Interface** - Responsive and user-friendly dashboard + +## 🏗️ Architecture + +### Server +- **Runtime**: [Bun](https://bun.sh/) - Ultra-fast JavaScript runtime +- **Framework**: [Elysia](https://elysiajs.com/) - High-performance TypeScript web framework + +### Website +- **Framework**: [React](https://react.dev/) - Library for user interfaces +- **Build Tool**: [Vite](https://vitejs.dev/) - Modern and fast build tool +- **Package Manager**: [npm](https://www.npmjs.com/) - Package manager + +### Infrastructure +- **Monorepo**: [Turborepo](https://turbo.build/) - High-performance build system +- **Package Manager**: [pnpm](https://pnpm.io/) - Efficient package manager +- **Deploy**: [Pulumi](https://www.pulumi.com/) - Infrastructure as code + +## 🚀 Getting Started + +### Prerequisites + +```bash +# Install Node.js and npm +# Download from: [https://nodejs.org/](https://nodejs.org/) +``` + +#### Install Bun +```bash +curl -fsSL https://bun.sh/install | bash +``` + +#### Install pnpm +```bash +npm install -g pnpm +```` + +### Installation + +- Clone the repository + +- Install the dependencies + +```bash +pnpm install +``` + +### Configure the environment variables + +#### Copy the example files + +```bash +cp .env.example .env +``` + +#### Configure your API keys +#### - Weather API +#### - Email credentials +#### - WhatsApp token +#### - Database settings + + +Run the project + +```bash +pnpm run dev +``` + +``` +📁 Project structure +weather-sync/ +├── apps/ +│ ├── server/ # API Elysia + Bun +│ └── website/ # React + Vite +├── packages/ +│ ├── shared/ # Shared types and utilities +│ └── config/ # Project settings +├── infra/ # Pulumi settings +├── turbo.json # Turborepo configuration +├── package.json +└── pnpm-workspace.yaml +``` From a2682170293d42b9a6b18ff31059b737082eb543 Mon Sep 17 00:00:00 2001 From: JM Date: Tue, 27 May 2025 22:44:13 -0300 Subject: [PATCH 3/3] =?UTF-8?q?:lipstick:=20Adicionadas=20p=C3=A1ginas=20P?= =?UTF-8?q?ostLoginLanding=20e=20Dashboard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/website/src/App.tsx | 24 ++-- apps/website/src/Dashboard.tsx | 145 ++++++++++++++++++++ apps/website/src/Home.tsx | 9 ++ apps/website/src/LandingPage.tsx | 2 +- apps/website/src/Login.tsx | 27 ++-- apps/website/src/PostLoginLanding.tsx | 184 ++++++++++++++++++++++++++ apps/website/src/Register.tsx | 82 +++++------- 7 files changed, 398 insertions(+), 75 deletions(-) create mode 100644 apps/website/src/Dashboard.tsx create mode 100644 apps/website/src/PostLoginLanding.tsx diff --git a/apps/website/src/App.tsx b/apps/website/src/App.tsx index 914271ed..e0e0cf8c 100644 --- a/apps/website/src/App.tsx +++ b/apps/website/src/App.tsx @@ -3,23 +3,21 @@ import { Routes, Route } from "react-router-dom"; import Login from "./Login"; import Register from "./Register"; import Home from "./Home"; -import LandingPage from "./LandingPage"; +import LandingPage from "./LandingPage"; +import PostLoginLanding from "./PostLoginLanding"; +import Dashboard from "./Dashboard"; export default function App(): JSX.Element { return ( -
{/* Container do Bootstrap para centralizar */} - - {/**/} +
- } /> - } /> - } /> - } /> - Página não encontrada

} /> + } /> + } /> + } /> + } /> + } /> + } /> + Página não encontrada

} />
); diff --git a/apps/website/src/Dashboard.tsx b/apps/website/src/Dashboard.tsx new file mode 100644 index 00000000..d4b8a9f4 --- /dev/null +++ b/apps/website/src/Dashboard.tsx @@ -0,0 +1,145 @@ +import React from "react"; +import { useNavigate } from "react-router-dom"; +import logoWeatherSync from "./assets/logo-weather-sync.png"; + +export default function Dashboard(): JSX.Element { + const navigate = useNavigate(); + + const handleLogout = () => { + localStorage.removeItem("token"); + localStorage.removeItem("userName"); + navigate("/login"); + }; + + return ( +
+ {/* Header Section */} +
+
+
+
+
+ Weather Sync Logo +
+

Dashboard Meteorológico

+

+ Visualize dados e estatísticas do clima das suas regiões favoritas +

+
+
+
+
+ + {/* Coming Soon Section */} +
+
+
+
+
+
+ 🚧 +
+

+ Dashboard em Desenvolvimento +

+

+ Estamos trabalhando para trazer recursos incríveis para você acompanhar + o clima de forma ainda mais detalhada e intuitiva. +

+ +
+
+
+
+
+ 📊 Gráficos Interativos +
+ + Visualize tendências climáticas + +
+
+
+ +
+
+
+
+ 🌡️ Análises Detalhadas +
+ + Dados meteorológicos completos + +
+
+
+ +
+
+
+
+ 📈 Previsões Avançadas +
+ + Alertas personalizados + +
+
+
+
+ +
+ + + + + +
+
+
+
+
+
+ + {/* Footer */} +
+
+
+
+

+ Weather Sync - Seu companheiro meteorológico +

+
+
+ + © 2025 Weather Sync. Todos os direitos reservados. + +
+
+
+
+
+ ); +} \ No newline at end of file diff --git a/apps/website/src/Home.tsx b/apps/website/src/Home.tsx index 81d919e5..3f58b6b4 100644 --- a/apps/website/src/Home.tsx +++ b/apps/website/src/Home.tsx @@ -277,6 +277,15 @@ export default function Home(): JSX.Element {
+
+ +
+ {/* Footer */}