G13
The objective of this project is to build a representative, robust MLOps application utilizing a Python backend and an Angular GUI. The platform provides full-lifecycle model management, including capabilities to register, version, approve, deploy, monitor, and seamlessly roll back machine-learning models. It features strong guardrails ensuring that unapproved or archived models cannot be deployed to sensitive environments.
The system is divided into two primary tiers:
- Backend: A FastAPI application that handles business logic, state transitions (like approving or archiving versions), simulated asynchronous deployments, and metric delivery. It integrates with a PostgreSQL database via SQLAlchemy.
- Frontend: A standalone Angular 18 Single-Page Application (SPA) leveraging Angular Material for a responsive, modern UI. State and API integration are managed cleanly via RxJS and Angular's HTTP Client.
The entire application runs in isolated, orchestrated Docker containers for identical development and production behaviors.
- Backend: Python 3.11+, FastAPI, SQLAlchemy, PostgreSQL, Pytest
- Frontend: Angular 18, TypeScript, Angular Material, RxJS, Vitest, Playwright
- Infrastructure: Docker, Docker Compose
- Clone the repository.
- Set up the environment variables by copying the example file:
cp .env.example .env
- Run the application using Docker Compose (this provisions both the frontend, backend, and database containers):
docker compose up --build
- Access the Angular UI at
http://localhost:4200 - Access the backend API at
http://localhost:8000
A comprehensive test suite validates end-to-end functionality, from backend business logic to component rendering and automated browser interaction.
If you don't want to install Node.js or Python locally, you can run the tests inside isolated, ephemeral Docker containers:
- Backend (Unit & Integration):
docker compose run --rm backend-test
- Frontend (Component Tests):
docker run --rm -v $(pwd)/frontend:/app -w /app mcr.microsoft.com/playwright:v1.49.0-noble bash -c "npm install --legacy-peer-deps && npm run test -- --watch=false"
- Frontend (Playwright E2E):
(Note: Ensure the platform is running via
docker compose up -dfirst so Playwright can reachhttp://localhost:4200)(On macOS,docker run --rm --network host -v $(pwd)/frontend:/app -w /app mcr.microsoft.com/playwright:v1.49.0-noble bash -c "npm install --legacy-peer-deps && npx playwright test"
--network hostdoesn't expose localhost. Instead, use:docker run --rm -e PLAYWRIGHT_BASE_URL=http://host.docker.internal:4200 -v $(pwd)/frontend:/app -w /app mcr.microsoft.com/playwright:v1.49.0-noble bash -c "npm install --legacy-peer-deps && npx playwright test")
If you have the dependencies installed on your host machine:
- Backend (Unit & Integration):
cd backend && pytest
- Frontend (Component Tests):
cd frontend && npm run test
- Frontend (Playwright E2E):
cd frontend && npx playwright test
The interactive Swagger/OpenAPI documentation is available at: http://localhost:8000/docs
To test the core acceptance scenarios, follow this flow:
- Explore Inventory: Visit
http://localhost:4200/modelsto see registered models. - Register Version: Click into a model, and click New Version. Fill out the artifact URI and set stage to DRAFT.
- Approve: Once created, click the Approve button on the new version row.
- Deploy: Click the Deploy button. Wait ~10 seconds while the simulated deployment runs. You can watch the status transition to
SUCCEEDEDon the Deployments tab. - Rollback: To rollback a successful deployment, go to the Deployments tab and click the Rollback button, which seamlessly initiates a safe regression to the prior deployment.
- The deployment flow is simulated via background tasks. It does not actively spin up Kubernetes pods or provision cloud infrastructure.
- The application does not currently implement authentication and granular Role-Based Access Control (RBAC).
- Delete operations for models and model versions are not currently supported.
- During a deployment rollback, the user cannot select a specific version to roll back to (it automatically defaults to the previous stable state).
- Features: Add support for model deletion and enable users to choose specific target versions when performing rollbacks.
- Security: Integrating Auth0 or Firebase Auth for secure login and permission management.
- Advanced Monitoring: Real-time WebSocket subscriptions to stream model metrics to the frontend dynamically.
- Production CI/CD: Adding GitHub Actions workflows for continuous automated testing and deployment.













