How to structure complex interfaces for multiple stakeholder?
This question is a bit hard to explain, and only relevant for larger applications, but I'll give it a shot.
Explaination:
I'm building an app, where Clients [C] can communicate with Videographers [V] and request those videographers to create videos for them (i.e. create a video about xyz).
I also have an admin dashboard, where Admins [A], should be able to access this feedback process.
Example:
A Client creates a Job, a videographer uploads a Submission to this job, the client is then able to add multiple Comments to this job.
The problem lies in the fact, that every stakeholder requires slightly different data, for example, admins may need additional fields,
like which videographers where suggested / invited for an individual shooting (which the Vs shouldn't see).
Right now I create various interfaces (return objects), for each of the stakeholders, which may extend each other, i.e.
ShootingRo (base object)
ClientShootingRo -> ShootingRo
VGShootingRo -> ShootingRo
AdminShootingRo -> ShootingRo
Since I'm dealing with quite nested structures, I may define further interfaces, like: 'ClientCommentRo', 'AdminCommentRo'... etc.
In order to keep the project organized, I'm thinking about creating a deliberate dependency structure, like this:
- have the following folders: admin -> videographer -> client -> shared
and only allow imports in the opposite direction of the arrow.
What do you think about this structure, does it make sense? Or am I overthinking the issue?
0 Replies