Extended backend via theme? (SOLVED)

After having used Ghost for a couple of months, I am overall pleased, and glad I made the switch. However, the back end is in need of some serious functionality upgrades.

My installation is hosted by someone else, and does not provide FTP access. So, I’m limited by what Ghost developers decide to show in the back end.

Here’s my question: Would it be possible for a theme developer, or an enterprising DYI coder, to build a page that would extend the functionality of the back end? Such things as being able to view the complete activity log, being able to filter members in more ways, being able to see more data about members, being able to tag members, and more stuff I could add.

Just wondering if this is possible, or if it simple an idle wish. Thanks!

2 Likes

The Ghost Admin API Documentation is a great place to start - while a lot of the members related API is not documented, the Admin Client is a consumer of the Admin API, meaning whatever you can do in the Admin Client can be done in another app. It’s not going to be super easy to integrate into the Admin Client, though.

1 Like

So I took a look at the docs for the Admin API, and it only says that there is a /users/ endpoint which is experimental. Then it says that more functionality for the /users/ endpoint is available depending on which authentication method you use … but then doesn’t document anything about the /users/ endpoint at all, as far as I could tell.

I don’t mind trying something if I have decent documentation and a few examples. Didn’t see either of those in the docs.

The users resource is different from users authentication endpoint :slight_smile:

The specific part relating to session authentication (which I think is what you’re probably looking for?) is here:

Thanks, but authentication is not my problem. I would use user authentication, which (supposedly) provides more parameters.

I have read the entire Admin API article, and as I said, it goes into some detail as to both GET and POST for posts, pages, and so on. But for users/members, it has no documentation.

What I want is to be able to get a list of all members with their status, open rate, and other info, so I can track it over time. I also want to pull the activity log. And a bunch of other info as well.

But, I cannot find any documentation or examples as to pulling such information without direct access to the backend database (which I do not have).

Right, that’s what I was saying - the Members API isn’t documented, but (from the docs) “many endpoints can be discovered by inspecting the requests made by Ghost Admin”

All of the API requests that are made by Ghost Admin will be accessible using user authentication because that’s what Ghost Admin does behind the scenes

OK, I’m really not trying to be dense here. But if the code and logic of the dashboard are contained on the server, how do I inspect them? All I can see is the resulting HTML etc, which I can “inspect” on the client side, but as far as I know, is not going to reveal the code that produced it.

Yes, documentation can be a bit lacking sometimes. I’ve found myself digging into core and other areas, adding debugging code, etc. to understand how Ghost works under the covers. Repo is here

2 Likes

You’re asking great questions! Unless you’re looking for a custom admin build, the code that’s used to produce the HTML isn’t super helpful - instead, you’ll want to look at the API requests that are made. For example, if you’re interested in the activity feed, the Admin Client makes a request to /ghost/api/canary/admin/members/events/?limit=5

1 Like

There’s some really great tools we use in development like Postman for doing this sort of thing. Good ol’ curl works really well too. That way you can start making and getting requests from these endpoints in a nice way.

I spent quite a bit (QUITE a bit) of time looking through my local install of Ghost, trying to figure out the structure and looking at code. I think I finally found the JS files for the dashboard, but had a very hard time following the logic, especially since they have been minified (as far as I could tell).
So, I’m going to give up on this for now. If I had nothing else to do, figuring everything out and experimenting with my own admin setup would be a fun way to spend my time; but, as I have publishing work to do, I’ll have to let this go, and hope that either the Ghost team sees fit to incorporate some of these changes into core, OR that some enterprising developer will build a better admin as a standalone product. Thanks to all for your assistance!

If you’re looking for the admin client source code, it’s on GitHub: GitHub - TryGhost/Admin: Ghost's admin client

1 Like

Thanks for bringing up such a great topic. Similar thoughts, ideas come to my mind often. So I wanted to chime in a bit. My questions, comments below are from the point of an enterprising developer and they are also somewhat thinking out loud about what you said.

