How mbl43/my-wealth works
Project Type & Overview
• This is a modern front-end web application built with React that focuses on financial investment tracking. It offers various financial calculators (SIP, Loss Recovery, Stock Average) and includes user authentication via Firebase.
• It is a full-stack application in the sense that while the frontend handles the UI and interaction logic, Firebase (both Firestore and Firebase Auth) is the backend component.
Primary Components
• UI/Presentation Layer: Components like Herosection, Navbar, Footer, Layout, Darkmode, Modal, and general pages (Home, Notfound) constitute this layer.
• Functionality/Business Logic Layer: The Calculator components (Calc folder with LossRecovery, Sip, StockAvg) for processing user inputs and performing calculations.
• Authentication & Protected Routing: Components like Login, Signup, ProtectedRoute, and integration in the Firebase configuration for secure authentication.
• Data & External Services: Firebase for authentication and, likely, database storage (investment tracking) as well as external libraries like Email.js and Swiper.js.
Architectural Interactions
• Frontend UI Components interact with the Firebase backend for both authentication and data storage via REST calls or SDK functions provided in the firebase folder.
• Context API (src/contextAPI.jsx) likely provides global state management for features like dark mode toggling and user state.
• React Router is used for navigating between various pages such as Home, Dashboard, and Notfound. ProtectedRoute ensures that private views are accessible only after authentication.
• A clear separation of concerns is enforced with major directories: "components" holding reusable UI blocks, "pages" for the actual views, and "firebase" for backend configuration.
Design Patterns & Technologies
• Component-Based Architecture: Emphasize each UI piece as a self-contained component (for example, Calculator, Dashboard, Modal).
• Single Page Application (SPA): The usage of React Router ensures that navigation occurs without full page reloads.
• Service Integration: Integration with Firebase (authentication and database) serves as the primary backend service.
• UI/UX Consistency: Use of Tailwind CSS and Material UI indicates an emphasis on consistent design and responsiveness.