Social site powered by Kirby?

Hey guys, I’m planning to build a kind of Facebook for a very specific audience. It wouldn’t be as feature-rich as FB, but I need to know if it’s possible to have someone create an account and post statuses on their profile. The status would only contain text and images, without comments and stuff like that but basically I need to create some admin features on the front-end rather than having users do stuff from the kirby dashboard.

Is it currently possible to do something like this at the moment? Have you seen any examples using Kirby?

Thanks!

In general, yes, you could build a social site with Kirby. If this is advisable depends on the features you need and how much you are willing/able to implement yourself, and maybe also on the number of users you expect to have.

Creating accounts and posting from the frontend is possible.

What do you mean by “admin features”?

I haven’t seen anything like that with Kirby but it’s totally possible. But Kirby may not be the best tool for this job. You have to consider how many users and interactions are expected.

Will you have content that requires Kirby and the panel? If so, Kirby can be easily integrated with another backend/API that would then handle the social interactions. Otherwise picking a PHP framework might be a better option in case.

I have described exactly what the site needs in my post.

People register and create a profile. On their profile page, they’ll have some info about them and a place where you can post text and images. That would be it. Users won’t be able to interact with eachother. So no comments, likes or stuff like that.

What I basically needed to know if it’s possible to let users add content to the site without the need of the panel.

The reason why I’m willing to do this in Kirby is because I have some prev experience with it and I’m not really a developer. I’ve built my portfolio using Kirby and it seemed really nice and easy. Gonna build an MVP with Kirby and try to attract investors after which I’m gonna hire “real” devs to do the job right haha.

Yes, that’s possible. You’ll need custom routes to update a page:

c::set('routes', [
    [
        'pattern' => 'profile/(:any)',
        'method'  => 'POST',
        'action'  => function($user) {
            $profile = page("profile/${user}");
            $name    = get('name');

            // validation

            if ($profile) {
                $profile->update(['title' => $name]);
                // return success…
            }

            // return error…
        }
    ],
]);

You can create/update/delete any page from a route. Check out the docs for other available page methods.

1 Like

Awesome, thanks a lot for the guidance! Gonna look into it and test something out :slight_smile: