How mcodr23/intent-based-network-controller works
This is a demo-first intent-based network controller: users discover mock devices, view topology, define network policy, deploy generated configurations, then inspect compliance and telemetry. The frontend presents the workflow; FastAPI routes dispatch requests to services, with persistent domain state in the database. Authentication/RBAC and audit logging span the API. The README documents the wider capability set; some subsystem links below rely on that documentation because their source was not excerpted.
Main entry points: session.py Controller state store · auth.py Authentication routes · discovery_service.py Device discovery · topology_service.py Topology service
Components 20
User experience
- Controller dashboard
frontend/js/app.js
API and access
- API application
backend/app/main.py - Authentication routes
backend/app/api/routes/auth.py - JWT and RBAC
backend/app/api/deps.py - Account service
backend/app/services/auth_service.py
Network control
- Inventory routes
backend/app/api/routes/inventory.py - Device discovery
backend/app/services/discovery_service.py - Mock device catalog
backend/app/services/mock_data.py - Topology service
backend/app/services/topology_service.py - Intent and policy
backend/app/services/policy_service.py - Deployment routes
backend/app/api/routes/deployment.py - Deployment orchestration
backend/app/services/deployment_service.py - Config generation
backend/app/services/config_service.py
Assurance and records
- Compliance routes
backend/app/api/routes/compliance.py - Drift and remediation
backend/app/services/compliance_service.py - Telemetry collection
backend/app/services/telemetry_service.py - Background monitor
backend/app/services/monitor_service.py - Audit logging
backend/app/services/audit_service.py - Controller state store
backend/app/db/session.py
Other components
- Network operator
Connections 22
- Network operator → Controller dashboard: uses
README.md - Controller dashboard → API application: submits requests
- API application → Authentication routes: registers routes
backend/app/main.py - Authentication routes → Account service: authenticates users
backend/app/api/routes/auth.py - Authentication routes → JWT and RBAC: creates tokens
backend/app/api/routes/auth.py - JWT and RBAC → Controller state store: loads users
backend/app/api/deps.py - Inventory routes → Device discovery: starts discovery
backend/app/api/routes/inventory.py - Device discovery → Mock device catalog: matches devices
backend/app/services/discovery_service.py - Inventory routes → Topology service: rebuilds topology
backend/app/api/routes/inventory.py - Device discovery → Controller state store: upserts inventory
backend/app/services/discovery_service.py - Topology service → Mock device catalog: reads neighbors
backend/app/services/topology_service.py - Topology service → Controller state store: stores topology
backend/app/services/topology_service.py - Deployment routes → Deployment orchestration: starts deployment
backend/app/api/routes/deployment.py - Deployment orchestration → Config generation: renders configs
backend/app/services/deployment_service.py - Deployment orchestration → Controller state store: stores deployments
README.md - Compliance routes → Drift and remediation: checks or remediates
backend/app/api/routes/compliance.py - Drift and remediation → Controller state store: records drift
backend/app/services/compliance_service.py - Background monitor → Telemetry collection: collects metrics
backend/app/services/monitor_service.py - Background monitor → Drift and remediation: checks drift
backend/app/services/monitor_service.py - Telemetry collection → Controller state store: stores metrics
README.md - Authentication routes → Audit logging: records actions
backend/app/api/routes/auth.py - Audit logging → Controller state store: stores audit logs
backend/app/services/audit_service.py