Hello everyone! After shipping my latest project, I realized a glaring issue with how most independent researchers and indie hackers handle data engineering for machine learning: trusting raw, unverified datasets in training loops.
To solve this, I built Alrithm API (alrithmapi.vercel.app)—a plug-and-play system designed to stream clean structural datasets into AI pipelines with cryptographic integrity, built with a \$0 budget and 100% AI-generated code.
The Architecture: Row-Level Merkle Root Verification
The platform hashes each data schema asset and embeds a Merkle Root verification directly into the structure to detect tampering or data corruption mid-transit.
Here is the Python implementation to consume the API and verify data integrity:
import requests
import hashlib
import json
def calculate_leaf_hash(row_data):
serialized_data = json.dumps(row_data, sort_keys=True)
return hashlib.sha256(serialized_data.encode('utf-8')).hexdigest()
def verify_row_integrity(row_data, expected_merkle_root):
calculated_hash = calculate_leaf_hash(row_data)
return calculated_hash == expected_merkle_root
API_ENDPOINT = "https://alrithmapi.vercel.app/api/v1/datasets"
try:
response = requests.get(API_ENDPOINT, timeout=10)
if response.status_code == 200:
dataset = response.json()
for index, row in enumerate(dataset):
if not verify_row_integrity(row['data'], row['merkle_root']):
raise ValueError(f"CRITICAL: Tampering detected at row {index}!")
print("🔒 All rows verified successfully.")
else:
print(f"Failed to fetch data. Status code: {response.status_code}")
except Exception as e:
print(f"Pipeline stopped: {str(e)}")
Operating a 100% AI Codebase with $0 Budget
By letting AI write the code, my role shifted to System Architect, utilizing serverless Vercel setups to maintain zero infrastructure costs while planning native Ethereum wallet compatibility via MetaMask.
Tear it Apart!
Check out the live platform at alrithmapi.vercel.app and share your feedback or critique in the comments!
Top comments (0)