📜 ⬆️ ⬇️

Typegram - Zen blog platform

Hi, Habr. I decided to show you the engine that I am developing on the sly. This is a blogging platform, very close to the medium and similar projects.


Basic features:


Publications, comments, favorites, subscriptions, notifications, ratings, voting.


Minimalistic, text design:


Playground


There is a playground where you can touch the platform, without prejudice to civilians: test site .


Localization


The service automatically divides users by language, directing Russian-speaking users to the Russian subdomain, and English-speaking users to English. Those separation is essentially implemented at the content level. True interface is available only English. Each subdomain has its own database and its users, registration is not end-to-end (each subdomain has its own ecosystem, life did not originate everywhere, for example).



Optimization


The service is characterized by very aggressive optimization. All downloaded images are more than 100 kilobytes, they are pressed by the Atkinson method in black and white previews, with the ability to view the original, for example:


Heavy scripts and styles are not used, as well as external scripts that monitor user behavior. The site remains fast and convenient on any platform, including with javascript disabled. In the future, I want to reach the speed of loading telegram channels.


Subscriptions


The main page displays a list of authors to which the user is subscribed, and the number of new publications for each author. When you click on this button, unread publications are opened, in chronological order, as in the telegram channels:



Notifications


Also on the main page there are notifications of references in the comments, with the possibility of transition:



Editor


The editor supports both marcown and visual text formatting, with the ability to preview, expand to full screen and so on. Work is underway to ensure the availability of the site for blind and visually impaired users.


Rating system


On the main page there are three sections with strange names:
top mid btm



Yes, I love DotA (my dog’s name is Pooj, for example). I think that ratings are more about game mechanics / motivations than something seriously adequate. All articles go to farm rating at mid) How nafarmyat - get to the top. If they melt the mid, they will fall to the bottom. The cherished formula is carefully stolen with ycombinator (new articles need less votes to get to the top than the old ones). Sorry for such a free manipulation of such a holy thing for many as rating. But the rating of the authors, as such, at the moment no. Only rating articles.


Article rating.


+ 5: 1 -


Each user has 10 votes per day. He can spend them both on pluses, and on minuses. Like all 10 votes for one article, so he wants to distribute them.
The author sees both negative and positive reactions separately.



Comment Rating


Comments are evaluated only positively. I do not know why, do not ask. I wanted to give more opportunities for collecting feedback with different mechanics. For a comment, you can give only one vote. Each user has 10 votes per comment per day. One comment - one vote. It seems to be transparent, but it is not accurate. Perhaps this will change soon.


Tags


Each article may have a global tag. So far, only one (for some reason, huge tag clouds scare me for all occasions).



Openness


The source code of the project is open. On the githaba is available instructions for building and deploying your own version: github


Restrictions


This is not the first project with UGC. Unfortunately, happiness letters from Roskomnadzor / Hosting Provider arrive about once a week. Therefore, I rather nervously react to child porn and other illegal content. The ban button appeared one of the first ones (For some reason, many people strangely interpret the meaning of the word resource. Well, associations with telegrams / telegraph work. There are other restrictions as well - users are limited in the frequency of posting comments and posts, there are limits on registration. For example, New comments should not be posted more than once a minute. There should be more than 10 characters in a comment or in a post. This pool of restrictions did not appear out of nowhere. Some people are literally annoyed. But like this (


What's inside


The project is written in golang, without external dependencies. Now it is hosted on a regular dedicated server, with slow hdd and under high load has not yet been. I would not want to get ahead of myself and tell you what a great database is at the basis, because you first need to make sure that it is really beautiful)


Denial of responsibility


Much has not yet been completed. Many things are not implemented as all. What I'm experimenting with. Something you think is wrong. But if the project seemed interesting to you - try: github


')

Source: https://habr.com/ru/post/420107/


All Articles