Still writing an imageboard, guys

Took me a little longer to post the code than "today" back when that meant May, but I keep my promises (eventually): Couple requested things from the original thread implemented so far:
* Global thread-specific IDs
* REST API (as of this moment can do everything the web frontend can do except post as an admin/mod)
* Board aggregation into a single page
Still working on push notifications and mulling over how a like/dislike system would work in imageboard format/whether it would be a good idea. Code's up on github.com/DangerOnTheRanger/maniwani if you want a look. I've never written a non-trivial Flask-based program in my life, so gimme a week or so to make the actual code organization sane, though.

Attached: Screenshot_2018-08-10 Maniwani - Still more work to be done, lads .png (1562x791, 193K)

Other urls found in this thread:

youtube.com/watch?v=qNtJ5p3h2A4
twitter.com/SFWRedditImages

nice, good luck

awesome dude

why did you choose flask instead of Django?

django is really nice for auto-managing and auto-migrating the DB

PS, thanks for putting some decent CSS on your image board. Jow Forums could really use some style updating if *crack* we want it to appeal to anybody besides us *sip*

If I'm honest, I mostly picked Flask on a whim. I do like how less-opinionated it is, let's me set up projects the way I like it. I do think stuff like admin pages and database migration would've probably arrived faster if I just used Django, though.

Also yeah, nice CSS is a priority of mine. Whole thing is responsive and works with or without JS on, though obviously there are some quality of life improvements with JS enabled. Here's gallery mode with a tablet-sized viewport.

Attached: Screen Shot 2018-08-10 at 21.00.53.png (2048x1536, 3.43M)

really nice.

are you using any JS frameworks? bootstrap or something? or did you homebrew it?

Yeah, I use bootstrap 4 (whole site is still using the stock bootstrap theme actually) plus jquery for some stuff like gif-animation-on-hover and masonry.js for stuff like pic related (pinterest-style card layout for board catalogs).

Attached: Screenshot_2018-08-10 Maniwani - home(1).png (1562x791, 293K)

masonry isn't necessary though, the catalog and gallery fall back to flexbox if JS is turned off though. Some wasted space, but that's currently unavoidable with the current state of CSS, mind you.

Coulda probably avoided use of jquery, but it makes things a lot more convenient and avoids a lot of boilerplate. This is all I have to do to get gifs to animate inside threads on mouseover:

$(".img-animated").hover(function() {
$(this).attr("src", $(this).data("full"))
$(this).data("old-opacity", $(this).css("opacity"))
$(this).css("opacity", "1")
id = $(this).data("id")
$("#spoiler-label-" + id).hide()
}, function() {
$(this).attr("src", $(this).data("thumb"))
$(this).css("opacity", $(this).data("old-opacity"))
id = $(this).data("id")
$("#spoiler-label-" + id).show()
})

Attached: Screenshot_2018-08-10 Maniwani - home(2).png (1281x791, 199K)

yeah i sort of detected the bootstrap-feel

nice work. post something on Jow Forums when you have v1.0 announced.

i was looking at hosting an imageboard on my personal server for my coworkers and i was specifically looking for something written in python (since I know python and would be able to debug shit) and i found something on github, but i was kind of unimpressed. the guy developing it let his demo board go down for weeks at a time and still i see it's not working... plus it used all the Jow Forums css so it looked like... well it looked like this page

imageboards can be really good actually, especially for a small collaboration who need to share coding/computing/getting shit done tips, so i like this project.

As someone who has no fucking clue about programming or web design, complete brainlet here. How hard would it be to implement a type of tagging system for threads? Like a general would have a visual cue when glancing over the threads in the catalog (maybe it has a different color scheme from normal threads)?

Attached: 1440270463784.png (383x591, 198K)

Yeah, soon as I'm confident hosting an instance wouldn't be instant security suicide + there's some sane error checking and documentation in place I'll probably make another thread. I'll probably hang out and post every once in a while in >>/wdg/ or something till then.

