Learn Stocks is a simulated stock trading platform built to educate users about stock trading, portfolio management, and market strategies. This platform combines real-time stock data with virtual trading and educational content to provide an engaging, risk-free learning experience.
Learn Stocks aims to:
- Educate users on stock trading concepts and strategies.
- Simulate a real-world stock market environment with real-time data.
- Engage users in building and managing virtual portfolios.
- Empower users with financial literacy and market skills through interactive learning and expert content.
This platform is ideal for beginners and aspiring investors who want to learn how to trade in the stock market without risking real money.
To get the Learn Stocks platform up and running locally, follow these steps:
Make sure you have the following installed:
-
Clone the repository:
git clone https://github.com/your-username/learnstocks.git cd learnstocks
-
Install dependencies for both frontend and backend:
# Backend setup cd backend npm install # Frontend setup cd ../frontend npm install
-
Set up environment variables:
- Create a
.env
file in the backend folder and add the following:MONGO_URI=your_mongodb_connection_string PORT=5000 API_KEY=your_api_key_for_stock_data
- In the frontend, if you have any environment variables, add them to a
.env
file.
- Create a
-
Run the application locally:
# Backend cd backend npm start # Frontend (in a new terminal tab) cd frontend npm start
-
Access the application:
- Backend:
http://localhost:5000
- Frontend:
http://localhost:3000
- Backend:
Learn Stocks is powered by modern technologies:
- React - A popular library for building user interfaces.
- CSS/Styled Components - For a clean and responsive UI.
- Netlify - Hosting platform for the frontend.
- Node.js - JavaScript runtime environment.
- Express - A minimal and flexible Node.js web application framework.
- MongoDB - NoSQL database for storing user data, stock info, and virtual portfolios.
- APIs - Real-time stock data is fetched from external APIs.
- Frontend: Hosted on Netlify for fast, reliable, and secure delivery.
- Backend: Hosted on Render for scalable and hassle-free server deployment.
- Create a Netlify account if you don’t already have one at Netlify.com.
- Connect your GitHub repo to Netlify, and select the frontend folder as the root.
- Build Command:
npm run build
- Publish Directory:
frontend/build
- Deploy: Once connected, every push to the
main
branch will automatically trigger a redeployment.
- Create a Render account at Render.com.
- Connect your GitHub repo and select the backend folder for deployment.
- Build and Start Command:
npm install npm start
- Environment Variables: Add your MongoDB URI, API keys, and any other necessary environment variables under the "Environment" section.
- Deploy: Render will handle automatic deployments on pushes to the connected branch.
We welcome contributions! Please submit a pull request or open an issue if you'd like to contribute to the project.
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch-name
. - Commit your changes:
git commit -m 'Add some feature'
. - Push to the branch:
git push origin feature-branch-name
. - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to customize and tweak this according to your needs!