- Project Overview
- Goals
- Technologies Used
- Project Structure
- Getting Started
- Collaboration Guidelines
- Contributing
- Resources
- Contact
- License
The Smart Investment Advisor Platform is a web-based application designed to help users manage their investments intelligently. Leveraging modern JavaScript practices, the platform offers features such as user profiles, portfolio management, investment tracking, and data visualization. This project serves both as a practical tool for users and an educational experience for students learning JavaScript and collaborative development.
-
Educational Objectives:
- Master fundamental JavaScript concepts including variables, operators, control flow, functions, and data structures.
- Develop problem-solving and debugging skills through hands-on coding exercises.
- Foster collaborative development practices using Git and GitHub.
-
Project Objectives:
- Create a user-friendly interface for managing investment portfolios.
- Implement robust data handling and persistence mechanisms.
- Integrate dynamic features such as real-time data visualization and risk assessment.
-
Frontend:
- HTML5
- CSS3
- JavaScript (ES6+)
-
Tools:
- Visual Studio Code
- Node.js
- Live Server Extension
- Git & GitHub
smart-investment-advisor/
├── public/
│ ├── index.html
│ ├── favicon.ico
│ ├── manifest.json
│ └── assets/
│ ├── images/
│ ├── fonts/
│ └── icons/
├── src/
│ ├── styles/
│ │ ├── main.css
│ │ └── responsive.css
│ ├── scripts/
│ │ ├── app.js
│ │ ├── utils.js
│ │ ├── api.js
│ │ └── modules/
│ │ ├── user.js
│ │ ├── investment.js
│ │ └── dashboard.js
│ ├── components/
│ │ ├── Header.js
│ │ ├── Footer.js
│ │ ├── InvestmentList.js
│ │ ├── InvestmentForm.js
│ │ └── Charts.js
│ ├── services/
│ │ ├── authService.js
│ │ ├── investmentService.js
│ │ └── dataService.js
│ └── tests/
│ ├── user.test.js
│ ├── investment.test.js
│ └── dashboard.test.js
├── server/
│ ├── server.js
│ ├── routes/
│ │ ├── authRoutes.js
│ │ ├── investmentRoutes.js
│ │ └── dataRoutes.js
│ ├── models/
│ │ ├── User.js
│ │ └── Investment.js
│ └── controllers/
│ ├── authController.js
│ ├── investmentController.js
│ └── dataController.js
├── config/
│ ├── default.json
│ └── environment.js
├── package.json
├── package-lock.json
├── README.md
├── .gitignore
└── webpack.config.js
Before you begin, ensure you have the following installed on your computer:
- Visual Studio Code (VS Code): Download Here
- Node.js: Download Here (optional but recommended for JavaScript runtime)
- Git: Download Here
- Live Server Extension for VS Code: Installation steps below.
-
Clone the Repository:
git clone [email protected]:Ishmael-Chepsoi/ourInvest-project.git cd smart-investment-advisor
-
Install Dependencies:
If your project uses
npm
, install the necessary packages:npm install
-
Install Live Server Extension:
- Open Visual Studio Code.
- Navigate to the Extensions panel by clicking the Extensions icon in the Activity Bar or pressing
Ctrl+Shift+X
(Cmd+Shift+X
on Mac). - Search for "Live Server" by Ritwick Dey.
- Click Install.
-
Open
index.html
:- In VS Code, navigate to the
public/
folder. - Open the
index.html
file.
- In VS Code, navigate to the
-
Start Live Server:
- Option 1: Right-click inside the
index.html
file and select "Open with Live Server". - Option 2: Click the Go Live button located at the bottom-right corner of VS Code's status bar.
- Option 1: Right-click inside the
-
View the Application:
- Your default browser will automatically open the app at a local URL, typically
http://127.0.0.1:5500/public/index.html
. - Any changes you make to your code will automatically reflect in the browser.
- Your default browser will automatically open the app at a local URL, typically
-
Access the Console:
- Open the browser's developer tools by pressing
F12
,Ctrl+Shift+I
(Windows/Linux), orCmd+Option+I
(Mac). - Navigate to the Console tab to view logs and errors.
- Open the browser's developer tools by pressing
Successful collaboration is essential for the smooth development of the Smart Investment Advisor Platform. Follow these guidelines to ensure effective teamwork and minimize conflicts.
-
Create a GitHub Account:
- Sign up for a free account at GitHub if you don't have one.
-
Fork the Repository:
- Navigate to the main repository page on GitHub.
- Click the Fork button to create a personal copy of the repository.
-
Clone Your Fork Locally:
git clone [email protected]:Ishmael-Chepsoi/ourInvest-project.git cd smart-investment-advisor
-
Set Up Remote Upstream:
- This allows you to fetch updates from the original repository.
git remote add upstream [email protected]:Ishmael-Chepsoi/ourInvest-project.git
- Verify the remotes:
git remote -v
Using branches helps manage different features and prevents conflicts. Follow this branching strategy:
-
Main Branch:
- Represents the production-ready code.
- Should always be stable.
-
Feature Branches:
- Create a new branch for each feature or task.
- Naming convention:
feature/your-feature-name
git checkout -b feature/joshua-arithmetic-operators
-
Make Your Changes:
- Work on your assigned feature or task in the feature branch.
-
Stage Your Changes:
git add .
- Alternatively, add specific files:
git add src/scripts/operators_joshua.js
-
Commit Your Changes:
git commit -m "Add arithmetic operator functions for investment calculations"
- Use clear and descriptive commit messages.
-
Push to Your Fork:
git push origin feature/joshua-arithmetic-operators
-
Create a Pull Request (PR):
- Navigate to your fork on GitHub.
- Click Compare & pull request.
- Provide a clear description of your changes.
- Submit the PR to the main repository.
-
Syncing Your Fork:
- Regularly fetch and merge changes from the upstream repository to keep your fork up-to-date.
git fetch upstream git checkout main git merge upstream/main
-
Rebasing Your Feature Branch (Optional):
- To incorporate the latest changes from
main
into your feature branch.
git checkout feature/joshua-arithmetic-operators git rebase main
- To incorporate the latest changes from
Merge conflicts occur when multiple branches modify the same part of a file. To handle them:
-
Identify the Conflict:
- Git will notify you of conflicting files during a merge or rebase.
-
Open the Conflicted File:
- Conflicted sections are marked with
<<<<<<<
,=======
, and>>>>>>>
.
- Conflicted sections are marked with
-
Resolve the Conflict:
- Decide which changes to keep or how to combine them.
-
Stage the Resolved File:
git add path/to/conflicted-file.js
-
Continue the Merge or Rebase:
git commit -m "Resolve merge conflict in path/to/conflicted-file.js"
- Or for rebase:
git rebase --continue
-
Push the Resolved Changes:
git push origin feature/joshua-arithmetic-operators
-
Pull Before You Push:
- Always pull the latest changes before pushing to minimize conflicts.
git checkout main git pull upstream main git checkout feature/your-feature git merge main
-
Small, Frequent Commits:
- Commit changes in small, manageable chunks with clear messages.
-
Avoid Committing Sensitive Data:
- Use
.gitignore
to exclude files likenode_modules/
, environment variables, etc.
- Use
-
Communicate:
- Inform team members about the features you are working on to avoid overlapping efforts.
-
Review Code:
- Participate in code reviews to maintain code quality and share knowledge.
We welcome contributions from all team members. Follow these steps to contribute effectively:
-
Assign Yourself a Task:
- Choose an open issue or select a feature to work on.
-
Create a Feature Branch:
git checkout -b feature/your-feature-name
-
Develop Your Feature:
- Write clean, readable, and maintainable code.
- Follow the project's coding standards.
-
Commit Your Changes:
git add . git commit -m "Add descriptive message about your changes"
-
Push to Your Fork:
git push origin feature/your-feature-name
-
Open a Pull Request:
- Navigate to your fork on GitHub.
- Click Compare & pull request.
- Provide a detailed description of your changes.
- Submit the PR for review.
-
Address Feedback:
- Make necessary changes based on feedback from team members.
-
Merge Your PR:
- Once approved, merge your PR into the
main
branch.
- Once approved, merge your PR into the
-
Eloquent JavaScript (3rd Edition) by Marijn Haverbeke:
Official Website -
MDN Web Docs:
JavaScript Guide -
Git and GitHub Tutorials:
GitHub Learning Lab -
Visual Studio Code Documentation:
VS Code Docs
For any questions, issues, or suggestions, please reach out to the project leads:
-
Joshua:
- Email: [email protected]
- GitHub: @joshua
-
Sarah:
- Email: [email protected]
- GitHub: @sarah
-
Mercy:
- Email: [email protected]
- GitHub: @mercy
-
Blessing:
- Email: [email protected]
- GitHub: @blessing
This project is licensed under the MIT License.