A full-stack web application for tracking stock portfolios, built with React and Spring Boot.
🚀 Live URL: ADD_LIVE_URL_HERE
- 📈 Real-time stock tracking
- 💼 Portfolio management
- 📊 Investment analytics
- 📱 Responsive design
- 👥 User authentication
- 📑 Watchlist creation
- 📰 Market news and updates
- 📊 Top gainers and losers
- 🔗 Shareable portfolio links
- React.js
- Material-UI
- Axios
- React Router
- Recharts
- Spring Boot
- Spring Security
- JWT Authentication
- JPA/Hibernate
- H2 (file-based, default)
- Maven
- Node.js (v16 or higher)
- Java JDK 17
- Maven
- Docker (optional)
REACT_APP_API_URL=your_backend_urlTWELVEDATA_API_KEY=your_twelvedata_api_key
ALPHAVANTAGE_API_KEY=your_alphavantage_api_key
FINNHUB_API_KEY=your_finnhub_api_key
APP_CORS_ALLOWED_ORIGINS=http://localhost:3000,http://localhost:3001,https://your-vercel-app.vercel.appNote: Spring Boot maps environment variables like TWELVEDATA_API_KEY to
twelvedata.api.key. You can also set these directly in
backend/src/main/resources/application.properties.
- Copy environment variables
cp .env.example .env- Run
docker-compose up --build- Open
Frontend:
http://localhostBackend:http://localhost:8080
- Clone the repository
git clone https://github.com/Kehsihb-a/Stocks_Portfolio_Management_System_OOAD.git
cd OOAD_Project- Frontend Setup
cd frontend
npm install
npm start- Backend Setup
cd backend
mvn clean install
mvn spring-boot:run- Create a
.envfile (copy from.env.example)
cp .env.example .env- Build and run using Docker Compose
docker-compose up --buildThe frontend will be available at http://localhost and the backend at
http://localhost:8080.
- Create a new Web Service.
- Connect your GitHub repository.
- Configure:
- Runtime:
Docker(usebackend/Dockerfile) - Root Directory:
backend - Health Check Path:
/actuator/health - Environment Variables: set all backend vars listed above.
- Runtime:
- Deploy and copy the backend URL.
- Import the GitHub repo in Vercel.
- Configure:
- Framework:
Create React App - Root Directory:
frontend - Build Command:
npm run build - Output Directory:
build
- Framework:
- Add environment variables:
REACT_APP_API_URL= your backend URL from step 4 above.
- Deploy and copy the Vercel URL to update
Live URL.
- POST
/api/auth/register- Register new user - POST
/api/auth/login- User login
- GET
/api/stocks/search- Search stocks - GET
/api/stocks/{symbol}/quote- Get stock quote - GET
/api/stocks/top-movers- Get top gainers/losers - GET
/api/stocks/news- Get market news
- GET
/api/holdings- Get user holdings - GET
/api/holdings/shared/{userId}- Get shared portfolio - POST
/api/transactions/buy- Buy stock - POST
/api/transactions/sell- Sell stock
- GET
/api/watchlists- Get user watchlists - POST
/api/watchlists- Create watchlist - POST
/api/watchlists/{id}/stocks/{symbol}- Add stock to watchlist - DELETE
/api/watchlists/{id}/stocks/{symbol}- Remove stock from watchlist
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- TwelveData API for real-time stock data
- Alpha Vantage for market data and news
- Material-UI for the UI components