split controllers.ts and create a service to manage eventSources