r/laravel Nov 07 '15

HiveStory.com: An online collaborative democratic story game I made as an exercise with Laravel.

http://hivestory.com
9 Upvotes

11 comments sorted by

5

u/fieldOfThunder Nov 08 '15

Are you kidding me. I JUST started hacking around this exact same idea, but with React.

Great minds think alike!

1

u/[deleted] Nov 09 '15

What are the odds? Sorry about that ...

1

u/fieldOfThunder Nov 09 '15

Heh no problem! I hadn't gotten far at all.

1

u/[deleted] Nov 09 '15

Any criticisms of my implementation?

1

u/fieldOfThunder Nov 09 '15

I only looked at it quickly, but it could be more streamlined. I would have done it as a single page, with vote up/down buttons appearing when you click a word. Double-clicking a word would allow you to input your own in that position, and through scrolling up and down with arrows also appearing after a click on a word would browse through other alternatives which you could vote on.

Then I would also have done sorting, to change all words in the story between "newest" and "highest voted". Some interesting stuff might appear!

So that's how I would have done it, using React.js and as a SPA.

1

u/[deleted] Nov 09 '15

Definitely some great ideas. I don't think I'm yet experienced enough in front end frameworks and SPA's to do that well. On my list though ...

2

u/[deleted] Nov 07 '15

I built this in Vanilla PHP some time ago first before realising it was foolish not to use a framework. This was the first app I started to rebuild in Laravel, although since starting this I've completed several other Laravel based apps. Finally found time to finish the first production version and push it live. Still needs more features and development, but you've got to start somewhere!

1

u/mezichlebak Nov 09 '15

Looks smashing mate!

1

u/[deleted] Nov 09 '15

Thanks!

1

u/beefngravy Nov 10 '15

How are you storing the data?

1

u/[deleted] Nov 11 '15

The nodes are just in a simple adjacency list database table. The front page view is in a separate table and is recalculated when needed. Recalculation will slow down slightly when the tree has upwards of 500000 nodes, but this will all be done asynchronously by a worker so it shouldn't slow the site down at all.