We need an admin-facing service to keep tenants within fair usage. Admins should be able to define subscription plans (e.g., Free, Pro, Enterprise) with per-minute API rate limits and resource quotas (like max active projects), and assign tenants to a plan. MySQL is the source of truth; Redis should hold a hot copy of plan settings so our API gateway can enforce limits with sub-millisecond counters (sliding window using atomic INCR/EXPIRE). Build this as an Express.js GraphQL API with:
- Mutation: createOrUpdatePlan(input: PlanInput!): Plan! where PlanInput = { name: String!, rateLimitRpm: Int, maxProjects: Int }
- Mutation: assignTenantToPlan(tenantId: ID!, planId: ID!): Tenant!
- Query: plans: [Plan!]!
Access must be OAuth2 and restricted to system administrators. Include cache warm-up/invalidation on plan changes and a fallback to MySQL if Redis has no entry. The gateway enforcement itself is out of scope; focus on the management API and configuration flow.