refactor/ RREADME updated, About Us updated, unused route removed

This commit is contained in:
nicoagostini committed 2025-05-23 02:29:59 -07:00
1 parent ed8b2b47b6
commit b11d5ceca3
5 files changed
+93 -59

No files matched your search

+43 -27
View File
@@ -3,22 +3,30 @@
## Overview ## 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 ## 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 ## Technologies Used
Example: - **Frontend:** EJS (Embedded JavaScript templates), Tailwind CSS, Vanilla JavaScript
- **Frontend**: HTML, CSS, JavaScript - **Backend:** Node.js, Express.js
- **Backend**: Express.js - **Database:** MongoDB
- **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/ retirementCalculator/
├── src/ ├── src/
| ├── auth/ ├── auth/ # Authentication logic (e.g., passport setup, strategies)
| ├── database/ ├── database/ # MongoDB connection, schemas, models
│ ├── public/ │ ├── public/ # Static assets
│ │ ├── images/ │ │ ├── images/ # Site images and icons
│ │ ├── scripts/ │ │ ├── scripts/ # Client-side JavaScript files
│ │ └── svgs/ │ │ └── svgs/ # SVG icons
| | │ ├── router/ # Express route definitions
│ ├── router/ │ ├── util/ # Utility functions (e.g., calculations, helpers)
── utils/ ── views/ # EJS templates
└── views/ └── partials/ # Reusable EJS partials (headers, footers, nav)
│ └── partials/
├── .env.example ├── .env.example # Example environment variables file
├── .gitignore ├── .gitignore # Specifies intentionally untracked files that Git should ignore
├── app.js ├── app.js # Main application entry point
├── CONTRIBUTING.md ├── CONTRIBUTING.md # Guidelines for contributing to the project
├── LICENSE ├── LICENSE # Project license information
├── package-lock.json ├── package-lock.json # Records exact versions of dependencies
├── package.json ├── package.json # Project metadata and dependencies
└── README.md └── README.md # This file
``` ```
--- ---
@@ -87,13 +94,22 @@ retirementCalculator/
## more details to come... ## more details to come...
## Limitations and Future Work ## Limitations and Future Work
### Limitations ### 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 ### 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.
--- ---
+1 -1
View File
@@ -6,7 +6,7 @@ const factSubmitButton = document.getElementById("factSubmitButton");
var path = window.location.pathname; var path = window.location.pathname;
var page = path.split("/").pop(); 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"); factButton.classList.remove("hidden");
} }
-14
View File
@@ -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) => { router.post('/newPlan', async (req, res) => {
if (!req.session.user.financialData || !req.session.user) { if (!req.session.user.financialData || !req.session.user) {
+1 -1
View File
@@ -13,7 +13,7 @@ async function generateFact(factInput) {
async function generateSuggestions() { async function generateSuggestions() {
const response = await ai.models.generateContent({ const response = await ai.models.generateContent({
model: "gemini-2.0-flash", 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; return response.text;
} }
+48 -16
View File
@@ -10,27 +10,59 @@
<section class="bg-gray-900 py-12 md:py-20"> <section class="bg-gray-900 py-12 md:py-20">
<div class="max-w-screen-lg mx-auto px-4 text-center"> <div class="max-w-screen-lg mx-auto px-4 text-center">
<h1 class="mb-4 text-4xl font-extrabold tracking-tight leading-none md:text-5xl lg:text-6xl text-white">About RCalculator</h1> <h1 class="mb-4 text-4xl font-extrabold tracking-tight leading-none md:text-5xl lg:text-6xl text-white">About RCalculator</h1>
<p class="mb-12 text-lg font-normal lg:text-xl sm:px-16 text-gray-400">Welcome to RCalculator, your partner in building a secure and fulfilling financial future.</p> <p class="mb-12 text-lg font-normal lg:text-xl sm:px-16 text-gray-400">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.</p>
</div> </div>
<div class="max-w-screen-md mx-auto px-4"> <!-- What RCalculator Offers Section -->
<h2 class="mb-4 text-3xl font-bold tracking-tight text-white text-center">Our Mission</h2> <div class="max-w-screen-md mx-auto px-4 mb-16">
<p class="mb-6 font-normal text-gray-400 text-lg text-center"> <h2 class="mb-8 text-3xl font-bold tracking-tight text-white text-center">What RCalculator Offers</h2>
Our mission is to empower you with the tools and insights needed to take control of your long-term financial goals. <div class="space-y-8 text-gray-400 text-lg">
</p> <div class="p-6 border border-gray-700 rounded-lg bg-gray-800/30 shadow-lg">
<div class="prose lg:prose-lg mx-auto text-gray-400"> <h3 class="font-semibold text-xl text-white mb-2">Personalized Financial Insights</h3>
<p class="mb-4"> <p>Start by completing our comprehensive questionnaire. Your answers help us tailor financial guidance and projections specifically to your situation and goals.</p>
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. </div>
</p> <div class="p-6 border border-gray-700 rounded-lg bg-gray-800/30 shadow-lg">
<p class="mb-4"> <h3 class="font-semibold text-xl text-white mb-2">Comprehensive Asset Tracking</h3>
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. <p>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.</p>
</p> </div>
<p> <div class="p-6 border border-gray-700 rounded-lg bg-gray-800/30 shadow-lg">
Let us help you navigate the path to financial independence and achieve the retirement lifestyle you envision. <h3 class="font-semibold text-xl text-white mb-2">Strategic Goal Planning</h3>
</p> <p>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.</p>
</div>
<div class="p-6 border border-gray-700 rounded-lg bg-gray-800/30 shadow-lg">
<h3 class="font-semibold text-xl text-white mb-2">Clear Financial Projections</h3>
<p>Understand the potential growth of your investments and the feasibility of your financial plans with our easy-to-understand projections and visual tools.</p>
</div>
</div> </div>
</div> </div>
<!-- Getting Started Section -->
<div class="max-w-screen-md mx-auto px-4 mb-16">
<h2 class="mb-8 text-3xl font-bold tracking-tight text-white text-center">Getting Started with RCalculator</h2>
<ol class="list-decimal list-inside space-y-6 text-gray-400 text-lg">
<li class="p-4 border border-gray-700 rounded-lg bg-gray-800 shadow-md">
<span class="font-semibold text-white">Sign Up & Build Your Profile:</span> Create your account and fill out our initial questionnaire. This provides the foundation for personalized advice.
</li>
<li class="p-4 border border-gray-700 rounded-lg bg-gray-800 shadow-md">
<span class="font-semibold text-white">Log Your Assets:</span> Navigate to the 'Assets' section to add details about your current savings, investments, and other valuable possessions.
</li>
<li class="p-4 border border-gray-700 rounded-lg bg-gray-800 shadow-md">
<span class="font-semibold text-white">Create Financial Plans:</span> Head to the 'Plans' section to outline your financial goals. Set targets, timelines, and see projected outcomes.
</li>
<li class="p-4 border border-gray-700 rounded-lg bg-gray-800 shadow-md">
<span class="font-semibold text-white">Monitor & Adjust:</span> Regularly review your dashboard to track your progress. Adjust your plans and asset information as your circumstances change.
</li>
</ol>
</div>
<!-- Our Commitment Section -->
<div class="max-w-screen-md mx-auto px-4">
<h2 class="mb-6 text-3xl font-bold tracking-tight text-white text-center">Our Commitment</h2>
<p class="text-gray-400 text-lg text-center">
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.
</p>
</div>
<% if (!geoData) { %> <% if (!geoData) { %>
<div class="flex flex-col space-y-4 sm:flex-row sm:justify-center sm:space-y-0"> <div class="flex flex-col space-y-4 sm:flex-row sm:justify-center sm:space-y-0">
<a href="/signup" class="inline-flex justify-center items-center mt-4 py-3 px-5 text-base font-medium text-center text-white rounded-lg bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-900"> <a href="/signup" class="inline-flex justify-center items-center mt-4 py-3 px-5 text-base font-medium text-center text-white rounded-lg bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-900">