From b11d5ceca3f2a0e99a9010248ed46cf91cfcb768 Mon Sep 17 00:00:00 2001 From: nicoagostini Date: Fri, 23 May 2025 02:29:59 -0700 Subject: [PATCH] refactor/ RREADME updated, About Us updated, unused route removed --- README.md | 70 ++++++++++++++++++++++-------------- src/public/scripts/footer.js | 2 +- src/router/user.js | 14 -------- src/util/suggestions.js | 2 +- src/views/aboutUs.ejs | 64 ++++++++++++++++++++++++--------- 5 files changed, 93 insertions(+), 59 deletions(-) diff --git a/README.md b/README.md index 89c3b30..a441214 100755 --- a/README.md +++ b/README.md @@ -3,22 +3,30 @@ ## Overview -Retirement Calculator - The goal of the application is to help users manage and track their financial progress in a way that reflects real life. Instead of just acting as a calculator, the app functions as a dynamic tracker. It shows the user a percentage of how much of their goal has been achieved and compares their actual performance to their planned targets. +RCalculator is a dynamic financial tracking application designed to help users manage and monitor their progress towards long-term financial goals, particularly retirement. It moves beyond simple calculations by providing personalized insights, tracking actual performance against planned targets, and offering a clear view of your financial journey towards achieving your desired future. --- ## Features -- Do calculator stuff +- **Personalized Financial Profile:** Users complete a comprehensive questionnaire to build a financial profile, enabling tailored guidance and projections. +- **Comprehensive Asset Management:** Add, track, and manage various types of assets including savings, stocks, real estate, and other investments for a holistic view of net worth. +- **Strategic Goal Planning:** Define long-term financial objectives (e.g., retirement, home purchase, education) and create detailed plans with actionable steps. +- **Clear Financial Projections:** Visualize potential investment growth and assess the feasibility of financial plans through easy-to-understand projections and charts. +- **User-Friendly Dashboard:** An intuitive dashboard provides an at-a-glance overview of financial health, asset allocation, and progress towards goals. +- **Secure User Authentication:** Robust authentication system to protect sensitive financial data, including secure registration and login processes. +- **Dynamic Currency Conversion:** (If applicable) Utilizes geolocation to provide relevant currency information and conversion rates for international users or assets. --- ## Technologies Used -Example: -- **Frontend**: HTML, CSS, JavaScript -- **Backend**: Express.js -- **Database**: MongoDB +- **Frontend:** EJS (Embedded JavaScript templates), Tailwind CSS, Vanilla JavaScript +- **Backend:** Node.js, Express.js +- **Database:** MongoDB +- **Authentication:** express-session for session management, bcrypt for password hashing. +- **Data Validation:** Joi for schema validation. +- **APIs:** Google Geolocation API (for location-based currency/data if used). --- @@ -53,26 +61,25 @@ Example: ``` retirementCalculator/ ├── src/ -| ├── auth/ -| ├── database/ -│ ├── public/ -│ │ ├── images/ -│ │ ├── scripts/ -│ │ └── svgs/ -| | -│ ├── router/ -│ ├── utils/ -│ └── views/ -│ └── partials/ +│ ├── auth/ # Authentication logic (e.g., passport setup, strategies) +│ ├── database/ # MongoDB connection, schemas, models +│ ├── public/ # Static assets +│ │ ├── images/ # Site images and icons +│ │ ├── scripts/ # Client-side JavaScript files +│ │ └── svgs/ # SVG icons +│ ├── router/ # Express route definitions +│ ├── util/ # Utility functions (e.g., calculations, helpers) +│ └── views/ # EJS templates +│ └── partials/ # Reusable EJS partials (headers, footers, nav) │ -├── .env.example -├── .gitignore -├── app.js -├── CONTRIBUTING.md -├── LICENSE -├── package-lock.json -├── package.json -└── README.md +├── .env.example # Example environment variables file +├── .gitignore # Specifies intentionally untracked files that Git should ignore +├── app.js # Main application entry point +├── CONTRIBUTING.md # Guidelines for contributing to the project +├── LICENSE # Project license information +├── package-lock.json # Records exact versions of dependencies +├── package.json # Project metadata and dependencies +└── README.md # This file ``` --- @@ -87,13 +94,22 @@ retirementCalculator/ ## more details to come... ## Limitations and Future Work + ### Limitations -- None +- **Generalized Advice:** The application provides financial guidance based on user input and common models; it does not substitute professional financial advisory services. +- **Market Volatility:** Projections are based on assumed rates of return and do not account for all potential market fluctuations or unforeseen economic events. +- **Manual Data Entry:** Asset information and updates currently require manual input. +- **Single User Focus:** Primarily designed for individual financial planning. ### Future Work -- All work +- **Third-Party API Integrations:** Connect with financial institutions (e.g., Plaid) for automated asset tracking and transaction importing. +- **Advanced Reporting:** Implement more detailed financial reports, customizable charts, and data export options (e.g., PDF, CSV). +- **Scenario Analysis Tools:** Allow users to model different financial scenarios (e.g., changing income, retirement age, investment strategies). +- **Enhanced Security Features:** Implement Two-Factor Authentication (2FA) and advanced security audits. +- **Mobile Responsiveness & PWA:** Improve mobile experience and explore Progressive Web App (PWA) capabilities for offline access. +- **Educational Resources:** Integrate a section with articles, tips, and resources on financial literacy and planning. --- diff --git a/src/public/scripts/footer.js b/src/public/scripts/footer.js index 03e9328..b4fdce6 100644 --- a/src/public/scripts/footer.js +++ b/src/public/scripts/footer.js @@ -6,7 +6,7 @@ const factSubmitButton = document.getElementById("factSubmitButton"); var path = window.location.pathname; var page = path.split("/").pop(); -if(page !== "login" && page !== "signup" && page !== "forgotPassword" && page !== "") { +if(page !== "login" && page !== "signup" && page !== "forgotPassword" && page !== "aboutUs" && page !== "") { factButton.classList.remove("hidden"); } diff --git a/src/router/user.js b/src/router/user.js index 4b15b5c..c164a2d 100644 --- a/src/router/user.js +++ b/src/router/user.js @@ -189,20 +189,6 @@ module.exports = (middleware, users, plans, assets) => { } }); - // router.get('/newPlan', (req, res) => { - // if (!req.session.user.financialData || !req.session.user) { - // req.session.errMessage = "Please complete your financial data before creating a plan."; - // return res.status(status.Unauthorized).redirect('/questionnaire'); - // } - // const errMessage = req.session.errMessage; - // req.session.errMessage = ""; - // res.render('newPlan', { - // user: req.session.user, - // errMessage: errMessage, - // geoData: req.session.geoData - // }); - // }); - router.post('/newPlan', async (req, res) => { if (!req.session.user.financialData || !req.session.user) { diff --git a/src/util/suggestions.js b/src/util/suggestions.js index 2bfb957..9135a9f 100644 --- a/src/util/suggestions.js +++ b/src/util/suggestions.js @@ -13,7 +13,7 @@ async function generateFact(factInput) { async function generateSuggestions() { const response = await ai.models.generateContent({ model: "gemini-2.0-flash", - contents: "Return a mock investment suggestion 3-5 lines only", + contents: "Return a mock investment suggestion 3-5 lines only, please do not include any extra text or explanation.", }); return response.text; } diff --git a/src/views/aboutUs.ejs b/src/views/aboutUs.ejs index dc26bdb..15460ae 100644 --- a/src/views/aboutUs.ejs +++ b/src/views/aboutUs.ejs @@ -10,27 +10,59 @@