The question is, is there really enough demand for a product (a companion to admin console or an alternate admin console) like this? I’ve seen different requests for console features on many threads here (such as bulk action on posts, overall member stats, etc.) , but people usually let it go. If the problem is not that painful, then people do not feel the need is that urgent or important, so would not be worth the effort. Even you indicated you would let it go for now, that seems to imply that you can still run your publishing business without those features, they are more like nice to have level of requirements.

Especially knowing Ghost team is doing such a great job of delivering frequent updates, would one want to fork admin console and have trouble making sure to release in sync with Ghost core changes?

If there is such a high demand, what would the MVP be like? What is the must-have feature(s)?

Cheers!

Thanks for weighing in. I closed the topic primarily because I do not have time personally to chase it. That said, an add-in or standalone product that would do certain things would be worth paying for, at least for me.

Off the top of my head:

  • View the “recent activity” list, either all of it or a for a good bit back. Five items without an option to see more just doesn’t get it.
  • Export the recent activity list to CSV
  • View list of posts with metadata (tags, access, status, perhaps more) and be able to change the metadata without opening the post
  • View same list and be able to select multiple posts and do bulk edit of metadata
  • Export the post list to CSV
  • View list of members with metadata (emails sent to, emails opened, % opened, member type, # of logins, logins per month since signing up, initial date signed up, current email subscription status)
  • Export member list to CSV

That’s a start. I could probably think of more.

As for the business proposition – I don’t know. It seems to me that with the number of people moving to Ghost from other platforms, there would be a pretty good market for this.

And if I were part of the Ghost team, I would look at building something like this and offering it for a fee. No need to worry about staying in sync, since the same team would be working on both.

1 Like

Thank you very much for the detailed response. You did mention a few common items I’ve heard before and a few new very interesting ones. This list is very helpful to understand a lot about Ghost from publishers’ point of view.

I will review the list carefully and see if I can incorporate any of these into my current product feature set.

Thanks again!

Any word on making an extended admin for Ghost?

I’m currently working on getting deeper email analytics by connecting the dots from Ghost to Mailgun.

Could help me out by pointing which of the items in your list is most urgent, so I can get started with those and come up with an MVP?

Thanks!

  • View the “recent activity” list, either all of it or a for a good bit back. Five items without an option to see more just doesn’t get it.
  • View list of posts with metadata (tags, access, status, perhaps more) and be able to change the metadata without opening the post
  • View same list and be able to select multiple posts and do bulk edit of metadata

If we can do some things online, exporting isn’t quite as important.

Also note: I currently do not have FTP access to my Ghost site, as it is hosted by someone who does not provide such access. So, I would either need a standalone tool/site, or some way of adding the above to an existing theme.

Thanks for following up!

Hi,

  • For the first item, there is a ‘View all activity’ button on the member page. Do you have it on your Admin page? Does it satisfy your requirement?
  • You said you do not have FTP access to your site. So for me to understand your environment better:
    • Do you not have shell (SSH) access either? So you are not able to run any commands on the server?
    • Are you able to update any files and directories on the server (either yourself directly or someone doing for you)? This includes Ghost config file, ‘content’ directory, ‘current/core’ directory.
    • Do you have admin access (a staff user with Administrator role)?

Don’t have the “View all activity” button on the member page. Basically, the same limitation as the front – appears to be 5 items.

As for access – nope, none to the server. The provider (Gloat Hosting) keeps it that way, I assume to lower his support load. Since I’m not as familiar with the tech stack for Ghost as I was for Wordpress, that’s mostly okay with me. I am able (of course) to make changes within the theme or code injection.

So, that’s why some sort of app or web page that uses the Ghost API is attractive to me.

I may, at some point, move off Gloat to some other form of self-hosting. But for now, the combination of the price point with him taking care of security, upgrades, and so on, is still attractive to me.