{"action":"created","issue":{"url":"https://api.github.com/repos/AsgardCms/Platform/issues/83","labels_url":"https://api.github.com/repos/AsgardCms/Platform/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/AsgardCms/Platform/issues/83/comments","events_url":"https://api.github.com/repos/AsgardCms/Platform/issues/83/events","html_url":"https://github.com/AsgardCms/Platform/issues/83","id":95996344,"number":83,"title":"Asgard & Existing Applications","user":{"login":"mvdstam","id":7629384,"avatar_url":"https://avatars.githubusercontent.com/u/7629384?v=3","gravatar_id":"","url":"https://api.github.com/users/mvdstam","html_url":"https://github.com/mvdstam","followers_url":"https://api.github.com/users/mvdstam/followers","following_url":"https://api.github.com/users/mvdstam/following{/other_user}","gists_url":"https://api.github.com/users/mvdstam/gists{/gist_id}","starred_url":"https://api.github.com/users/mvdstam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvdstam/subscriptions","organizations_url":"https://api.github.com/users/mvdstam/orgs","repos_url":"https://api.github.com/users/mvdstam/repos","events_url":"https://api.github.com/users/mvdstam/events{/privacy}","received_events_url":"https://api.github.com/users/mvdstam/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-20T06:29:18Z","updated_at":"2015-08-07T12:12:07Z","closed_at":"2015-08-07T12:12:07Z","body":"Hi,\r\n\r\nFor me, and I hope a lot of people as well, AsgardCMS would be perfect as a drop-in solution to manage both existing (and new) applications through a backend. I want to be able to simply pull in Asgard through composer at any time during development. Right now, the only way to use AsgardCMS, is to start from scratch with a new `composer create-project asgardcms/platform` command.\r\n\r\nI've come up with a solution that allows me to install AsgardCMS into an existing application, through the use of a [Symfony Console command](https://gist.github.com/mvdstam/52217f463a2b90c0d41d). The aforementioned example is a proof of concept and should be regarded as such. I find there were quite a bit of issues during installation of AsgardCMS in an existing application. At the moment, AsgardCMS seems quite intrusive and not modular at all. Let's fix that!\r\n\r\nThrough this issue, I hope to identify and (help to) solve of these problems. Here's what I encountered:\r\n\r\n- The `pingpong/modules` package had to be installed seperately since it's still a seperate, forked package that isn't on packagist. If you try to install the specific `dev-feature/5.1` version immediately with the other dependencies, you'll get an error. Probably composer behaviour, but can easily be fixed by maintaining the forked version on packagist.\r\n- All modules (8 modules + 2 themes) are actually necessary for the CMS to even work. This makes Asgard kind of heavy, especially if one simply wants a way to simply create a backend system for their existing webapplication.\r\n- The `stylist` config file will result in an error when published out of the box, since AsgardCMS expects the `stylist::themes.paths` configuration setting to have a value.\r\n-  For now, I've done a really, really, *really* stupid and dirty hack concerning the `app/Kernel.php` file (doesn't work well; again: this is a proof of concept) since Asgard __requires__ some Middleware to even work. This means that creating a backend for an API won't work unless there is some way to conditionally enable additional AsgardCMS-related middleware. And that means that there should be some (waterproof) way to determine whether or not a certain HTTP request was meant for the backend and not for the app. For example, my API is completely stateless and lightweight, but it would be very nice if I could manage some of the data or settings in a AsgardCMS-powered backend.\r\n- The AdminLTE.css file (as well as some other assets) of the `AdminLTE` theme is pretty much hard-coded and pushed into git for the `asgardcms/platform` package. I'd highly recommend to manage the assets of modules and themes in a way that this isn't necessary. My package, [pixelindustries/modular-assets](https://github.com/Pixelindustries/modular-assets) can easily be expanded to run a simple `gulp` command within modules and themes, so all that remains is a simple `stylist:publish` to publish the compiled assets. My package already supports running `npm` and `bower` install commands; so all you'd need is your own raw less/scss files in addition to a `bower.json` file in git. Let's try to make the AsgardCMS modules as lightweight and portable as possible.\r\n- Sentinel gave me some problems as well, since the out-of-the-box configuration file that ships with Sentinel doesn't use the `Modules\\User\\Entities\\Sentinel\\User` class for the `User` model right away. AsgardCMS, however, fully expects this. ~~AsgardCMS should use any existing `User` model and simply decorate it.~~ AsgardCMS should use it's own User model. Also see #86 for my view on the matter.\r\n- AsgardCMS tries to fetch the (root) `composer.json` file to determine the version of the application. That is all fine and well, but AsgardCMS also uses Filesystem to do that, which means that the `filesystems` config file needs to point to the `base_path()` directory for the root, which is non-standard (and weird, since you usually store stuff in the `storage_path()` folder). In any case, why not simply fetch the `composer.json` file using `base_path() . '/composer.json`? Developers should never, ever, ever be forced to change such an important configuration setting for a third-party solution like Asgard. Instead, Asgard should be flexible and unobtrusive in this context.\r\n\r\nIn any case, let's try and make Asgard even more awesome! :smile: "},"comment":{"url":"https://api.github.com/repos/AsgardCms/Platform/issues/comments/128685020","html_url":"https://github.com/AsgardCms/Platform/issues/83#issuecomment-128685020","issue_url":"https://api.github.com/repos/AsgardCms/Platform/issues/83","id":128685020,"user":{"login":"nWidart","id":882397,"avatar_url":"https://avatars.githubusercontent.com/u/882397?v=3","gravatar_id":"","url":"https://api.github.com/users/nWidart","html_url":"https://github.com/nWidart","followers_url":"https://api.github.com/users/nWidart/followers","following_url":"https://api.github.com/users/nWidart/following{/other_user}","gists_url":"https://api.github.com/users/nWidart/gists{/gist_id}","starred_url":"https://api.github.com/users/nWidart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nWidart/subscriptions","organizations_url":"https://api.github.com/users/nWidart/orgs","repos_url":"https://api.github.com/users/nWidart/repos","events_url":"https://api.github.com/users/nWidart/events{/privacy}","received_events_url":"https://api.github.com/users/nWidart/received_events","type":"User","site_admin":false},"created_at":"2015-08-07T12:12:07Z","updated_at":"2015-08-07T12:12:07Z","body":"No more update on this, I'll close this issue for the time being.\r\n\r\nI'm always available on slack/here to discuss this further."}}