Not that hard at all if you can get the hang of how flask + sqlalchemy work, honestly. I'd probably do it by adding a new 1-N relationship to the Thread model already in the codebase to a new Tag model. Then in the catalog template, change the style of certain tagged threads.
All in all maybe an hour's worth of work tops once you know how the relevant software libraries work, though understanding how both flask and sqlalchemy work starting from scratch might take a month or two. I like the idea though, so if the thread doesn't die soon I may throw up a quick prototype of thread tagging in a bit. Could come in handy for searching by tag or whatever, too.
Thanks, user.

Attached: 1529319799864.png (592x534, 352K)

>Thanks, user.

Attached: 1432322614130.png (814x720, 282K)

Here's a mockup of changed colors for threads tagged with "general". Can't come up with a nice-looking way to show what a thread is tagged with from the catalog (have to go to the thread itself to see), especially since I'd rather not fall into the tumblr situation of people throwing sentences inside the tag form, which is really stupid-looking and hurts the page layout. I'll figure out something, though.

Attached: Screenshot_2018-08-10 Maniwani - home(3).png (1562x791, 987K)

>mulling over how a like/dislike system would work in imageboard format/whether it would be a good idea

Attached: 20002e117a993f901f188188d9e69740c79eda8a36a88f42a37cfd28c01d513d.png (283x262, 86K)

Don't get me wrong, I'm not trying to implement an upvote/downvote system here. Could potentially come in handy if you could sort a thread to see liked posts or something.
I dunno, still trying to come up with use cases before I go down that path, honestly.

Attached: 1529855813110.png (600x632, 253K)

That looks very nice. It sticks out just enough that without even reading I instantly know it's a General of some kind.

The subject field does a good enough job on conveying what the thread is about, so you don't really need to see the tags in the catalog, do you? You could always have them drop-down under the subject field when hovered over.
I was more under the impression that the tags would be more convenient for search and filter functions.

Attached: 1448216952776.png (626x927, 402K)

Yeah, you're probably right. I like how uncluttered the catalog is right now, so I'm trying to keep it like that.
You're also right in that they would be mostly used for searching/filtering. Could be used for stuff like locking/stickying too, but I think there are probably better ways to do that.
I could imagine certain tags adding functionality to a thread, say, a tag that allows only moderators/admins to post, or a thread for stuff like dumps that highlight the OPs ID in the thread.

>Jow Forums could really use some style updating if *crack* we want it to appeal to anybody besides us *sip*
Stopped reading there

Forgot to upload what tags looked like viewed from inside the thread. Not exactly a lot to write home about, but it's something.
Also implemented the color-change effect in the catalog for real, but it looks identical to the mockup, so not much point in posting a picture of that.
I like the whole tag setup, feel like there's a lot of things that could be done with it.

Attached: Screenshot_2018-08-10 Maniwani - haruhi general.png (1562x791, 110K)

Don't fill the imageboard with unnecessary shit or else you'll end up with another rendition of reddit.

>This is all I have to do to get gifs to animate inside threads on mouseover:
>upvote/downvote
Jesus Christ OP

Anyways... Why didn't you go with something like Wakaba, just wanted to make something from scratch? Are you gonna host it for us? Why are images above the poster data instead of between poster data and their post? Are you detecting admin posts by trip, by IP, or something else like password cookies?

