A modern, real-time financial trading application featuring live stock price updates, interactive charts, and portfolio management. Built as a demo platform with a $100,000 starting balance for seamless trading simulation.
- Real-Time Stock Prices - Live updates every 5 seconds
- Interactive Charts - Dynamic price visualization with Chart.js
- Portfolio Management - Track holdings, P&L, and balance
- Trading Operations - Execute buy/sell orders instantly
- Transaction History - Complete trading activity log
- No Authentication - Direct access for demo purposes
| Technology | Version | Purpose |
|---|---|---|
| Angular | 17.3.0 | SPA Framework |
| TypeScript | 5.4.2 | Type Safety |
| Chart.js | 4.5.1 | Data Visualization |
| RxJS | 7.8.0 | Reactive Programming |
| Technology | Version | Purpose |
|---|---|---|
| Spring Boot | 3.2.0 | REST API Framework |
| Java | 17 | Programming Language |
| PostgreSQL | 16 | Database |
| Maven | 3.x | Build Tool |
- Spring Security (CORS Only)
- Spring Data JPA (ORM)
- Lombok (Code Generation)
graph TB
A[Angular Frontend<br/>Port 5000] --> B[Spring Boot API<br/>Port 8080]
B --> C[PostgreSQL Database<br/>Port 5432]
B --> D[Stock Price Service<br/>Real-time Updates]
subgraph "Frontend Components"
E[Dashboard Component]
F[Trading Component]
G[Portfolio Component]
H[Chart Component]
end
subgraph "Backend Services"
I[Stock Service]
J[Trading Service]
K[Portfolio Service]
L[Price Update Service]
end
A --> E
A --> F
A --> G
A --> H
B --> I
B --> J
B --> K
B --> L
StockChartCloud/
├── frontend/ # Angular Application
│ ├── src/app/
│ │ ├── components/ # UI Components
│ │ │ └── dashboard/ # Trading Dashboard
│ │ ├── services/ # API Services
│ │ └── models/ # TypeScript Interfaces
│ ├── angular.json # Angular Configuration
│ └── package.json # Dependencies
│
├── backend/ # Spring Boot API
│ ├── src/main/java/com/trading/app/
│ │ ├── controller/ # REST Controllers
│ │ ├── service/ # Business Logic
│ │ ├── model/ # JPA Entities
│ │ ├── repository/ # Data Access
│ │ └── config/ # Configuration
│ └── pom.xml # Maven Dependencies
│
└── README.md # This file
- Java 17+
- Node.js 20+
- PostgreSQL 16+
- Maven 3.x
cd backend
mvn spring-boot:runBackend runs on: http://localhost:8080
cd frontend
npm install
npm startFrontend runs on: http://localhost:5000
GET /api/stocks/all # Get all stocks
GET /api/stocks/{symbol} # Get stock details
GET /api/stocks/{symbol}/price # Get current pricePOST /api/trades/execute # Execute trade
GET /api/trades/history # Trade history
GET /api/trades/recent # Recent tradesGET /api/portfolio # Portfolio holdings
GET /api/portfolio/summary # Portfolio summary| Feature | Description | Status |
|---|---|---|
| Real-time Updates | 5-second price refresh | Active |
| Live Charts | Interactive price charts | Active |
| Authentication | Disabled for demo | Disabled |
| Responsive Design | Mobile-friendly UI | Active |
This application is designed for containerization and AWS deployment:
- Docker - Container packaging
- AWS ECS/EKS - Container orchestration
- AWS RDS - Managed PostgreSQL
- AWS ALB - Load balancing
- CloudWatch - Monitoring
- Docker - Container packaging
- AWS ECS/EKS - Container orchestration
- AWS RDS - Managed PostgreSQL
- AWS ALB - Load balancing
- CloudWatch - Monitoring
// Backend allows requests from:
- localhost:5000 (Angular dev server)
- 127.0.0.1:5000# PostgreSQL connection
spring.datasource.url=jdbc:postgresql://localhost:5432/trading_db
spring.jpa.hibernate.ddl-auto=update| Metric | Value | Description |
|---|---|---|
| Update Frequency | 5 seconds | Stock price refresh rate |
| Default Balance | $100,000 | Demo trading capital |
| API Response | <100ms | Average response time |
| Mobile Support | 100% | Responsive design coverage |
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Chart.js - Beautiful chart visualizations
- Spring Boot - Robust backend framework
- Angular - Powerful frontend framework
- PostgreSQL - Reliable database system
Built with love for financial trading simulation