An AI-powered stock recommendation platform built with .NET 8 backend and Angular frontend. Features real-time stock data, sentiment analysis, and AI-powered portfolio optimization.
- Real-time Stock Data: Live stock prices and market information
- AI Sentiment Analysis: News and social media sentiment scoring
- Portfolio Optimization: AI-powered investment recommendations
- Currency Conversion: Real-time USD to GBP conversion
- Responsive Design: Modern, mobile-friendly UI
- Risk Assessment: Conservative, Moderate, and Aggressive strategies
- API: ASP.NET Core Web API
- Core: Business logic and models
- Infrastructure: External service integrations
- Services: Finnhub API, Sentiment Analysis, Portfolio Optimization
- Framework: Angular with TypeScript
- UI: Angular Material components
- State Management: RxJS observables
- Styling: SCSS with modern CSS features
- Docker: Local development environment
- Testing: Jasmine/Karma for unit tests
- Linting: ESLint with Angular rules
- Formatting: Prettier for consistent code style
- Docker Desktop
- .NET 8 SDK (for local development without Docker)
- Node.js 18+ (for local development without Docker)
git clone <your-repo-url>
cd StockRecommender# Copy the example environment file
cp env.example .env
# Edit .env and add your API keys
# NEVER commit .env to version control!cd docker
docker-compose up --build- Frontend: http://localhost:4200
- Backend API: http://localhost:5000
cd src/StockRecommender.API
dotnet restore
dotnet runcd ui
npm install
npm start# Frontend tests
cd ui
npm test
# Backend tests
cd src/StockRecommender.API
dotnet testcd ui
npm run e2ecd ui
npm run lint
npm run lint:fixcd ui
npm run format
npm run format:checkCreate a .env file in the root directory:
# Finnhub API Configuration
FINNHUB_API_KEY=your-finnhub-api-key-here
# Application Settings
ASPNETCORE_ENVIRONMENT=Development
ASPNETCORE_URLS=http://+:80
# Frontend Configuration
NODE_ENV=development.env files or real API keys to version control!
StockRecommender/
βββ docker/ # Docker configuration
βββ src/ # .NET Backend
β βββ StockRecommender.API/
β βββ StockRecommender.Core/
β βββ StockRecommender.Infrastructure/
βββ ui/ # Angular Frontend
β βββ src/app/
β β βββ core/ # Singleton services
β β βββ features/ # Feature modules
β β βββ shared/ # Reusable components
β β βββ models/ # TypeScript interfaces
β βββ ...
βββ .env # Environment variables (not in git)
βββ env.example # Example environment file
βββ README.md
This Docker setup is designed for local development only. For production:
-
Use Cloud-Native Services:
- Azure App Service / AWS Elastic Beanstalk
- Azure Container Instances / AWS ECS
- Kubernetes clusters
-
Environment Variables:
- Use cloud provider's secret management
- Azure Key Vault / AWS Secrets Manager
- Never use Docker secrets for production
-
Build Process:
# Frontend production build cd ui npm run build --configuration=production # Backend production build cd src/StockRecommender.API dotnet publish -c Release
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Follow the coding standards:
- Run
npm run lintandnpm run format - Write unit tests for new features
- Update documentation as needed
- Run
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow Angular style guide
- Use TypeScript strict mode
- Write meaningful commit messages
- Include tests for new features
- No secrets in code or configs
- API Keys: Never hardcode or commit API keys
- Environment Variables: Use
.envfor local dev, cloud secrets for production - Docker: Local development only, not for production secrets
- Dependencies: Regularly update packages for security patches
This project is licensed under the MIT License - see the LICENSE file for details.
-
Port Already in Use:
# Check what's using the port netstat -ano | findstr :5000 # Kill the process or change ports in docker-compose.yml
-
API Key Issues:
- Ensure
.envfile exists and has correct API key - Check that
.envis not being ignored by Docker
- Ensure
-
Angular Build Issues:
cd ui npm cache clean --force rm -rf node_modules npm install
For issues and questions:
- Check the troubleshooting section
- Search existing issues
- Create a new issue with detailed information
Happy Coding! π