You make a good point, friend. Have a pic of a slightly updated catalog/front page view with replies and images listed for each thread.
>upvote/downvote
I said I wasn't going to try to do that, senpai. Cmon now.
>Why didn't you go with something like Wakaba, just wanted to make something from scratch?
Yep. I think I can do better, too. A lot has changed since stuff like Wakaba was written in the tech landscape.
>Are you gonna host it for us?
Sure am, once I consider it out of alpha. You're free to download and host an instance if you want to right now (setup takes all of 2 minutes), though I've only been using the Flask dev server so far and I doubt the file storage mechanism as it stands will scale well. Error handling/reporting is pretty bad as it stands right now, too.
>Why are images above the poster data instead of between poster data and their post?
Stylistic choice on my part, pretty much. I think it works better that way on mobile, as well.
>Are you detecting admin posts by trip, by IP, or something else like password cookies?
Good question - there's a system I have called slips that are pretty much password-based cookies that you can use to authenticate yourself as an admin or mod. At some point in the near future you'll be able to use slips to save settings, like how many posts you see per page, site theme, that kind of stuff.

Attached: Screenshot_2018-08-11 Maniwani - home.png (1562x791, 955K)

very interesting, thanks. i just started building an imageboard based off wakaba last week and was surprised to see a thread about them.

do you have a web address purchased? if so, and your WHOIS is private, what's it gonna be called?

I've been thinking about a couple different names but haven't decided on any yet. I like Maniwani as a name for the site backend but I don't think it makes a good imageboard name. I thought about Futatsu as a play off 2ch but I don't know how catchy that is.
So yeah, name that imageboard guys. And draw a logo while you're at it.

Attached: 1530330179883.jpg (282x270, 14K)

>global thread-specific ids
found the redditor
>>>/reddit/

Don't put likes/pointd in you'll ruin everything.

is there any meaning to Maniwani? Sorta cute.

I'm calling my backend Wakareba since it goes along with Jow Forums's Futaba, with Wakaba, etc. Plus since it's just a re-hash of Wakaba there's a 're' thrown in there. It also sorta means "split" or "understand" in japanese which jives with what I'll be using it for.

DB? Unless you mean non relational DB.
Data on Jow Forums is really unrelational. You are binding yourself if you use relational db.

Don't worry, I've been scared off doing that.
I do think pushing the envelope in terms of featuresets for imageboard software is good though. I'd rather get too many ideas and throw some bad ones out than the other way around.
Maniwani was the nickname given to the ninja corps in Katanagatari; I just liked the sound of it, that's all.
Imageboards work pretty well with relational DBs. As long as you understand stuff like associative tables and other stuff you'd learn from a SQL course there's pretty much nothing out of reach, and you won't even have to delve into most of that if you use an ORM. Case in point, implementing that one user's idea for thread tagging was like 30 lines of code written while I ate dinner, and even most of that went to adding form fields and updating templates.

Attached: 1528431565950.png (500x575, 216K)

>Global thread-specific IDs
cia nigger glowing in daylight

t.. sql dev

>global IDs
yea that's essentially an account at that point, sure that's bad
>thread-specific IDs
what the fuck? why is that a bad thing?

Everything works with SQL. You just need to do more work for simple stuff.
If you don't have relations, nosql simolifies development a lot. If you do, stay away from nosql.

I do have more experience with RDBMS stuff compared to document store/nosql, but hey, I think that goes for most of us.

cause then he can't argue both sides anymore
cornerstone of imageboard culture, you know

If I weren't using an ORM (which hides a lot of the pain of manually-written queries) I'd be inclined to agree. Also, at least for my use case, I find relations come in handy. There's some stuff like what I'm doing with board/board information that would result in a lot of data duplication or basically a janky reimplementation of what you can already get for free with foreign keys. I do want to use nosql one day for the heck of it, though.

Attached: 1524702714659.jpg (415x440, 41K)

I’m also making an image board from scratch op so I understand your journey, mine is quite far along. The last big system I’m working on is a unique modding system.

How will you handle moderation? How will you handle image hosting? How will you deal with bot (captcha)?

Nice of you listening to feedback.
As for tag system, imo it can be abused by shitposters really hard, thus making it a useless feature

>Global thread-specific IDs
Why the fuck isn't this a feature in all image boards? This feature will immediately make all shills and trolls visible. Combined with a filter function, we could browse the entire image board shill-free with a click!

