📰 Good News app. Backend in Golang behind Traefik reverse proxy with HTTPS available.

Prerequisites & Idea, project and database structure and API endpoints.

  • Parsing websites with Colly.
  • Exploiting Mongo as a database.
  • Using Traefik (it is a great reverse proxy made by guys from Continious) as a server with built-in Let’s encrypt certificates and DNS challenges managing tools.
  • Publishing all of the above on Digital Ocean.
  1. [in progress] 📰 Good News app. Flutter for rapid mobile applications development.
  2. [in progress] 📰 Good News app. Hummingbird as a promising replacement for frontend frameworks.
  1. Project creation, go modules & GIN (beautiful framework) integration.
  2. Colly usage.
  3. MongoDB setup using official Golang driver.
  4. Running all together locally with Docker and Docker Compose & Traefik v2.0 configuration.
  5. Publishing to Digital Ocean, Let’s Encrypt and DNS Challenge configuration.


There are some prerequisites for you in order to start following steps in this article.

Idea, project and database structure and API endpoints

Idea or service that I have chosen for this series of articles and going to implement step by step is basically a simple news reader app. Why? Well, I have a few websites with news which I usually read during the first 30 minutes when I come to the coworking place and it is a pain for me to open each website, so I decided to write my own backend and mobile apps to solve that problem. Yes, it would be much easier to find RSS feeds of those websites, download special RSS feed reader and use it but I can not miss a chance to learn something new and share it with the world. So that is why I have decided to work on this app.

/controllers - where our controller(s) will be located
/crawler - files for sites parsing
/db - db access and manipulating files
/images - static images
/models - files for describing our models
/server - server configuration files
/utils - some utils files
main.go - starting point for the project
+ some other files which we are going to create during development
[    {        _id: <string>,        title: <string>,        preamble: <string>,        time_added: <int64>,        link: <string>,        news_type: <NewsType>,        news_source: <NewsSource>    },    ...]
[    {        _id: <string>,        name: <string>,        image_url: <string>,        types: <array of NewsType>    },    ...]
[    {        _id: <string>,        name: <string>,        type: <string>    },    ...]
  • /v1/news/sources — returns news sources so we can manage and show correct information in our mobile apps.
  • /v1/news/types — returns news types. They are pre-filled to a database as news sources.

just a lazy human who is trying to optimize and automate every process in life. and yeah, on the side I am a serial entrepreneur and MS in CS. batyr.io

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store