Video series
Dr. Pedroso series: Building a social network
Short software architecture videos, one piece at a time: how a social network is built on the inside, in general terms.
About the series
Dr. Pedroso and the Apprentice, two illustrated characters, explain one software architecture idea per episode in about 45 seconds. The videos are on YouTube, and the same content is also posted on TikTok.
What you should know
Generic architecture. The series teaches how a social network can be built. It does not describe the internals of TerraVerde or of any other product.
Synthetic voice and AI-generated imagery. The characters' voices are generated by artificial intelligence, and the characters and scenes are illustrated and produced with AI assistance.
Hypothetical teaching examples. The code linked to each episode is simplified and incomplete, made only for teaching. It is not production code: do not use it as is in a real system.
MIT license. Each code example is published under the MIT license, which allows copying and adapting it as long as the license notice is kept.
Privacy on this page
This page loads nothing from YouTube, TikTok or GitHub: no embedded video, no JavaScript, no outside font and no outside image. Only when you click a card or a link does your browser open the outside site, which has its own privacy rules.
Episodes
Tap a card to watch on YouTube. The videos are in Portuguese; YouTube offers captions in other languages, machine translated.
Ep. 1The architecture map of a social networkThe six parts of a social network: identity, graph, feed, real time, privacy and cost.
Original title (Portuguese): O mapa da arquitetura de uma rede social
Watch on YouTube (opens YouTube, an external site)
Ep. 2Friends of friends: how the network finds the shortest pathThe social graph, breadth-first search and the shortest path between two people.
Original title (Portuguese): Amigos de amigos: como a rede acha o caminho mais curto
Watch on YouTube (opens YouTube, an external site)
Ep. 3The server that delivers without readingWhy a server can store and deliver messages without being able to read them.
Original title (Portuguese): O servidor que entrega sem ler
Watch on YouTube (opens YouTube, an external site)
Ep. 4Cryptography is not one thing: it is 4 toolsHash, symmetric key, key pair and signature: what each one solves.
Original title (Portuguese): Criptografia não é uma coisa só: são 4 ferramentas
Watch on YouTube (opens YouTube, an external site)
Ep. 5The app has a padlock, so the server reads nothing?The padlock (TLS) protects the path to the server; what the server sees depends on end-to-end encryption, and metadata still shows.
Original title (Portuguese): Tem cadeado no app, então o servidor não lê nada?
Watch on YouTube (opens YouTube, an external site)
Ep. 6Who first encrypted messages? It depends on the criterion"The first" depends on the question: e-mail, instant messaging, new keys per message, or scale. Each milestone has a source.
Original title (Portuguese): Quem criptografou mensagens pela primeira vez? Depende do critério
Watch on YouTube (opens YouTube, an external site)
Ep. 7Your chat is encrypted. What if the intruder swapped the key?Encryption is not enough if the key that arrived is the intruder's. The man-in-the-middle attack, and the defense of comparing a seal of the keys over another channel.
Original title (Portuguese): Sua conversa é cifrada. E se o intruso trocou a chave?
Watch on YouTube (opens YouTube, an external site)
Ep. 8Message encrypted, but is your routine still exposed?Encrypting the content does not hide who talked to whom, when and how much. Purpose and necessity (Brazil's data protection law, LGPD): keeping the minimum reduces the trail, but does not erase it.
Original title (Portuguese): Cifrou a mensagem, mas a sua rotina continua à mostra?
Watch on YouTube (opens YouTube, an external site)
- Ep. 9Coming soon
No date set.
Content map of the examples
Each episode has a code example on GitHub (Gist). Here is the list, by episode and by concept. The code is not copied to this page: the link goes to the original example.
Ep. 1: Social network map and queue-based feed
Concept: The six parts of a social network
A text diagram of the six parts and a small example of a feed built through a queue.
See the example on GitHub (opens GitHub, an external site)
Ep. 2: Graph search
Concept: Social graph and shortest path
Breadth-first search with a hop limit, and mutual friends as a set intersection.
See the example on GitHub (opens GitHub, an external site)
Ep. 3: Blind server
Concept: Blind server and client-side encryption
A server that only stores and delivers encrypted bytes, and a client that encrypts before sending.
See the example on GitHub (opens GitHub, an external site)
Ep. 4: Four cryptography tools
Concept: Symmetric, key pair, hash and signature
Hash, key exchange, authenticated symmetric encryption and a digital signature in one short example.
See the example on GitHub (opens GitHub, an external site)
Ep. 5: Parcel depot with and without a seal
Concept: Padlock (TLS), end-to-end and metadata
A toy analogy: without a seal the depot sees the contents; with a seal, it only sees who sent it and to whom.
See the example on GitHub (opens GitHub, an external site)
Ep. 6: Timeline, from PGP to Signal
Concept: From e-mail to protocol: PGP, OTR, Signal and WhatsApp
The milestones of message encryption, each with a date and a source; no code.
See the example on GitHub (opens GitHub, an external site)
Ep. 7: Toy seal against the man in the middle
Concept: Man in the middle: verify the key, not just the channel
Two sides compute a seal of the keys they received and compare it over another channel; insecure on purpose, only for learning.
See the example on GitHub (opens GitHub, an external site)
These are hypothetical teaching examples, simplified, in dependency-free Node.js, and are not production code. MIT license.
Where to follow
- YouTube channel (opens YouTube, an external site)
- TikTok profile (@condedis) (opens TikTok, an external site)