>How will you handle moderation?
Haven't given it too much thought, if I'm honest. Probably will just do it on an invite/application basis with mods able to move/delete posts. I'd rather not anyone (admins included) be able to edit posts for the sake of site integrity.
>How will you handle image hosting?
Throwing static file hosting behind S3 + maybe cloudflare is the current plan. Not that it currently works that way, mind you.
>How will you deal with bot (captcha)?
Hashcash if JS is enabled or a simple image-based captcha otherwise. I've thought about looking into Akismet as well, especially since that would also work for REST-based submissions fairly easily. On the flipside, I'd rather not pay too much out of pocket to run an instance of a free imageboard service, and I really don't want to put ads on the site.
I was thinking about that myself, yeah. I think whitelisting tags would probably be the best route if push came to shove.
I feel like there's one other board out there that also does this, but I can't name it. Honestly not sure why other boards haven't done this already; I don't feel like anything is really lost.

Attached: 1525839458737.gif (540x540, 388K)

ive had an idea for some time to color code voted on posts by color (red/pink for negative) (orange/yellow for mixed) (blue for positive) and saturation (large numbers saturated, low numbers pale)
also restricting the ability to post one per poster, and only for posters in the thread, and maybe require a cooldown delay ~30m before you can vote)

also think hierarchichal (usenet style) board organization would be interesting to pull off

you don't know anything
>1 table with thread IDS
>1 table with thread content for each post and the thread ID in a column

fucking wow

>writing an imageboard
soo i take it you didn't know about lynxchan

I think this would be pretty interesting. Having only one post you can vote on per thread and also restricting it to people who've participated in the discussion already prevents the brigading problem I feel is so common to crowd moderation. I'm still a little wary of how unpopular opinions would get treated, but as long as it's still possible to view all posts in a thread regardless of who liked/disliked it, I could see it working.
Funny you should bring that up; someone mentioned this in the original thread back in May, though I think that particularly for geographical locations. Wouldn't be too hard to implement (boards optionally have a parent, SELECT FROM boards WHERE parent = yadda yadda, etc., UI/UX would be another story though), but did you have a specific use case in mind where it'd come in handy?
Yeah, that's pretty much exactly what I'm doing now. Super easy. Like I said, I want to mess with nosql someday, though.
I'm not exactly a fan of lynx's tech stack nor its visual layout. I think I may have taken the original idea for working-without-javascript from it, though.

Attached: 1527791696938.jpg (1920x1080, 261K)

You better cause your Lil ass looks tight

Nice work on the frontend,Good Luck user!

On a side note, I think it's a little puzzling there haven't been too many imageboards experimenting with at least partial crowd moderation. Admittedly, I feel like there's too many opportunities for it to end in groupthink. On the other side, I think there's a very real problem with potential disconnect between moderators and the userbase, like back when /a/ banned sakurafish.
I think the real solution to crowd moderation will come in the form of what is essentially the online equivalent of a constitutional republic. Everything else so far attempted has been essentially a direct democracy.
Thanks, the frontend has been probably my biggest focus so far.

Attached: 1529118014909.png (583x241, 73K)

>use case
preemptive containment of generals.
I filter between 30 to 40 generals on Jow Forums but it isnt much of a concern on small or experimental *chans

>style updating
nah the 2000-2005 style is what keeps the normies out desu

Could work. The theoretical fragmentation scares me a bit, but it could be seen as better than the alternative. /anime.jojo/ has a nice ring to it, too.
I don't have a source on me at the moment but I think advertisement numbers for Jow Forums indicate something like 1 out of 20 americans visit Jow Forums in a given month. At least here, the secret club meme is long dead. Honestly I think the ability to freely speak your mind tends to attract the sort of crowd you want to see, and the rest can be taught as long as new people aren't brought in too fast.

Attached: 1525913122713.png (450x720, 400K)

