I am developing a "platform", I have an MVC site that will hold all the main data, as well as our generic API, uses Microsoft authentication to create an account, then our employee MVC will add the data to the database that will allow the user to start consuming our API. I have a custom API for one of our customers, using a different MVC (just handles the API). I will have other custom APIs as well. I also am working on an employee MVC that uses active directory as its authentication. I am able to add this all to IIS using ports, but I am wondering if I am going about this all wrong. My ultimate goal was to have multiple projects, so if I need to make changes to any one project, it would not affect another project. Now I am thinking of trying to ditch the port method and instead set up the MVCs to have postfixes.
example.com(Main MVC with Microsoft Authentication)
example.com/api/{key}/{token} (Main MVC using Attribute Routing)
example.com/employee (MVC with AD Login)
example.com/custom/api/{additionStaticDefiner}/{key}/{token}
This additional definer would be something like the company name put in the initial route template:
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "custom/api/BobsBurger/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
The main two questions, am I splitting these up to much, (they are all in the same solution, and I have shared library applications to not duplicate coding), and is it possible to do this without the dynamic code areas running into each other? I tried once and had some issues and am not sure where to start, I will figure it out, but if someone has experience in this and suggestions I am all ears.