LearningSea
This blog was created by me, Leonardo, in March 2026.
The goal is to document my learning journey and programming experiments in chronological order. Beyond serving as a record of my progress, writing about the topics I study also helps me consolidate newly learned concepts.
However, in July of this year, the project was completely rebuilt from scratch using Ruby on Rails. The new blog is available at xyz-leo blog.
Source Code
All the source code for this blog is open source and can be found on my GitHub: xyz-leo/learningsea-blog.
The proposal is for the entire application to be configured and run using a single command:
docker compose up --build -d. Once executed, the environment will be fully functional.
Stack
- Infrastructure: Docker
- Language: Python
- Database: PostgreSQL
-
Framework: Django
-
Application server: Gunicorn
-
Web server (reverse proxy): Caddy
-
Frontend: Tailwind CSS and Django Templates
Supporting components
-
Content editing: Summernote and Markdown
-
Security: Django Axes, Django middleware, and Bleach
-
Media processing: Pillow
-
Static files: Caddy and WhiteNoise
Code blocks
Below are some examples of code blocks.
Python — Depth-First Search (DFS)
from collections import defaultdict
class Graph:
def __init__(self):
self.graph = defaultdict(list)
def add_edge(self, source, target):
self.graph[source].append(target)
def dfs(self, start):
visited = set()
def visit(node):
if node in visited:
return
visited.add(node)
print(node)
for neighbor in self.graph[node]:
visit(neighbor)
visit(start)
graph = Graph()
graph.add_edge("A", "B")
graph.add_edge("A", "C")
graph.add_edge("B", "D")
graph.add_edge("C", "E")
graph.add_edge("E", "F")
graph.dfs("A")
Docker Compose
services:
web:
image: nginx:latest
container_name: learningsea-web
ports:
- "8080:80"
volumes:
- ./public:/usr/share/nginx/html:ro
restart: unless-stopped
api:
build:
context: .
dockerfile: Dockerfile
environment:
APP_ENV: production
DATABASE_URL: postgres://postgres:postgres@db:5432/app
depends_on:
- db
db:
image: postgres:17
environment:
POSTGRES_DB: app
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data:
C — atoi
#include <ctype.h>
int my_atoi(const char *str) {
while (isspace((unsigned char)*str)) {
str++;
}
int sign = 1;
if (*str == '+' || *str == '-') {
if (*str == '-') {
sign = -1;
}
str++;
}
int result = 0;
while (isdigit((unsigned char)*str)) {
result = result * 10 + (*str - '0');
str++;
}
return sign * result;
}
Images
Favicon
![]()
Table of contents (mobile)
Marginalia
Certain terms are accompanied by marginalia. Click a highlighted word to reveal its meaning without interrupting your reading.
Desktop

Mobile

Final considerations
This was the first project I developed to solve a real-world problem, as well as the first one I deployed on my own server. Over months of use, I identified various areas for improvement — aspects I hadn't yet gained the knowledge or experience to recognize during the initial development phase.
Many of these improvements were incorporated into the new version of this blog, mentioned at the beginning of this post: the xyz-leo blog.
Ultimately, I learned a great deal about full-stack application development, covering everything from database modeling and backend implementation to building the user interface and handling deployment. The experience gained throughout the project was more important than the final result itself. It was during this process that I truly understood the practical importance of writing organized code, designing a sustainable architecture, and planning for long-term application maintenance.
Although I can now see several decisions I would make differently, this project was a significant milestone in my journey. It served not only to solve a real-world problem but also as an opportunity for continuous learning, with lessons that were applied to the new version of this blog.
