MadiLang transforms human-readable intent into production-ready, secure, and sovereign backend systems. Describe what you want ā MadiLang generates the rest with cryptographic proof of origin and deterministic reproducibility.
⨠Get Started ⢠š Wiki ⢠𩺠madi doctor ⢠𧬠Philosophy ⢠š¤ Contribute ⢠š¬ Discussions
In a world of boilerplate, complexity, and hidden logic, MadiLang restores clarity, sovereignty, and trust.
| Dimension | Traditional Development | MadiLang |
|---|---|---|
| š§ Abstraction | Write implementation details | Describe intent |
| š Provenance | Manual audit trails | Cryptographic signature in every artifact |
| š”ļø Security | Add as afterthought | Security & ethics by default |
| š± Accessibility | Requires full IDE/PC | Mobile-first ā develop on Termux/phone |
| ā” Boilerplate | Repetitive setup code | Zero boilerplate ā generated automatically |
| š Extensibility | Modify core or fork | Plugin system ā extend without touching core |
| š Targets | Single language per project | Multi-target ā Node.js + Python (FastAPI) |
| 𩺠Diagnostics | Manual debugging | madi doctor ā instant environment health check |
| š Reproducibility | Environment-dependent builds | Deterministic ā byte-for-byte identical outputs |
š MadiLang is not just a tool. It's a declaration: Human intent is the sovereign layer.
entity: User
fields:
- name: string
- email: string (unique)
- password: string (secure)
- createdAt: datetime (auto)
intent: register_user
route: "/api/signup"
method: POST
inputs: (name, email, password)
steps:
find User by email as existing_user
if existing_user:
show error "Email already exists"
stop process
create User
generate token
return success with token
madi run auth.madi --target nodejs # Node.js + Express madi run auth.madi --target python # Python + FastAPI
š¢ Node.js / Express Output
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā // š MadiLang Sovereign Intent Signature // āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā const __MADI_SIGNATURE__ = { "developer": { "id": "madani004" }, "intent": { "hash": "a3f8c2...", "fingerprint": "7d9e1b..." }, "timestamp": { "iso": "2026-11-04T00:00:00Z" }, "ethics": { "score": 0.95, "passed": true }, "signature": { "algorithm": "SHA256-HMAC", "value": "..." } }; // āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā app.post('/api/signup', validateInputs(['name','email','password']), async (req, res) => { const existing_user = await prisma.user.findUnique({ where: { email: req.body.email } }); if (existing_user) return res.status(400).json({ error: "Email already exists" }); const result = await prisma.user.create({ data: { name: req.body.name, email: req.body.email, password: await bcrypt.hash(req.body.password, 10) } }); const token = jwt.sign({ id: result.id }, process.env.JWT_SECRET, { expiresIn: '7d' }); return res.status(200).json({ success: true, token }); });
š Python / FastAPI Output
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā # š MadiLang Sovereign Intent Signature # āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā __MADI_SIGNATURE__ = { "developer": {"id": "madani004"}, "intent": {"hash": "a3f8c2...", "fingerprint": "7d9e1b..."}, "timestamp": {"iso": "2026-11-04T00:00:00Z"}, "ethics": {"score": 0.95, "passed": True}, "signature": {"algorithm": "SHA256-HMAC", "value": "..."} } # āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā from fastapi import FastAPI, HTTPException from pydantic import BaseModel app = FastAPI(title="MadiLang Sovereign Backend") class RegisterUserInput(BaseModel): name: str email: str password: str @app.post("/api/signup") async def register_user(data: RegisterUserInput): existing = await db.user.find(email=data.email) if existing: raise HTTPException(status_code=400, detail="Email already exists") result = await db.user.create(name=data.name, email=data.email, password=hash_password(data.password)) token = generate_token(result["id"]) return {"success": True, "token": token}
ā Secure by default: Password hashing, input validation, error handling, JWT generation. š Sovereign by design: Every file carries a verifiable signature binding it to the original intent.
Compile .madi source files to target code without execution. This is the foundational step for CI/CD pipelines and reproducible builds.
madi build src/main.madi --target python --output dist/
Added .gitattributes to enforce LF line endings globally, guaranteeing byte-for-byte hash consistency across Windows, macOS, and Linux. Preparation for the upcoming --reproducible flag.
SPEC.mdv1.0: Elevated from draft to authoritative specification, including explicit "Sovereign Guarantees" for cryptographic identity and escape hatches.ROADMAP.mdv1.0: Restructured for professional clarity with strict exit criteria for each phase.
MadiLang is designed to run anywhere Python runs ā including your smartphone. No heavy IDE. No powerful PC. Just intent and sovereignty.
# 1. Install dependencies pkg update && pkg install python nodejs git # 2. Clone repository git clone https://github.com/madanimkhitar22-beep/madilang.git cd madilang # 3. Install in editable mode pip install -e . # 4. Verify installation madi --version # š§ MadiLang v0.6.0 ā Sovereign Intent Compiler # 5. Diagnose environment madi doctor # 6. Initialize and build madi init my-backend cd my-backend madi build src/main.madi --target python --output dist/
š” Democratizing development: Build sovereign backends from anywhere, even a smartphone.
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā š§ MadiLang Sovereign Compiler Pipeline ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā ā
ā š Source (.madi) ā
ā ā ā
ā š Parser (Recursive Descent) ā AST ā
ā ā ā
ā š Analyzer (Semantic Validation + Ethics Enrichment) ā
ā ā ā
ā š IntentSignature (Cryptographic Binding + Provenance) ā
ā ā ā
ā āļø StepCompiler ā IR (Language-Agnostic Intermediate Representation) ā
ā ā ā
ā š§© Plugin Hooks (Ethics, Security, Custom Transformers) ā
ā ā ā
ā šļø CodeGenerator ā Target Code ā
ā āāā š¢ Node.js / Express / Prisma ā
ā āāā š Python / FastAPI / Pydantic ā
ā āāā š¦ Go / Fiber (planned) ā
ā ā ā
ā š¤ Output + Embedded Signature + Hybrid Adapter + Runtime Verification ā
ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Every artifact generated by MadiLang carries a cryptographic signature that proves:
- š¤ Who authored the original intent
- š What the intent was (source hash)
- š When it was generated
- š”ļø Whether it passed ethical review
- ā Integrity ā any modification breaks verification
madi verify dist/output.py # ā Signature structure valid # š¤ Developer: madani004 # š Generated: 2026-11-04T00:00:00Z # š Intent Hash: a3f8c2... # š”ļø Ethics Score: 0.95
| Check | Description |
|---|---|
| š Secure Fields | Fields marked (secure) are automatically hashed with bcrypt |
| š Auth Coverage | Sensitive routes require authentication protection |
| š¤ Role Guards | Admin operations enforce role-based access control |
| š« Injection Prevention | Input validation generated for all inputs |
| Generic error messages prevent data leakage | |
| š§ Ethics Scoring | Privacy, consent, transparency, accountability, fairness |
madi check auth.madi # ā Analysis passed # Entities: 1 # Intents: 2
# Initialize new project madi init my-project # Compile and run (Node.js or Python) madi run src/main.madi --target nodejs madi run src/main.madi --target python # Build without running (NEW in v0.6.0) madi build src/main.madi --target python --output dist/ # Verify sovereign signature madi verify dist/output.py # Analyze and validate source madi check src/main.madi # Diagnose environment madi doctor # Show version madi --version
pip install madilang
madi doctor # Verify your environmentgit clone https://github.com/madanimkhitar22-beep/madilang.git cd madilang pip install -e . madi doctor
- Python 3.8+ (3.13 supported ā )
- Node.js 18+ (for Node.js target)
- npm (for auto-dependency installation)
MadiLang is built on the Mkhitarian Ontology:
Human intent is the sovereign layer. Code is merely the execution of will. Ethics and security are not features ā they are foundations.
- Mkhitarian Philosophy ā The philosophical foundation
- Sovereign-DevKit ā Security scanning toolkit
š Join the Discussions
git clone https://github.com/madanimkhitar22-beep/madilang.git cd madilang pip install -e ".[dev]" pytest tests/ -v ruff check .
- Code of Conduct
- Security Policy
- License ā MIT
See CHANGELOG.md for detailed release notes.
- š Reproducibility Flag:
madi build --reproducibleproducing byte-identical outputs with.sigsidecar files. - š Cryptographic Maturity: Transition from HMAC-SHA256 to Ed25519 for non-repudiable signatures.
- š”ļø Security Hook: Wire
security_hookwith deep data-flow analysis (beyond keyword matching). - š Auto-Documentation: OpenAPI/Swagger generation directly from
.madiintents.
- š¦ Go/Fiber Generator: Multi-language parity.
- šØ Full LSP Support: VSCode extension with real-time diagnostics and autocomplete.
- š Ecosystem: Community plugin registry and decentralized deployment integrations.
- ā Definition of Done: Two stable targets, 100% reproducible builds, verified cryptographic chain, and a working escape hatch.
cff-version: 1.2.0 title: "MadiLang" authors: - family-names: "El Mkhitar" given-names: "El Madani" email: "[email protected]" version: "0.6.0" date-released: 2026-11-04 license: "MIT" repository-code: "https://github.com/madanimkhitar22-beep/madilang"
El Madani El Mkhitar š§ [email protected] š GitHub Profile
"Building sovereign tools for a decentralized future, one intent at a time."