• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A Simple Forum Software built on CI4

#1
I needed to work on a semi-real project with CI4 to find any pain points, and explore things a little from the developers perspective. With my framework developer hat on, it's too easy to get bogged down in the little details, and forget about bigger parts and workflow, so this should help me ensure it all fits together as expected, and to find any rough edges that need smoothing out.

So, I've decided to work on a simple forum software. I don't know that it will get to a full production-quality system any time soon, but I thought anyone interested in CI4 might like a sample application to look at. I'm not trying to say that the way I'm coding this app is the only way, because its most definitely not. I hope it can provide some inspiration, though, as to different ways you could use it.

The forum concept I'm running with now is inspired by the lighter forum systems out there like NodeBB and the system Statamic built for themselves. Posts will be parsed with Markdown. I'll be porting over my authentication system from Sprint and streamlining it for CI4 usage. I might even use it as a test for some social authentication to boot.

In the future, it might get refactored into something more generic but for now it's being coded as if it was for a single website/install. That way I don't have to mess with templating, plugins, etc.

I'm just getting started, but if you want to follow along, the repo is over here.
Practical CodeIgniter 3  • CodeIgniter 4 Foundations - Coming Soon • Vulcan - CLI Tools for CI4
Reply

#2
Thanks, will take a look at it.

Maybe create it as an addon Module, would be a good test for creating Modules in CI4.
What did you Try? What did you Get? What did you Expect?

Joined the CodeIgniter Community in 2009.          ( Skype: insitfx )
Reply

#3
(06-27-2017, 11:22 PM)kilishan Wrote: I needed to work on a semi-real project with CI4 to find any pain points, and explore things a little from the developers perspective. With my framework developer hat on, it's too easy to get bogged down in the little details, and forget about bigger parts and workflow, so this should help me ensure it all fits together as expected, and to find any rough edges that need smoothing out.

So, I've decided to work on a simple forum software. I don't know that it will get to a full production-quality system any time soon, but I thought anyone interested in CI4 might like a sample application to look at. I'm not trying to say that the way I'm coding this app is the only way, because its most definitely not. I hope it can provide some inspiration, though, as to different ways you could use it.

The forum concept I'm running with now is inspired by the lighter forum systems out there like NodeBB and the system Statamic built for themselves. Posts will be parsed with Markdown. I'll be porting over my authentication system from Sprint and streamlining it for CI4 usage. I might even use it as a test for some social authentication to boot.

In the future, it might get refactored into something more generic but for now it's being coded as if it was for a single website/install. That way I don't have to mess with templating, plugins, etc.

I'm just getting started, but if you want to follow along, the repo is over here.

Do you need help? Smile
Reply

#4
(06-28-2017, 12:21 PM)Paradinight Wrote: Do you need help? Smile

Maybe in a little bit. I've been working on CI4 for almost 2 years now, and the whole time itching to build something, or work on a couple of the personal projects I've got kicking around my head. So, for now, it's a selfish project as much as anything. LOL.

Plus, I really want a chance to push through the main portions of it, seeing what needs to get fixed/changed in CI4 to work better, etc.

Once I get the main bones in place, I'll be happy to open it up for others to join in on. That would be great. And would also mean I'd probably need to figure out all of the things it's supposed to do instead of making it up as I go.

In the meantime - I'll take help on CI4 if you want to help out. Smile
Practical CodeIgniter 3  • CodeIgniter 4 Foundations - Coming Soon • Vulcan - CLI Tools for CI4
Reply

#5
(06-28-2017, 12:42 PM)kilishan Wrote: ...I'd probably need to figure out all of the things it's supposed to do instead of making it up as I go.

lol. I love building play things that have semi serious goals but are really just personal fun projects. It is the making it up as you go along that makes it so much fun. I have one site I must have rebuilt ten times now, when I thought "oh, I know how I should have done that" and joyfully started recoding it all again from scratch!

I must admit I have probably gone full circle a couple of times. Oh the joy of working without a plan.

NodeBB is beautifully clean. The difficulty of doing a forum like this is having to be all the people, the thread starter, the first time viewer, the comment leaver, the spammer, the author, the admin etc etc. Far too complicated for a fun project for me, but then again, you are a CI author, so probably not too complicated for you.

