# My feedback: Make Cockpit better!

**URL:** <https://discourse.getcockpit.com/t/my-feedback-make-cockpit-better/897>\
**Category:** Feature Request\
**Created:** [June 26, 2019, 7:33pm UTC](https://discourse.getcockpit.com/t/my-feedback-make-cockpit-better/897 "2019-06-26T19:33:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![xJoeyv](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/xjoeyv/32/116_2.png) [@xJoeyv](https://discourse.getcockpit.com/u/xJoeyv)\
**Post date:** [June 26, 2019, 7:33pm UTC](https://discourse.getcockpit.com/t/my-feedback-make-cockpit-better/897/1 "2019-06-26T19:33:40Z")

</div>

Dear,

Let’s start off the cockpit is amazing and I love to use it now. There are a couple of things that I would like to see improved or changed/added.

- Better plugin system
- Simple filtering to get E.G single record from blogs etc
- Better local dev tools. Error Reporting.
- Community tool to directly query data from Cockpit on the Database instead of via API.

I think these are key features to improve or add in order to get more people to use Cockpit. With these features, I think medium-sized companies can be using this easily. I wonder what ur opinions are on this and if this would be possible…?

---

<div class="post-metadata">

**Author:** ![pauloamgomes](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/pauloamgomes/32/48_2.png) [@pauloamgomes](https://discourse.getcockpit.com/u/pauloamgomes)\
**Post date:** [June 26, 2019, 8:32pm UTC](https://discourse.getcockpit.com/t/my-feedback-make-cockpit-better/897/2 "2019-06-26T20:32:01Z")

</div>

There is space for improve, some stuff was already discussed in discourse other think we need more people investing some time and contributing as its already a big effort form @artur, my suggestions are:

- Addons, have some standardization and guidelines and an addons repository, the guidelines should define a file/folder structure (what to put on bootstrap.php, how to create Controller classes and view templates, how to add assets from the addon, how to act on Cockpit events) and also best practices
- Simple filtering, you can already get a single record, can you explain further what is missing?
- Local dev tools - I added long time ago Kint addon but was a quick project and therefore may require improvements, think would be better to have some debug options in the core (not only the ones in the headers)
- Community tools, if you are using mongodb you can use existing free tools to deal with mongodb, they are quite simple to use and powerfull, e.g. Robo 3T and dbKoda. For SQLite you can use DB Browser for SQLite. Other option is to setup a quick php app (e.g. in laravel) that can use Cockpit as a library, so you can have direct access to Cockpit query functions.

And I couldn’t agree more with you on your latest sentence about Cockpit usage on medium sized companies… I truly believe that’s an amazing option for medium and not so medium companies, currently I’m working on a huge implementation based on Cockpit and I’m quite happy with the results.

Hope that helps.

---

<div class="post-metadata">

**Author:** ![xJoeyv](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/xjoeyv/32/116_2.png) [@xJoeyv](https://discourse.getcockpit.com/u/xJoeyv)\
**Post date:** [June 26, 2019, 11:01pm UTC](https://discourse.getcockpit.com/t/my-feedback-make-cockpit-better/897/3 "2019-06-26T23:01:36Z")

</div>

Hi thanks for your response! I would like to contribute in the near future!

**1.** Maybe make something like laravel (while I think that exists and that is the `cp` file) where you can do like `php cp addon:make NAME` and it will make an empty addon. With `-something` it will add a scaffold with controllers etc.

**2.** While it is not very straight forward maybe a docs on it will make it more clear. I gotta see it myself and make myself examples before I really get it.

**3.** Yea that would be amazing, especially if you want people to extend Cockpit with great addons. Something like Whoops and a good implementation or addon for debug bar is nice. _(I did not check Kint, ill do after posting this so I do now know what it does.)_

**4.** I might have explained it wrong. Community tools as `cockpit-client` that can interact with the API (I’m making this for Laravel right now, it’s not quality code but I can improve than release and let the community help). Or a client for direct DB Queries to improve speed if you wanna use it for bigger companies or projects with a lot of data.

If I’m right in mongo collections had some time or random prefixes. And with SQLite you split it into multiple files what I can understand and it is the best way for this but doesn’t allow fast querying. Maybe thinking of MySQL is nice also for relational data.

**Furthermore** I again would love to contribute to this community and help out in time I can. I’m using this for my Personal project for sure. And maybe for a chat server project and not for the main due, not MySQL Support as of now. Everything I make that might be worth sharing… Will be shared!

---

<div class="post-metadata">

**Author:** ![raffaelj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/raffaelj/32/331_2.png) [@raffaelj](https://discourse.getcockpit.com/u/raffaelj)\
**Post date:** [June 26, 2019, 11:54pm UTC](https://discourse.getcockpit.com/t/my-feedback-make-cockpit-better/897/4 "2019-06-26T23:54:43Z")

</div>

@xJoeyv Thanks for the flowers and for the feedback.

@pauloamgomes answered the most things already, so I don’t have to repeat it.

> [@xJoeyv](#):
>
> Better plugin system

I wrote the [BootManager](https://github.com/raffaelj/cockpit_BootManager) addon, that could be a base for an upcoming addon manager. There is still the problem with the quality control and how to keep it up to date…

> [@xJoeyv](#):
>
> Better local dev tools. Error Reporting.

I agree. I fiddled a bit in the last hours and [wrote](https://github.com/raffaelj/cockpit-scripts/blob/master/use-cockpit-as-library/README.md) a simple way to wrap cockpit, so you could use your own error handler with try/catch around it.

You have some good points, but I need some sleep now. I’ll answer later.

---

<div class="post-metadata">

**Author:** ![artur](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/artur/32/4_2.png) [@artur](https://discourse.getcockpit.com/u/artur)\
**Post date:** [June 27, 2019, 12:18am UTC](https://discourse.getcockpit.com/t/my-feedback-make-cockpit-better/897/5 "2019-06-27T00:18:20Z")

</div>

> [@raffaelj](#):
>
> I fiddled a bit in the last hours and [wrote](https://github.com/raffaelj/cockpit-scripts/blob/master/use-cockpit-as-library/README.md) a simple way to wrap cockpit, so you could use your own error handler with try/catch around it.

you can bind to the event `error` to implement custom error logging/handling

> <https://github.com/agentejo/cockpit/blob/next/bootstrap.php#L247>

---

<div class="post-metadata">

**Author:** ![raffaelj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/raffaelj/32/331_2.png) [@raffaelj](https://discourse.getcockpit.com/u/raffaelj)\
**Post date:** [June 27, 2019, 12:48pm UTC](https://discourse.getcockpit.com/t/my-feedback-make-cockpit-better/897/6 "2019-06-27T12:48:08Z")

</div>

> [@artur](#):
>
> you can bind to the event `error` to implement custom error logging/handling

Yes, I saw this one, but it only catches Exceptions. No warnings or fatal errors. Some errors can break cockpit if `error_reporting` is enabled, because warnings are printed on top of all requests.

A global `set_error_handler` could be useful when using the admin interface to find stupid mistakes like commenting out all options of `languages` in `config.yaml`. It leads to an empty string instead of an expected array and a warning is printed: `Warning: Invalid argument supplied for foreach() in E:\github\cockpit\modules\Cockpit\Helper\Admin.php on line 42`.

---

<div class="post-metadata">

**Author:** ![xJoeyv](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/xjoeyv/32/116_2.png) [@xJoeyv](https://discourse.getcockpit.com/u/xJoeyv)\
**Post date:** [June 27, 2019, 7:48pm UTC](https://discourse.getcockpit.com/t/my-feedback-make-cockpit-better/897/7 "2019-06-27T19:48:42Z")

</div>

Thanks for the great answers and the support and answers to my questions. I still think adding MySQL would be amazing where a `collection` is an Table and a Singleton 1 row using Json within the table `singletons`.

Can I make a adapter like this myself or help on it since I would like to have this. This will help me and a lot of others to run there projects on cockpit.
