Welcome to the Azure Service Fabric with AI Integration project! This repository provides a comprehensive solution for building a scalable, resilient, and intelligent platform leveraging Azure Service Fabric and AI capabilities using Python and other cutting-edge technologies.
- π Project Overview
- π§ Technology Stack
- π¦ Features
- π οΈ Setup and Installation
- π Running the Project
- π Project Structure
- π Security
- π§ͺ Testing
- π Monitoring and Maintenance
- π€ Contributing
- π License
This project aims to create a robust platform that integrates Azure Service Fabric with AI capabilities to enhance business operations, data analytics, and user experiences. By leveraging Python for backend services and AI models, coupled with React.js for the frontend, the platform ensures scalability, resilience, and intelligent data processing.
- Microservices Architecture: Built with Python's FastAPI and .NET Core for handling specific functionalities.
- AI Integration: Implements sentiment analysis using pre-trained models from Hugging Face's Transformers.
- Frontend Application: Developed using React.js for a dynamic and responsive user interface.
- Containerization: Dockerized services for consistent deployments.
- Deployment: Automated deployment to Azure Service Fabric using Azure DevOps Pipelines.
- Security: Secure authentication and authorization using Azure Active Directory (AAD).
- Monitoring: Real-time monitoring with Azure Monitor and Application Insights.
-
Frontend:
- React.js
- TypeScript
- HTML/CSS (Bootstrap/Tailwind)
-
Backend:
- Python (FastAPI)
-
AI/ML:
- Python (Transformers, TensorFlow, PyTorch, scikit-learn)
-
Data Storage:
- Azure SQL Database
- Azure Cosmos DB
- Azure Blob Storage
-
Containerization:
- Docker
-
Orchestration:
- Azure Service Fabric
-
CI/CD:
- Azure DevOps Pipelines
-
Monitoring:
- Azure Monitor
- Application Insights
- Scalable Microservices: Independent services for user management, data processing, AI functionalities, and notifications.
- AI-Powered Sentiment Analysis: Analyze user input and provide sentiment insights.
- Responsive Frontend: Interactive UI for seamless user interaction with real-time feedback.
- Automated Deployment: CI/CD pipelines for streamlined builds, tests, and deployments.
- Secure Authentication: Integration with Azure Active Directory for secure access.
- Comprehensive Monitoring: Real-time tracking of application performance and health.
- Azure Account: Sign up for a free Azure account.
- Azure CLI: Install from here.
- Docker: Install Docker Desktop from here.
- Node.js: Install Node.js from here.
- Python 3.9: Install Python from here.
git clone https://github.com/yourusername/azure-service-fabric-ai-integration.git
cd azure-service-fabric-ai-integration
-
Navigate to the backend directory:
cd sentiment-analysis-service
-
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r app/requirements.txt
-
Run the FastAPI server locally:
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
-
Navigate to the frontend directory:
cd ../frontend
-
Install dependencies:
npm install
-
Start the React application:
npm start
-
Build Docker images:
# For Backend cd sentiment-analysis-service docker build -t sentiment-analysis-service:latest . # For Frontend cd ../frontend docker build -t sentiment-analysis-frontend:latest .
-
Run Docker containers locally:
# Run Backend docker run -d -p 8000:8000 sentiment-analysis-service:latest # Run Frontend docker run -d -p 80:80 sentiment-analysis-frontend:latest
-
Ensure all services are running:
- Backend API:
http://localhost:8000/docs
- Frontend Application:
http://localhost
- Backend API:
-
Access the Frontend:
- Open your browser and navigate to
http://localhost
to use the Sentiment Analysis tool.
- Open your browser and navigate to
-
Test the API:
- Use the Swagger UI at
http://localhost:8000/docs
to interact with the API directly.
- Use the Swagger UI at
azure-service-fabric-ai-integration/
βββ sentiment-analysis-service/
β βββ app/
β β βββ main.py
β β βββ models.py
β β βββ schemas.py
β β βββ utils.py
β β βββ requirements.txt
β βββ Dockerfile
β βββ servicefabric/
β β βββ ApplicationManifest.xml
β β βββ ServiceManifest.xml
β β βββ Settings.xml
β βββ README.md
βββ frontend/
β βββ public/
β β βββ index.html
β βββ src/
β β βββ components/
β β β βββ SentimentForm.jsx
β β βββ App.js
β β βββ index.js
β β βββ App.css
β βββ package.json
β βββ Dockerfile
βββ azure-pipelines.yml
βββ README.md
- Authentication & Authorization: Integrated with Azure Active Directory (AAD) using OAuth 2.0 and JWT for secure access.
- Data Protection: Encrypted data at rest and in transit using Azure Key Vault and TLS.
- Network Security: Isolated services within Azure Virtual Networks and protected using Network Security Groups (NSGs).
- Secrets Management: Managed sensitive information using Azure Key Vault.
- Unit Testing: Implemented using
pytest
for backend services. - Integration Testing: Validates interactions between microservices and frontend.
- Load Testing: Conducted using Locust to ensure system performance under high traffic.
- Security Testing: Performed using tools like OWASP ZAP to identify vulnerabilities.
# Navigate to the backend directory
cd sentiment-analysis-service
# Activate virtual environment
source venv/bin/activate
# Run tests
pytest
- Azure Monitor: Tracks overall system health and performance.
- Application Insights: Provides detailed telemetry for backend services.
- Logging: Centralized logging using Azure Log Analytics.
- Alerts: Configured alerts for critical metrics and incidents.
- Maintenance: Regular updates and scaling based on monitored metrics.
We welcome contributions from the community! To contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature/YourFeature
- Commit your changes:
git commit -m "Add your feature"
- Push to the branch:
git push origin feature/YourFeature
- Open a Pull Request.
Please ensure your code follows the project's coding standards and includes appropriate tests.
This project is licensed under the Apache2.0.
β¨ Thank you for checking out the Azure Service Fabric with AI Integration project! β¨