3 ms·
At its core, a HN clone or any simple forum is just a CRUD app. If you can make something in the language of your choice (with or without framework, it doesn't
by krapp 8y ago
At its core, a HN clone or any simple forum is just a CRUD app. If you can make something in the language of your choice (with or without framework, it doesn't matter) that handles user accounts and reading from/writing to a database, then you're already a decent amount of the way there.
Beyond that, assuming you're using a SQL database and want threading, study methods to represent tree structures from that[0].
[0]https://stackoverflow.com/questions/2175882/how-to-represent-a-data-tree-in-sql https://stackoverflow.com/questions/2175882/how-to-represent...
The closest thing to actual HN source code that's publicly available is probably Anarki[0] which is a public fork of Arc[1], a lisp created by PG. That codebase does already deviate from HN in several ways, is not guaranteed to be stable and doesn't represent what might be considered modern best practices for application design, but contributions are always welcome, and if you want to know how HN itself works, in general terms, that's probably the closest you're going to get.
You can also search "hacker news clone[2]" here to find examples written in various languages.
[0]https://github.com/arclanguage/anarki https://github.com/arclanguage/anarki
[1]http://arclanguage.org/forum http://arclanguage.org/forum
[2]https://hn.algolia.com/?query=hacker%20news%20clone https://hn.algolia.com/?query=hacker%20news%20clone