About RCalculator

-

Welcome to RCalculator, your partner in building a secure and fulfilling financial future.

+

Welcome to RCalculator, your partner in navigating the path to a secure and fulfilling financial future. We simplify financial planning, making it accessible and actionable for everyone.

-
-

Our Mission

-

- Our mission is to empower you with the tools and insights needed to take control of your long-term financial goals. -

-
-

- We believe that planning for your desired future, especially retirement, shouldn't be daunting. It doesn't matter what your current age or career status is – starting now is what counts. -

-

- At RCalculator, we help you trace a personalized plan that suits your unique aspirations. We provide clear, actionable advice and projections to guide you on how to get there, whether you're just starting your career, mid-way through, or nearing retirement. -

-

- Let us help you navigate the path to financial independence and achieve the retirement lifestyle you envision. -

+ +
+

What RCalculator Offers

+
+
+

Personalized Financial Insights

+

Start by completing our comprehensive questionnaire. Your answers help us tailor financial guidance and projections specifically to your situation and goals.

+
+
+

Comprehensive Asset Tracking

+

Easily add and monitor various types of assets, from savings accounts and stocks to real estate and other investments. Get a clear overview of your net worth in one place.

+
+
+

Strategic Goal Planning

+

Define your long-term financial objectives, such as retirement, buying a home, or funding education. Create detailed plans and see how you can achieve them.

+
+
+

Clear Financial Projections

+

Understand the potential growth of your investments and the feasibility of your financial plans with our easy-to-understand projections and visual tools.

+
+ +
+

Getting Started with RCalculator

+
    +
  1. + Sign Up & Build Your Profile: Create your account and fill out our initial questionnaire. This provides the foundation for personalized advice. +
  2. +
  3. + Log Your Assets: Navigate to the 'Assets' section to add details about your current savings, investments, and other valuable possessions. +
  4. +
  5. + Create Financial Plans: Head to the 'Plans' section to outline your financial goals. Set targets, timelines, and see projected outcomes. +
  6. +
  7. + Monitor & Adjust: Regularly review your dashboard to track your progress. Adjust your plans and asset information as your circumstances change. +
  8. +
+
+ + +
+

Our Commitment

+

+ Our mission is to empower you with clarity and confidence in your financial decisions. We believe that with the right tools and guidance, anyone can achieve their financial aspirations. Let RCalculator be your guide to financial independence. +

+
+ <% if (!geoData) { %>