14 ms·
Show HN: Minimal, no-JS web forum software
Hello HN!
I've found my SQL knowledge to be lacking, so I made a project that uses SQLite as a backend.
As it is intended for self-hosting I aim to make it easy to set up and maintain. Getting it up & running takes no more than a few commands (bar setting up a proxy such as nginx, which is out of scope).
I've set up a "demo" site at https://forum.agreper.com/ https://forum.agreper.com/ if you want to try out the UI.
- zhte415 4y agoLooks great. If you wanted to extend it with JS, HTMX or lightweight functions easily added to Flask, which is imho the right way for CRUD. And specifically, looks great - clearly outlined, threaded, indented, flow of conversation.
- lcfcjs 4y ago
- tiffanyh 4y agoI commend you for hand rolling it all and not using JS. I miss the days of good ole forum software (e.g. FluxBB/PunBB) before it was superseded with massive JS bloat/clunky forum software like Discourse, Flarum, etc.
- LinuxBender 4y agoFor what it's worth, phpBB still sortof supports having javascript disabled [1] but it is nowhere near as lightweight as the example here created by demindiro. I also commend demindiro on not requiring JS. It is refreshing to see simple yet useful applications. [1] - https://www.phpbb.com/community/viewtopic.php?t=2106245 https://www.phpbb.com/community/viewtopic.php?t=2106245
- make_me_rich 4y agoOhh I miss the good old days of forums in general. I find all this new software, where conversions* are "threaded" stupidly hard to read. Even worse, when the software is trying to recommend to you, what to read. Back in the day you had a thread, every post to that thread was chronologically added to that thread and in case you wanted to reply to someone, you quoted them... sigh EDITED: *conversations
- Semaphor 4y agoI actually love threaded discussions… On HN and Old Reddit. But anything is better than whatever XDA uses, and almost everything is better than discourse.
- ngrilly 4y agoI also prefer reading threaded discussions, but are you aware of a good way of keeping track of new messages? That’s my main issue with threaded discussions, for example here on HN.
- halikular 4y agoNotifications and sorting for new like reddit has.
- busymom0 4y agoI am the developer of HACK, an iOS, android, MacOS client app which provides push notifications for HN when someone replies to your comment or post.
- layer8 4y agoThe way Usenet clients and traditional email clients work is that unread messages are marked as such (usually by use of bold typeface), and you have keyboard shortcuts to navigate from one message to the next, or to jump to the next unread message. For example, the Tab key jumps to the next unread message, Space/Backspace scroll up/down within a message, and the Up/Down arrow keys jump to the previous/next message (regardless if unread or not). A message is marked as read automatically when you navigate to it (it gains focus). There’s also a keyboard shortcut to mark a read message as unread again if you w. The keyboard navigation means that only one message has focus any point in time. You have a threaded view of all messages, where the unread ones are highlighted (e.g. by bold typeface). Then you can decide which ones to navigate to. Usually you just use Tab and Space to jump/scroll through the unread messages. It’s incredibly efficient to use.
- fuzzy2 4y agoI actually believe vBulletin 3 is where it’s at! With modern forums, it’s mostly the UX that sucks. PWAs that never recover from errors, endless scrolling, stuff like that. Also * Falsehoods forum developers believe about network reliability – did you know the network can be down? Then up again? * Falsehoods forum developers believe about time – did you know that time can jump forward, by huge amounts, because the page was suspended for whatever reason? Turns out, if you try to do the browser’s job, that’s a lot of work! Just don’t. Performance is usually good enough for me, even with all the JS and whatnot.
- tiffanyh 4y ago> I actually believe vBulletin 3 is where it’s at! Curious, what about vBulletin v4 and v5 do you not like?
- Ralfp 4y agoDevelopers of vB 3 left the company and started new forum software named XenForo. They were then sued by Internet Brands (vB owners) for IP theft - IB claimed XenForo was next vBulletin. In court hearings we’ve learned that IB plan for vBulletin development was to fire all but lead dev, and have this lead dev only delegate and review work to outsourced devs in Asia. We’ve also heard that „only developers care about quality of code” and trying to keep code good is „waste of time”. And then vB 4 landed and turned out to be insanely poor launch - forum index was plugin based, but it was very easy to end with index page that did 700 mysql queries, which took forever to execute without relying on full page cache like varnish. Today its supposedly much better, but Internet Brands uses internal version of vBulletin 3 (3.8) to run their sites instead of v4 or v5.
- phendrenad2 4y agoI wondered why vbulletin v4+ seemed like such a radical shift. vB 3.x was a true platform. There was a rich ecosystem of plugins (including many paid) and many sites were heavily customized. Every vB 4+ site looks exactly the same to me IMHO. This also explains why all of the paid plugins moved to XenForo. Interesting...
- FunnyLookinHat 4y agoI also miss the days of good ole server-side rendered applications. I'm not sure the author's history or work experience, but, if I built something like this, I'd likely find it extremely cathartic compared to most tech stacks nowadays. :-)
- gosukiwi 4y agoPHPBB
- INTPenis 4y agoI loved PunBB. 18 years ago at my first IT job I actually stole PunBBs design to make the control panel for our web hosting company. Nobody knew because even then punbb was kinda esoteric.
- skilled 4y agoFor that era, FluxBB/PunBB weren't even that great. I think phpBB/vBulletin took the cake (as was evident by the number of forums run by the said software), and of course, IPB was also nice but came with a steep price by comparison.
- moffkalast 4y agoI do still wonder why the fast and responsive software can't invest a little bit into design in order to not look like complete shit. Sure something like phpBB is light, but the UX is also barely usable. Give me something like Reddit or Discourse over that any day. Why can't we have the best of both worlds? Hackernews on the other hand manages to lack both (in some speculations intentionally), with neither usable design nor speed.
- alxlaz 4y agoThere is a considerable cultural overlap between "people who think no-JS, fast and responsive software is cool" and "people who think the design of Reddit or Discourse is really awful". (Man, especially Reddit, I swear the day they retire old.reddit.com will be the day I stop using it). They probably are investing a little bit into design, just not the one you like.
- bulatb 4y agoFOSS tends to treat aesthetics like developers complain executives treat software quality: This doesn't help me. Why does it matter? Why should I care? I see no difference. Improving either is an uphill battle when decision makers don't value the work, at best, or at worst are committed to resistance. And you don't even get paid.
- llanowarelves 4y agoYep often they don't see aesthetics/usability as a feature, and sometimes even have a grudge against it. For example, Blender pre-v2.8, many many flamewars belittling people who wanted something usable, akin to calling them shallow/superficial Untermensch who "don't understand" Blender's supposedly genius but strange design choices at that time. I suppose that's why most aren't capable of making a product and are relegated to being an employee or unpaid open source employee.
- onlyrealcuzzo 4y agoThe point of no-js is mainly to avoid client-side tracking, right? Can't you do a lot of that with CSS?
- deleted 4y ago[deleted]
- chatterhead 4y agoWonderful job!
- ftth_finland 4y agoI dislike forums which indent successive replies. I hate forums which indent replies and don’t support collapsing sub-threads. The proper way of handling replies is to post them under each other and support quoting.
- demindiro 4y ago> I hate forums which indent replies and don’t support collapsing sub-threads. [-] should collapse subthreads. Caveat is that the browser doesn't remember which subthreads were collapsed due to no-JS.
- have_faith 4y agoNot if each "collapse" link reloads the page and at the same time stores the preference in the backend against your username so that subsequent page loads know what to hide (:
- veidr 4y agoLOL you are so right... so much was lost when we started accepting that page reloads are expensive (T_T)
- com2kid 4y agoFor 20 years page reloads were expensive. In 1999 I had a cable modem connection that could pull down 2 megabytes per second and ping up and down the west cost well under 50ms. But forum servers were slow. Like, really really slow. When Sites like Reddit finally came to, 15 or so years later, with inline replies, they were a breath of fresh air. Back in 99 Slashdot had massive resources put into making it responsive, lots of servers thrown at it, and it was still laggy and slow compared to Reddit now days. Everyone arguing about "time to first draw being under 100ms" forgets that just a short time ago, web servers took more than 100ms to respond to a connection.
- 4y ago
- lsbehe 4y agoVery nice work.
- bmacho 4y agoTeddit works like a charm with disabled javascript, it supports css based thread collapsing, and cookie based information for logged out users as well (you can store which subreddits you follow).
- ms123 4y agoLove it! I built one using go (https://git.sr.ht/~m15o/vpub https://git.sr.ht/~m15o/vpub) and it powers https://forum.status.cafe/ https://forum.status.cafe/ Thanks for sharing it :)
- lsbehe 4y agoIt's not caching the stylesheet. If you plan on updating it a lot you should still enable caching and e.g. increment a url parameter every time you change it (like style.css?v=3).
- pablo1 4y agoIs it still being maintained? Do you accept PR's? I tried to register on the forum to ask, but my user has not been activated.
- m00dy 4y agois it missing captcha ?
- benbristow 4y agoHas a CAPTCHA but it can be solved pretty easily (paste into Dev Tools console)... const input = document.querySelector('body > main > form > table > tbody > tr:nth-child(3) > td:nth-child(2) > input'); const challenge = document.querySelector('body > main > form > table > tbody > tr:nth-child(3) > td:nth-child(1)').innerText.split('=')[0]; input.value = eval(challenge);
- barefeg 4y agoOut of curiously, does HN use JS heavily? It feels quite lightweight, and it’s sort of a forum
- lifthrasiir 4y agoVery sparingly: https://news.ycombinator.com/hn.js https://news.ycombinator.com/hn.js I'm pretty okay with that, my only complaint is that when you vote a comment or story it creates an invisible image with a voting URL, which may be loaded much later so the click may not register from time to time.
- donio 4y agoAnd all of it is optional. You can do all operations (readinig, posting, commenting, voting, flagging) with JS disabled, you just get page loads rather than dynamic updates.
- genericacct 4y agoIMHO one of the best features a modern web forum sw can provide is browser notifications
- foofoo4u 4y agoThis is great. I want to see more of the web to be like this. Simple, direct, light, and functional. I've came to learn on this thread alone that other projects such as teddit and nitter exist, which capture this same spirit. I'd like to know if other projects for popular sites exist as well. Someone should make an aggregation of sites and open source libraries like https://github.com/Demindiro/agreper https://github.com/Demindiro/agreper that exist.
- altilunium 4y agobearblog & prose.sh came to mind (minimal blog system). For chat, we got https://github.com/altilunium/darkhallv3 https://github.com/altilunium/darkhallv3
- sh4nks 4y agoNice! I built one with Flask as well :-)
- derekzhouzhen 4y agoWhat innovation do you have to make a moderator's job easier? I ask because I believe this is the hardest part of a forum software; The one thing that make or break a community is whether there is timely and fair moderation so contents are fresh and relevant.
- demindiro 4y agoCurrently there aren't many moderation features - only banning and removing threads & comments are implemented right now. Registrations can be disabled by the admin. I will definitely focus on having good moderation features as I also believe it is essential for a healthy forum.
- forgotpwd16 4y agoLove the HN-like design. How do you handle big threads and many nested replies?
- demindiro 4y agoCurrently not at all. All comments in a thread are loaded. I do intend to add pagination but I'm not sure what a clean implementation would look like.
- ad404b8a372f2b9 4y agoI love it. And it's telling of modern practices that it's one of the fastest forum I've used in the past few years, you click and the page instantly appears! Do you intend to extend it and keep working on it or was it just a one off project?
- lolinder 4y ago> And it's telling of modern practices that it's one of the fastest forum I've used in the past few years, you click and the page instantly appears! "Modern practices make for slow apps" is a common trope on HN, but it's important to note that it's not just modern practices that make modern web apps feel slow; modern feature sets are the larger culprit. This app could be a React SPA and it would still be faster than most forums you've used because it intentionally has a minimal feature set.
- GoblinSlayer 4y agoFeature set is absolutely design practice.
- ad404b8a372f2b9 4y agoI don't buy that for a second to be honest. Modern forums haven't innovated all that much, you have infinite scrolls, notifications and live updates, that's all that I can think of, off the top of my head. If you go on the main page of a modern forum and a Phpbb one they'll be functionally equivalent for the end user. And even if they had innovated, you can put as big a feature set as you want on the backend and not send 20Mb of JavaScript along with a single request per post and your page will load instantly. And that's not even going into all the websites which are entirely featureless, I regularly see SAAS landing pages that take over a minute to fully load, that's just to display text and images. Maybe the stack is capable of being fast and light theoretically but it never is in practice.
- lolinder 4y ago> Modern forums haven't innovated all that much... I'm not comparing modern forums to older forums, I'm comparing both types of forum to OP's minimal forum. > And even if they had innovated, you can put as big a feature set as you want on the backend and not send 20Mb of JavaScript along with a single request per post and your page will load instantly. You have to distinguish between initial page loads and subsequent interactions. Forums are not typically one-page-and-done websites: you spend a lot of time navigating around the different views. For this use case, phpBB forums were and are very slow. I tested out the phpBB demo [0] and compared it with the Discourse demo [1]. The Discourse demo has a slow initial load, but it's quite snappy after you've downloaded the 6.23mb (not 20mb!) of JS and CSS. The phpBB demo seems faster on the initial page load, but it gets pretty painful to navigate as you click around into different sub-forums. The reason why the OP's no-JS forum can outperform both phpBB and Discourse is primarily that it doesn't do very much work on each user action, not that its stack is inherently superior. The biggest bottleneck in a forum will be the speed of each request-response cycle, not whether the requests return JSON or HTML. [0] http://www.try-phpbb.com/33x/index.php http://www.try-phpbb.com/33x/index.php [1] https://try.discourse.org/ https://try.discourse.org/
- rexreed 4y agoIt feels very retro - back to the earlier days of the web circa what Craigslist still looks like. Are you doing this just for development experience / fun or to make it something bigger? I still find no-JS back-end forums such as PHPBB and similar to still be useful. People are still running vBulletin. These systems are all very robust and handle moderation and many other forum-related must haves. Are you looking to build those as well? It definitely feels like we're going full circle with the Web and back to its earlier, decentralized, stripped-down past.
- 93po 4y agoVery fast. Really like it.
- Xeoncross 4y agoThat reminded me of the 1KB forum: https://nerdparadise.com/programming/phpforum https://nerdparadise.com/programming/phpforum I actually shortened it, expanded it to add bot detection and published the update also under 1KB: https://gist.github.com/Xeoncross/1503594 https://gist.github.com/Xeoncross/1503594 Such abuse PHP could handle back then.
- robertlagrant 4y agoI thought for a minute this was going to link to news.ycombinator.com!
- cxr 4y agoHN is not "no-JS web forum software".
- Kiro 4y agoHN uses JS.
- MarcellusDrum 4y agoOptionally. The site works just fine with JS disabled.
- jamesmccann 4y agoThis is a cool project! One small suggestion: the native blue links for the author name, "thread", and "reply" make the content hard to focus on as the UI is quite intrusive. HN solves this quite well with a colour scheme that has the comment content as the most prominent element in a thread.
- nathias 4y agovery cool forum
- Aperocky 4y agoMay I recommend an ORM for any such project? hand rolling SQL statement aren't going to scale. Here's my shameless plug: `pip install sqlitedao`: https://github.com/Aperocky/sqlitedao https://github.com/Aperocky/sqlitedao
- softfalcon 4y agoNot trying to bash your ORM as it could have a great translation layer to make optimal queries. my experience optimizing SQL has been removing the ORM layer via hand rolling SQL queries. Most of my peers also seem to agree that ORM is great for knocking a feature out, but you’ll inevitably run into performance concerns at scale and need to write your own optimized queries yourself. I feel like with SQLite having limited resources, you’d likely want to optimize your queries as best you can without an ORM? Is that not the case?
- Aperocky 4y agoA well thought out ORM would consider for performance, obviously if you're just retrieving a particular string then manual SQL might have a few times speed lead. The fundamental issue with both handrolled SQL and ORM is inefficient queries leading to linearly increasing time consumption. for instance usage of `LIMIT` and accidentally querying on non-indexed fields. But I don't see how this differentiate the 2 as I have seen it happen in both situations professionally. A good ORM enforces certain behaviors, specifically querying by index and constant time pagination. This guards against accidental querying behaviors.
- tonetheman 4y agoMy experience is the exact opposite. ORM's never scale and you end up with hand written SQL long term. Unless it is really just a CRUD app then ORM's really work fairly well.
- Aperocky 4y agoOn a personal and professional level it has been the opposite case for me.
- egberts1 4y agoi worry about spammers coming across my soon-to-be-hosted forum. What mechanism can one do to prevent fraudulent signups?
- demindiro 4y agoThere are currently two mechanisms: - A weak CAPTCHA that will be replaced with something stronger (probably image-based) - Disabling registrations
- aimor 4y agoThanks for sharing this. I've been writing my own simple websites for a couple years now and I really like seeing what other people have done. Sometimes I learn better ways to do things, and sometimes I realize what I did was perfectly acceptable.
- sirsinsalot 4y agoIt's absolutely beautiful. Within a fraction of a second, I knew what it was and how to use it and how much value it has.
- l-portet 4y agoCool project, is there a theme feature?
- demindiro 4y agoThere is currently only one theme. I do intend to add support for custom themes though.
- throwaway81523 4y agoIt's always nice to hear about someone writing a cool program just because they felt like doing so. Every time I think about writing a forum server, I find I return to the thought that Usenet was better, and that if I wanted a web forum, I'd consider putting a web front end on an NNTP server. That would among other things let people keep using NNTP clients (I like gnus.el) if they don't want to use a browser. There are a bunch of NNTP web clients already, but afaict they all needlessly suck. You might take a look at Fossil (fossil-scm.org) which is not a forum, but is an all-in-one source control system, bug tracker, wiki, and web backend, all implemented as an SQLite client written in C. Its blurb says a scripting language might sound more attractive than C superficially, but in Fossil, SQLite does all the heavy lifting that would otherwise have been done with scripts. On my bottomless todo list I want to study its implementation sometime, since I think it would be a good example of "advanced" uses of SQL and SQLite. That is completely independent of Fossil's purpose as a VCS application. I'm ok at basic SQL but not so clueful about sophisticated uses. One thing to watch out for is that since SQLite is an embedded DB, when you make an SQlite query, the overhead is basically a local subroutine call rather than the network traffic that a client/server DB would incur. That in a way changes the asymptotics of an application: particularly, the "N+1 queries" antipattern of some client/server DB apps is a perfectly ok design strategy for SQLite. I believe Fossil may rely on this in some way.
- nieve 4y agoEvery now and then I'm reminded of what could have been when someone submitted a patch to Dreamwidth (probably easily ported to Livejournal) that provided a bi-directional NNTP gateway that allowed posting. The Dreamwidth devs quite reasonably ended up regretfully rejecting it because there was no-one in the dev community who could maintain it, but sometimes when I'm reading through a community that generates 5000 messages a day I'm reminded that I could have had real kill files and proper tracking of new messages. Even close to 30 years later I haven't found anything as efficient for forums & such as a good newsreader was for netnews.
- kitd 4y agoThe most productive workplace forum I have used was based on NNTP. So much better than "improvements" like Slack and Discourse. But then I considered it was really just a shared email. Would email with shared folders not achieve the same?
- Zopieux 4y agoLooks nice! But as with any 2022 project that publishes user input, please put a section in the README describing counter-abuse and moderation features, even if (especially when!) there is none. Here it seems there is an easily defeated captcha.
- allanrbo 4y agoRefreshingly simple. I'm so tired of JS bloat.
- julianlam 4y agoI haven't seen representatives from Discourse, Flarum, Vanilla, or the like chime in yet, but as the founder of NodeBB, I want to say this is just awesome! I'm absolutely loving the fact that the HN zeitgeist has come around to embracing these no-js solutions focusing on function over form. Every once in awhile I come across little sparks in the forum space, but they all fizzle out for one simple reason: building a forum software isn't as easy as you think it is. For us, it took three developers a year apiece of full-time work to reach rough feature parity with our competitors, and we're still trying to innovate nearly a decade in (and add in the constant need for reducing technical debt, etc.) For now I will say what I always say when I see new competitors in the forum space — give me a run for my money. Keep me on my toes! I appreciate the challenge, and it gives me that extra incentive to make our software the best it can be.
- toomim 4y agoOh my god, this looks so sane.
- em1sar 4y ago
- cubancigar11 4y agoPlease accept my sincere respect. I have been trying to create a blog of sorts with no or clear degradation upon no javascript myself, but I am not much of a UI expert and have failed to make my UI good looking. You are using flask. How is the performance? I moved away from flask to FastAPI but another one of my goal has been to create a program that can run on cheapest VMs availalble in the market, which means very low ram. I am currently trying to rewrite the server into Go and use something that can consume jinja2 templates in it.
- demindiro 4y agoPerformance is pretty good: CPU usage has so far not been higher than 2.5% and is usually <1% on a single core of a 3900X. Currently 192MiB of RAM is used (162MiB by systemd-journald, 4x 37MiB + 22MiB for the workers according to htop). I'm renting a VPS in New York which costs ~€20 a month (€15 for VPS with 1 dedi 3900X core, 4GB RAM and 80GB NVMe, €3 for DDoS protection and €1.5 for up to 7 daily backups), which in hindsight is overkill.
- mikespikes 4y agoThanks for this interesting information!
- mikespikes 4y agoIn addition to addressing the needs of your organization, custom software can also help you generate revenue through licensing. Whether your company is in need of a consumer-focused application or a business-to-business solution, i3solutions will help you design and develop the solution that will help your business grow. They will conduct interviews with your team and stakeholders to determine your needs and identify potential opportunities. They will then develop a project roadmap and risk management strategy https://mlsdev.com https://mlsdev.com