Introduction

This article will be helpful for those who are working on many products in his company whether it was in concurrent or serial manner.

Problem 1: Jack of all trades

At the beginning, it was really joy to work on these products. You will learn a lot from working on them: new technologies, new tools, new programming languages.

Here is the list of them that I had to face:

  • Programming languages: Java, C++, Python, JavaScript, Typescript, R language, Scala, Kotlin
  • Frameworks and libraries: QT framework, React, Spring Boot, Flask, Fastapi, NestJS, Pandas, Keycloak, Express, OSRM
  • Mobile: Android(only Java one)
  • Databases and caches: Apache Cassandra, MongoDB, MySQL…

Why?

I wrote a lot. And in my writings I use timestamps, dates, times, time-ranges.

I use following datetime formats

  • 2020–11–01
  • 15–18
  • 14:58

For them I used custom bash scripts which were copying to clipboard the date formats I wanted. These scripts were manually added to Linux’s custom shortcuts.

Example of bash script:

#!/bin/sh
alias setclip='xclip -selection c'
alias getclip='xclip -selection clipboard -o'
printf $(date +"%Y-%m-%d") | setclip

Initially, I was really happy but after some time number of custom scripts increased. I had difficulties with remembering them.

How?

I stumbled to Ulauncher and it is downed on me that I could…


How it started

I wanted to send emails to my users on https://weekhabit.paraboly.com.

First attempt: mail sending services

Of course, I started with mail sending services like SendGrid, Mailchimp, SendInBlue. They are awesome services but I faced with various difficulties:

  • one was asking to buy a block of emails while I wanted to fly in free limits because user base is small now.
  • in one I couldn’t even register
  • one had small UX error where I couldn’t test my mail template because I removed sender but I couldn’t understand it from error.

Another attempt: Amazon SES

For introduction, Amazon SES

  • is email service, supporting sending emails from CLI and SDKs.
  • doesn’t have…

Problem

We have many microservices that run on multiple deployments. I wanted to add security by using Keycloak with the help of JWT.

Solution

One of the earliest solution was to use Keycloak Js Adapter. Yet, Keycloak JS adapter requires following:

var keycloakConfig = {
clientId: 'nodejs-microservice',
bearerOnly: true,
serverUrl: 'http://localhost:8080/auth',
realm: 'Demo-Realm',
credentials: {
secret: '62c99f7c-da55-48fb-ae4e-a27f132546b7'
}
};

which seems cumbersome way of doing this.

I thought there must be more simple way, I just wanted to validate requests.

That’s why I liked Spring Boot approach which is:

  • include package
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-oauth2-resource-server</artifactId>
</dependency>
  • add one line config
spring.security.oauth2.resourceserver.jwt.issuer-uri = http://localhost:8080/auth/realms/appsdeveloperblog

Nurgazy Nazhimidinov

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