Connect with Amin Boulouma Official
In an era dominated by sprawling package dependency trees and heavy vendor abstractions, modern software engineering has increasingly detached itself from the foundational primitives of computer science. We install frameworks before we understand their protocols. We deploy machine learning libraries before we grasp their linear algebra engines.
To bridge this educational and structural gap, the AI Systems Design From Scratch project introduces a rigorous architectural standard: building complex distributed systems, cloud infrastructure, and artificial intelligence models from absolute first principles.
The core philosophy of this initiative is grounded in a famous observation by Richard Feynman:
What I cannot create, I do not understand.
To force authentic, systems-level learning, this ecosystem enforces a strict zero-reliance policy on external packages.
requirements.txt, Pipfile, or pyproject.toml manifests containing third-party code.By stripping away modern framework abstractions, engineers are forced to interface directly with low-level kernel abstractions, memory buffers, network adapters, and mathematical operations.
The architecture operates entirely out of the root application directory: src/. The framework splits operational responsibilities across distinct engineering domains, balancing core infrastructure utilities with advanced computing engines.
Instead of treating communication channels as a magic box wrapped by third-party protocols, the project constructs application layers directly out of raw network sockets.
py_socket_server.py & py_socket_client.py: Manage low-level transport stream descriptors, network bindings, and full-duplex TCP/IP synchronization maps.py_REST_API.py & py_REST_API_CLI_client.py: An HTTP/1.1-compliant parsing engine and routing layer that manually tokenizes incoming request streams and encodes standard wire frames.Rather than importing pre-built production databases, the project mimics storage engines using standard-library structures to model memory layouts and access patterns.
py_redis.py: An in-memory, key-value tracking matrix featuring single-threaded lookup cycles.py_sql_engine.py: A relational gateway emulation mapping statement parameters, transaction scopes, and query lifecycles.py_container_manager.py: Simulates core container runtime engine behavior, modeling process namespace isolation mechanisms and container states.py_airflow.py: A Directed Acyclic Graph (DAG) task compiler and scheduler loop that orchestrates asynchronous job states.Because the platform maintains zero dependencies, initializing and stress-testing the architecture requires no external library provisioning.
git clone https://github.com/aminblm/ai_systems_design_from_scratch.git
cd ai_systems_design_from_scratch
Run any core architecture subsystem directly from the command line interface:
# Boot the in-memory data store daemon
python3 src/py_redis.py
# Spin up the DAG workflow engine
python3 src/py_airflow.py
# Initialize the first-principles REST API framework
python3 src/py_REST_API.py
The platform currently logs 17 fully realized system modules out of a target matrix tracking 71 distinct technologies. To transition this framework into a highly resilient cloud emulation workspace, current development cycles prioritize the following upcoming milestones:
py_container_manager.py) to leverage more granular system-level process gates.This repository is built for hands-on software engineers, infrastructure architects, and machine learning scientists who learn best by writing raw code and peeling back framework layers. Contributions are vital to pushing this blueprint toward total completeness. Review the system architectural matrix, audit existing connection blocks for edge-case failures, or propose a new low-level standard library primitive implementation by checking out the main development branch.