A full-stack weather prediction web application built with React (TypeScript) on the frontend and Firebase Authentication for user login. It integrates mapping and user interface components to provide location-based weather insights.
weather\_prediction/
βββ frontend/
β βββ src/
β β βββ App.tsx # Main routing and authentication handling
β β βββ main.tsx # React app entry point
β β βββ pages/ # Contains Home and Dashboard views
β β βββ components/
β β β βββ Auth.tsx # Authentication logic (login/signup)
β β βββ firebase/
β β βββ config.ts # Firebase authentication config
β βββ public/ # Static assets
β βββ node\_modules/ # React dependencies
β βββ package.json # Project dependencies and scripts
β βββ index.css # Global styles
- π Routing with React Router DOM
- π Firebase-based Authentication (login/signup with session persistence)
- π Map-based location selection for weather lookup
- π Real-time weather prediction results (presumably powered via external API or backend model)
- π Dashboard visualization for predicted results
- β‘ Responsive design using Tailwind CSS
- π‘ Context-aware conditional rendering (based on auth state)
- App.tsx handles all routing. It uses Firebase's
onAuthStateChanged
method to watch for authentication state changes. - Routes:
/
β Home page (open to all)/auth
β Login/Signup page (for guests)/dashboard
β Protected page (only for logged-in users)
- main.tsx is the entry point where the app is bootstrapped using React 18βs
createRoot()
API.
- βοΈ React (with TypeScript)
- π React Router DOM for navigation
- π¨ Tailwind CSS for responsive UI
- π₯ Firebase Authentication for secure login
- πΊοΈ Lucide React for icon support
- β‘ Vite for fast development and build
- ESLint & Prettier (presumed from modern stack structure)
- Vite plugin support (via Tailwind, Lucide, etc.)
-
Install Dependencies
cd weather_prediction/frontend npm install
-
Configure Firebase
- Create a Firebase project at firebase.google.com
- Copy your web app config into
frontend/src/firebase/config.ts
-
Run the App
npm run dev
-
Open your browser at
http://localhost:3000
<Route path="/dashboard" element={user ? <Dashboard /> : <Auth />} />
Users cannot access the dashboard unless authenticated.
src/pages/Dashboard.tsx
β Weather display logicsrc/components/ui/MapPicker.tsx
β Interactive location selection
Contributions are welcome! Feel free to fork this repository, make improvements, and submit a pull request. Whether it's bug fixes, performance enhancements, or new features, all help is appreciated.
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions, feedback, or suggestions, feel free to reach out:
- π§ Email: samyukthajaggaiahgari22@gmail.com