This solution is built using dotnet core 2 and running entirely on Azure. It's designed as a full fledged CDN (Content Delivery Network), with the aim to serve our applications with static data and media files.
The main url is https://media.myvisibilitytool.com/ + (location and the type of content to be served).
Please see below a list of the default directory structure examples:
The main Css directory, holds all css used throughout our applications. This files, when included on the bundleconfig.js file, can be bundled to provide a single css file - built from the included files, specified on the bundle config file -, or serve a minified version of the same.
ie.: https://media.myvisibilitytool.com/css/help.min.css
ie.: https://media.myvisibilitytool.com/css/mvtDivMessage.css
The Images directory holds all images, animations, images and icons used throughout applications. Beside the main directory, "/images/mvt" images are and should also be served from a specific order. This means, for an 20x20 approved icon, the trailling path would be "/images/mvt/icons/20x20/" + (image file name and extension). Or for a Metro Logo, "/images/mvt/logos/metro/" + (image file name and extension).
ie.: https://media.myvisibilitytool.com/images/mvt/logos/metro/MetroLogoWhite.png
ie.: https://media.myvisibilitytool.com/images/mvt/animations/ajax-loader.gif
ie.: https://media.myvisibilitytool.com/images/mvt/icons/20x20/Approved.png
The main Js directory holds all js files created by us (Metro) and used throughout our applications. Similar as per the Css, we use a file called bundleconfig.js, to bundle and minify all our Js files and serve a full bundle or a minified version of the file.
The main Videos directory holds all videos used on our MVT solution. This are mainly used on the Help Section of MVT.
https://media.myvisibilitytool.com/videos/POConfirmation.mp4
https://media.myvisibilitytool.com/videos/RecordingContainerandSealNumbers.mp4
The main Documents directory holds all documents used on our MVT and Metro solutions (docs, docx, txt, pdf, etc.)
https://media.myvisibilitytool.com/docs/EBSA_E-Bookings_Container_details_batch_update_v1.0.pdf
https://media.myvisibilitytool.com/docs/EBSA_Origin_Partners_-_Document_Submission_v1.1.pdf
The main Libraries directory holds all external/third party libraries used throughout our applications. We are using `LibMan` to achieve this. `Library Manager (LibMan)` is a lightweight, client-side library acquisition tool. LibMan downloads popular libraries and frameworks from the file system or from a content delivery network (CDN). The supported CDNs include CDNJS and unpkg. The selected library files are fetched and placed in the appropriate location within the ASP.NET Core project.
With LibMan only the library files you need are downloaded, additional tooling, such as Node.js, npm, and WebPack, isn't necessary to acquire a subset of files in a library, files can be placed in a specific location without resorting to build tasks or manual file copying.
To achieve this, we simply edit the `libman.json` file at the root of the project.
If you need any help, our Implementation Guide is available through our MiKi.