>REST API
brainlet here, can you explain what that is as I can't find a single implementation that says a REST API does x, y, and z?

*definition, not implementation

Long story short it means you can send JSON to an URL and stuff happens. In the case of Maniwani you can get the catalog of the board with ID 1 by going to /api/v1/board/1/catalog, and you get some JSON back that you can then use on your custom client or whatever. Or you can post on a thread by making a request to /thread//new.
It's a lot more convenient than scraping HTML, and makes it such that the site owner can more easily handle the robotic/automated traffic you often get from REST endpoints without making life hell for the human users using the regular web frontend.
Jow Forums has a read-only REST API, but I'm taking things a step further and allowing writes (i.e, post/thread creation) via REST as well. This makes writing new clients super easy that won't break if I change the HTML on the actual web frontend.

There's arguably more to it (REST APIs are supposed to be stateless, i.e, the server keeps track aside from what you send with every request, etc.), but that's the quick-and-dirty explanation.

Attached: 1529010365426.jpg (1449x3490, 1.91M)

I personally think a tag system sounds bad. But if you really want to implement it, then why don't you create a list of certain tags and then have the OP choose 0-3 tags when making the thread to describe it.
Sort of like how /f/ currently does it.

Thanks!

Reminds me of that kpop imageboard

Yeah, current plan in my book is to wait for things to get out of hand from shitposting and then implement a tag whitelist. Whether or not I'll limit how many tags can be picked or just come down hard on mis-tagged threads I'll play by ear when the time comes. I do agree tags tend to get mis-used pretty often (old youtube, tumblr, etc.).
No problemo, user.

Attached: 1528606339413.jpg (1500x1125, 127K)

>Honestly not sure why other boards haven't done this already
Will the IDs change with your IP?

As of right now, yes. Can't think of a way around this without requiring mandatory user registration or something dumb like that, but I'm open to suggestions. I'd rather keep VPNs unbanned, as an aside.
I'm aware tying IDs to IPs means people could get around the ID system fairly easily if they were driven enough, but I think it's better than having an overly-oppressive alternative. It's a nice compromise that will keep the casual threadshitters at bay.

Attached: 1528422537197.jpg (400x300, 26K)

I'm also making an imageboard software. So far my idea to spice it up is to allow the thread creator to choose if images can be posted in the thread and if the thread has IDs. Opinions?

Attached: 1527689404445.jpg (800x597, 70K)

>choose if images can be posted in the thread
This seems like it might have merit to me, though I'm struggling to come up with some use cases for it. You got any?
>choose if the thread has IDs
I'm biased since mine has global IDs obviously, but I'm not sure how to feel about this. Is there a specific instance where thread IDs would be harmful?

Attached: 1525566560762.jpg (960x960, 57K)

why
there's already thousands of imageboards
and there's already thousands of imageboard frameworks and php scripts

>This seems like it might have merit to me, though I'm struggling to come up with some use cases for it. You got any?

Not anything concrete really, in my opinion it would just have the textboard feel. And maybe it will allow for more serious discussion if users have to think what they write instead of just making low effort posts with a wojack/anime reaction pic attached.

> Is there a specific instance where thread IDs would be harmful?

It can lead to Redditfaggotry, where people might not say what they really think in order to safeguard the posts they made earlier in the thread.

Attached: 1533811560960.gif (636x477, 190K)

>Global thread-specific IDs
Dropped

the 21st century minimalistic CSS just fucking sucks and blurs the line between imageboards and web 2.0 desu
they're supposed to be relics of the past, not reddit or social media

Then what do you suggest? Post examples.

not him but you're looking at it right now

Why not? I think I can make (or start the process of making) something better. Most of the relevant imageboard backends are pretty old/messy. I'm pretty open to ideas on how to make something better as well, as I feel this thread and the one in May have shown. Heck, I implemented tagging mid-thread.
It's fun writing this kind of thing, too. I wouldn't be on this career path if I didn't find writing software fun.