Look forward to trying it out sometime (just to learn how perhaps things should be coded).

Paul.
Reply

#6
(06-28-2017, 12:42 PM)kilishan Wrote:
(06-28-2017, 12:21 PM)Paradinight Wrote: Do you need help? Smile

Maybe in a little bit. I've been working on CI4 for almost 2 years now, and the whole time itching to build something, or work on a couple of the personal projects I've got kicking around my head. So, for now, it's a selfish project as much as anything. LOL.

Plus, I really want a chance to push through the main portions of it, seeing what needs to get fixed/changed in CI4 to work better, etc.

Once I get the main bones in place, I'll be happy to open it up for others to join in on. That would be great. And would also mean I'd probably need to figure out all of the things it's supposed to do instead of making it up as I go.

In the meantime - I'll take help on CI4 if you want to help out. Smile

I will testing ci4 and create an example project Smile
Reply

#7
(06-28-2017, 12:53 PM)PaulD Wrote:
(06-28-2017, 12:42 PM)kilishan Wrote: ...I'd probably need to figure out all of the things it's supposed to do instead of making it up as I go.

lol. I love building play things that have semi serious goals but are really just personal fun projects. It is the making it up as you go along that makes it so much fun. I have one site I must have rebuilt ten times now, when I thought "oh, I know how I should have done that" and joyfully started recoding it all again from scratch!

lol Exactly! I've had some ideas for a forum software kicking around in my head for a long time, but not sure if I'll include all of them or not. Either way, always fun to noodle and explore.

(06-30-2017, 11:26 AM)Paradinight Wrote: I will testing ci4 and create an example project Smile

Excellent. Look forward to seeing it.
Practical CodeIgniter 3  • CodeIgniter 4 Foundations - Coming Soon • Vulcan - CLI Tools for CI4
Reply

#8
Just a quick update on this.

- I've got basic categories/forums/threads working mostly.
- The authentication system from Sprint has been ported over. It's been updated to use a User Entity class internally. The Auth system itself is being treated as a module to test out working in that style. I'm pretty sure the authorization stuff hasn't been touched too much yet and will need some more tweaking to get it working, but you can register, login, and attempt to reset your password. Well, you will be able to reset pass once I get the mail system integrated that's currently in a PR and probably broken.

Notes on the Auth system:

I removed the throttling stuff that was happening in the because it was an added complication, and I was curious to see if CI4's throttling could be used to cover most of the same features. Still haven't quite explored that area yet.

Current Project:

Am currently working on the Posts themselves, and decided to try something that should prove interesting. I was always fascinated by the way Statamic's Lodge had different post types (questions, discussions, and show-n-tell posts). IIRC, they used to be more dramatically different than they are currently. But that ability to have post types that could customize the way that post is input, is displayed, and could even provide additional functionality to the thread itself (like accepting an answer, etc) is and idea that has stuck with me over the last couple of years as I've wanted to build a forum system anyway. So, I'm giving it a shot. Should prove an interesting challenge.

Intersting Notes

Probably the most "abnormal" thing I've done with the app so far is the layout of the files. I wanted to keep related files together, but not bundle them in a module, instead of having the Entity in one directory, the Model in another, and any related classes elsewhere. To solve that I simply create a "Domains" directory, where I've started grouping files together there, like:

Code:
application/
    Domains/
        Forums/
            Forum.php
            ForumModel.php
            Thread.php
            ThreadModel.php
        Posts/
            Types/
            Post.php
            PostModel.php

It's really nothing special, and isn't really Domain-driven design or anything, but it is nice to have the flexibility to just put things wherever makes logical sense for each project or team.

I'll try to keep this thread updated as I go along whenever there's something semi-interesting to say. I hope that it's helpful to see different ways that CI4 features can be used, if nothing else.
Practical CodeIgniter 3  • CodeIgniter 4 Foundations - Coming Soon • Vulcan - CLI Tools for CI4
Reply

#9
What about adapting some features of Flarum. http://flarum.org/ . I love the UI and the features.
Codeigniter Fan. --
Reply

#10
(07-15-2017, 01:25 AM)ranjithsiji Wrote: What about adapting some features of Flarum. http://flarum.org/ . I love the UI and the features.

Simple Forum should only add the basic features. It is a example project not a real big project.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.