Serverless architecture offers a great way to build and deploy applications without managing servers. In this post, we’ll walk through the process of creating a Telegram bot using AWS Lambda for serverless execution, Terraform for infrastructure as code, and Python for the bot’s logic. We’ll also use a Lambda Layer to manage our dependencies efficiently.
Project Structure Let’s start with our project structure:
Initial Project Structure telegram-bot/ ├── terraform/ │ ├── main.
I recently discovered GPT Researcher, an impressive project that’s revolutionizing how we conduct online research. Its ability to generate comprehensive reports quickly and cost-effectively caught my attention, so I decided to dive deeper into its inner workings. In this article, I’ll explore the architecture behind GPT Researcher, why it’s so fast, discuss considerations for deploying it as a service, and look at potential future developments.
1. How GPT Researcher Works: The Architecture GPT Researcher employs a sophisticated multi-agent architecture that’s both efficient and effective.
It’s not too hard these days to generate a research report or an article with the help of AI. You just need to figure out the topic and prompt chatgpt, it will generate a draft for you. Potentially you can polish the draft and work towards a decent article. However I found myself even lazier than that. I just want to show the AI the topic and some keypoints and let it generate a long comprehensive article for me.
Loki + Grafana + Prometheus is a powerful combination for monitoring and logging. I found there were very few up-to-date instructions on how to set up all these three components with helm on Kubernetes. So I decided to write down my experience here.
Prerequisites You need to have helm installed. If not you can follow the instructions here Add corresponding helm repositories:
for Grafana and Loki:
helm repo add grafana https://grafana.
When you are building a chrome extension, you may need to authenticate the user with a third party service. If the third party service is google itself, it’s relatively easy as you can use google cloud platform plus firebase to authenticate the user. However if you are using other third party service, it’s a bit tricky and there are very few resources available online. I recently built a chrome extension that needs to authenticate the user with Notion and I would like to share my experience here.
Go has a great feature that it can be packaged into a single binary which is easy for distribution. However when it comes to web application it’s a bit tricky becuase 1. you need to bind frontend assets into the binary and 2. you need to deal with the routing if you are building a single page application(SPA).
In this post I will walk you through how to embed a vite built react app into a go binary and how to handle the routing using gin framework.
Login through third parties including Google, Github etc has been an essential requirement for most web applications. The underlying of this process is oauth authentication. The following diagram from Google shows the process of oauth authentication.
As you can see, it is a bi-directional communication between the app and the oauth server. The app needs to handle the callback. This is usually done by a backend server. However, you don’t have to have a dedicated backend server for this if what you want is just to get the user’s information from the third party.
Infinite scrolling is a feature that allows you to load content continuously when users scroll down the page. It is widely used in social media apps such as Facebook, Twitter, Instagram, etc. I happened to implement this feature with react recently and I would like to share my experience and thoughts on this topic.
I was looking for an all-in-one solution for building apps with golang. Then I found Wails, it is claimed as a cross-platform framework for building apps with Go as backend. On the frontendside, it allows you to use modern web technologies such as Vue.js, React.js, and Angular.js. It sounds fancinating, so I decided to give it a try and dig a little bit on how it works.
This is the start a series of posts about the notes I made when I read the source code of popular open source projects. I myself learned a lot from digging into the code of open source projects. I hope it can help you too.
I will start with Loki, a log aggregation system inspired by Prometheus.
Overview grafana/loki consists two components:
Loki: the log aggregation system Promtail: the agent to collect logs and send to Loki in a nutshell, loki and promtail is a service-client arhitecture.