>And maybe it will allow for more serious discussion if users have to think what they write instead of just making low effort posts with a wojack/anime reaction pic attached.
Could be. Low-effort text posts (lol/winrar/etc.) are still possible though, but you have a point.
>in order to safeguard the posts they made earlier in the thread
Now this I'm not so sure about. I don't think you see that kind of behavior in board with IDs implemented (Jow Forums, /soc/, etc.), and I don't think most threads change discussion topic fast enough such that something you said unrelated in the same thread could be brought against you somehow.

"""web 2.0""" was over 10 years ago, get with the times boomer

Attached: 1524524299093.jpg (1280x720, 113K)

>stopped reading at the end of the post

>that one guy working on a PR to actually move all the models to separate files
If I ever meet you I'm gonna buy you a drink. I was dreading doing that work myself.

Attached: 1527401443623.png (1024x576, 36K)

Lotta good anime pics in this thread. Keep up the good work OP!

Attached: 68166790_p0.png (2480x3508, 1.42M)

>stopped

Whoah, a thread where people are actually working on something useful instead of fizzbuzz or jerking off to media file formats or hardware.

You continue doing this OP, this thread is better than 90% of the usual content here.

>there are people actually doing things while I'm still fucking about, trying to write a prime number generator, from scratch

Attached: pixlr_20180811093609058.jpg (984x2048, 1018K)

>that one guy working to put everything in one line of code
cmon man

do this:
youtube.com/watch?v=qNtJ5p3h2A4

>all of this love
Stop it, you guys.
Don't give up user, I believe in you.
Seriously, it'll make effort down the line a lot easier. Plus making unit testing the REST side of things a snap, and since (currently) the web frontend just dodges an HTTP request and queries the REST implementations directly, the whole site should see a ton of stability improvements.
I am doing basically that, albeit with JS to ensure thread order. I have a similar flexbox solution that wastes space as noted earlier in the thread but also ensures thread order, which I view as more important. Looks cool though.

Attached: 1527374532211.gif (340x620, 46K)

100% agree. Keep going OP.

Because it destroys anonymity if you have long threads.

>IDs destroy anonymity

i've been
looking forward to visits from anons and new credit being filed under my name

Attached: 1526752980929.png (434x299, 2K)

How so? I'm not sure I follow. Maybe if a thread somehow lasted for a week or two with constant posting and without bypassing the bump limit somehow, but even then, you have no idea who they are outside the thread, right?
I don't think you necessarily need IDs to intuitively tell who is who in a thread, either. My posting style makes it fairly obvious, for instance, same as with a couple other anons here. I do value anonymity a lot (wouldn't be making an imageboard otherwise), so if you have more to add, I'm all ears.

I don't know if it's sleep deprivation that made me come up with this idea, but what of the ability to filter posters site-wide? Say there was someone screwing up a thread who you think will never add anything constructive, so you could elect to filter their posts from the entire site on an IP basis. You never know specifically who they are, only that you (probably) don't have to see what they write again. You could also elect to unfilter them based on something like "that user from thread such-and-such," but nothing personally identifiable. You'd never know what posts of theirs you missed in what threads to prevent building up a profile, either.

Attached: 1527328998564.gif (500x338, 844K)

Have you looked at blazechan?

So, where do I shitpost?

Yeah, though I couldn't find any running instance of it to see how I liked it, and the install process was kind of a pain unfortunately last I checked. Definitely a step in the right direction though.
There's no public instance yet (unless someone has gone and set one up without my knowledge). I'm guesstimating it'll be about 2/3-ish weeks before there's a temporary/periodically-erased test instance that'll be available somewhere. Please wait warmly, user.

Attached: 1525967106593.jpg (1920x1080, 493K)

are you writing your client-side in web assembly with grain?
you might as well

I suggest you use Chaussette or waitress as production server for WSGI, both have very good performance and low memory impact