{"id":34867161,"url":"https://github.com/fajarnugraha37/metadrama","last_synced_at":"2026-04-22T11:08:24.724Z","repository":{"id":323964511,"uuid":"1094441686","full_name":"fajarnugraha37/metadrama","owner":"fajarnugraha37","description":"Metadrama brings aspect-oriented programming and compile-time macros to Bun, Node.js, and Vite projects with an SWC-first transform pipeline.","archived":false,"fork":false,"pushed_at":"2025-11-13T13:45:01.000Z","size":248,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-16T17:43:53.977Z","etag":null,"topics":["aop","aspect-oriented-programming","code-generator","codegen","codegenerator","compile-time","compiler","javascript","meta-programming","metaprogramming","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fajarnugraha37.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-11T17:56:15.000Z","updated_at":"2025-11-13T05:00:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/fajarnugraha37/metadrama","commit_stats":null,"previous_names":["fajarnugraha37/metadrama"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fajarnugraha37/metadrama","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fajarnugraha37%2Fmetadrama","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fajarnugraha37%2Fmetadrama/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fajarnugraha37%2Fmetadrama/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fajarnugraha37%2Fmetadrama/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fajarnugraha37","download_url":"https://codeload.github.com/fajarnugraha37/metadrama/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fajarnugraha37%2Fmetadrama/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32132999,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T08:34:57.708Z","status":"ssl_error","status_checked_at":"2026-04-22T08:34:55.583Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aop","aspect-oriented-programming","code-generator","codegen","codegenerator","compile-time","compiler","javascript","meta-programming","metaprogramming","typescript"],"created_at":"2025-12-25T22:39:17.974Z","updated_at":"2026-04-22T11:08:19.712Z","avatar_url":"https://github.com/fajarnugraha37.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🎭 MetaDrama\n\n\u003e _\"When your code needs more drama than your personal life\"_\n\nMetaDrama is the aspect-oriented programming framework for developers who think decorators are cool but wish they could do more than just look pretty. Think of it as giving your TypeScript superpowers, but without the radioactive spider bite.\n\nInspired by the elegance of C macros (but safer), the power of C++ templates (but comprehensible), the flexibility of Rust macros (but less intimidating), and the magic of Zig's comptime (but with semicolons), MetaDrama brings compile-time transformations to the JavaScript ecosystem because apparently we needed another way to make our build process more complex.\n\n_Disclaimer: Side effects may include increased productivity, cleaner code architecture, and the sudden urge to add aspects to everything. Use responsibly._\n\n## 📦 Installation\n\nBecause apparently we can't just copy-paste code anymore:\n\n```bash\n# If you're team Bun (the cool kids)\nbun install @fajarnugraha37/metadrama\n\n# If you're still using npm (we don't judge... much)\nnpm install @fajarnugraha37/metadrama\n\n# If yarn is your jam\nyarn add @fajarnugraha37/metadrama\n\n# If you're using pnpm (respect!)\npnpm add @fajarnugraha37/metadrama\n```\n\n\u003e **Fun fact**: The package weighs less than your average node_modules folder, but delivers more punch than a caffeinated developer on Monday morning.\n\n## 🤔 Why This Library?\n\nGreat question! Here's why MetaDrama exists (other than the fact that we love making things unnecessarily complicated):\n\n### 🎯 **Separation of Concerns, Actually**\n\n- Tired of sprinkling `console.log` everywhere like confetti? Use aspects.\n- Sick of copy-pasting the same try-catch blocks? We got you.\n- Want to add caching without turning your business logic into spaghetti? Say no more.\n\n### 🚀 **Compile-Time Magic** _(Coming in v0.2.0)_\n\n- ⚠️ **Current**: Has runtime overhead (TypeScript decorators + reflection)\n- 🎯 **Target**: True zero runtime overhead (pure code generation)\n- Transform your code at build time like a responsible adult\n- Type-safe transformations because `any` is not a type, Karen\n\n### 🎪 **For the Drama**\n\n- Your code deserves to be as dramatic as your coding sessions at 3 AM\n- Aspect-oriented programming sounds way cooler than \"adding logging everywhere\"\n- Because sometimes you need to weave magic into mundane methods\n\n### 🛠️ **Developer Experience That Doesn't Suck**\n\n- IntelliSense that actually works (revolutionary, we know)\n- Error messages that explain what went wrong instead of just judging you\n- Playground for testing ideas without breaking everything\n\n## 🔮 Features (aka \"What Makes Us Special\")\n\n### 🎭 **Compile-Time Transformations**\n\nTransform your code before it hits the browser, because runtime is for runtime things, not compile-time things. Revolutionary concept, we know.\n\n### 🎯 **Pointcut Matching**\n\nTarget methods with surgical precision. Like a sniper, but for code. And less violent.\n\n### 🕸️ **Advice System**\n\nWrap your methods in before/after/around advice. It's like middleware, but for everything, everywhere, all at once.\n\n### ⚡ **Macro Expansion**\n\nBuilt-in macros for common patterns because writing the same code 47 times builds character, but we're not sadists.\n\n### 🔒 **TypeScript Integration**\n\nFull type safety because `TypeError: Cannot read property 'x' of undefined` is so 2019.\n\n### 🌍 **Multi-Platform Support**\n\nWorks with SWC, Vite, Bun, and TypeScript compiler. We're equal opportunity enablers.\n\n### 🏗️ **Architecture Rules**\n\nEnforce your team's coding standards automatically, because code reviews are for catching logic bugs, not arguing about naming conventions.\n\n### � Quick Start (Get Your Hands Dirty)\n\nBecause theory is boring and you want to see the magic happen:\n\n```typescript\n/** @meta */\nimport { pointcut, around, macro } from \"@fajarnugraha37/metadrama\";\n\n// Target all methods in classes decorated with @Service\nconst services = pointcut.classes.withDecorator(\"Service\").methods;\n\n// Add logging around service calls (because debugging is half the job)\naround(services)((ctx) =\u003e {\n  const start = performance.now();\n  console.log(`🚀 Starting ${ctx.targetName} with`, ctx.args);\n\n  const result = ctx.proceed(...ctx.args);\n\n  return ctx.wrap(result, (value) =\u003e {\n    const duration = performance.now() - start;\n    console.log(`✅ ${ctx.targetName} completed in ${duration.toFixed(2)}ms`);\n    return value;\n  });\n});\n\n// Add smart caching to getter methods (because network calls are expensive)\nmacro\n  .memoize({\n    ttlMs: 300_000, // 5 minutes\n    key: (...args) =\u003e `cache:${JSON.stringify(args)}`,\n  })\n  .applyTo(services.name(/^(get|fetch)/));\n\n// Add retry logic to external API calls (because the internet is unreliable)\nmacro\n  .retry({\n    max: 3,\n    backoff: \"exp\",\n    retryable: (error) =\u003e error.code !== \"AUTH_FAILED\",\n  })\n  .applyTo(pointcut.functions.name(/api/i));\n```\n\n### CLI Commands That Actually Work\n\n```bash\n# Compile your project with aspect weaving\nmetadrama build\n\n# Check your aspects and rules (like a linter, but smarter)\nmetadrama check\n\n# Open the playground (because testing is important)\nmetadrama playground\n\n# Pro tip: Target specific directories\nmetadrama build src/api packages/ui --outDir=dist\nmetadrama check src/services --explain MD1003\n```\n\n## 🧠 Core Concepts (The Important Stuff)\n\nUnderstanding these concepts will make you dangerous (in a good way):\n\n### 🎯 **Pointcuts**\n\nThink of these as CSS selectors, but for your code. Target specific classes, methods, or functions with surgical precision.\n\n```typescript\n// Target all service methods\npointcut.classes.withDecorator(\"Service\").methods;\n\n// Target async getter methods (because specificity matters)\npointcut.classes.methods.name(/^get/).async;\n\n// Target methods that match your weird naming conventions\npointcut.functions.where((fn) =\u003e fn.name.includes(\"Legacy\"));\n```\n\n### 🎭 **Aspects**\n\nThe advice you give to your code. Like a life coach, but for functions.\n\n- **`before`**: Execute before the method (validation, logging, setup)\n- **`after`**: Execute after the method (cleanup, metrics, notifications)\n- **`around`**: Wrap the entire method (caching, retries, transactions)\n\n### ⚡ **Macros**\n\nCompile-time code generation that eliminates boilerplate. Because life's too short to write the same pattern 47 times.\n\n- **`memoize`**: Intelligent caching with TTL and custom key generation\n- **`retry`**: Configurable retry logic with backoff strategies\n- **`trace`**: Performance monitoring and debugging\n- **`validate`**: Schema validation using TypeBox\n\n### 🏗️ **Transform Pipeline**\n\nYour code goes through a transformation journey:\n\n1. **Parse** - We read your aspects and pointcuts\n2. **Match** - Find target methods using your selectors\n3. **Transform** - Weave aspects into your code\n4. **Generate** - Emit transformed JavaScript/TypeScript\n\n## 📚 Usage Catalog (Your Recipe Book)\n\nDifferent flavors for different needs:\n\n### 🍰 **Sweet \u0026 Simple**\n\n```typescript\n// Basic logging aspect\nbefore(pointcut.classes.name(\"UserService\").methods)((ctx) =\u003e {\n  console.log(`Calling ${ctx.targetName}`, ctx.args);\n});\n```\n\n### 🌶️ **Spicy Advanced**\n\n```typescript\n// Advanced caching with custom logic\naround(pointcut.classes.methods.name(/^get/))((ctx) =\u003e {\n  const cacheKey = `${ctx.targetName}:${JSON.stringify(ctx.args)}`;\n  const cached = cache.get(cacheKey);\n\n  if (cached \u0026\u0026 !isStale(cached)) {\n    return cached.value;\n  }\n\n  const result = ctx.proceed(...ctx.args);\n  return ctx.wrap(result, (value) =\u003e {\n    cache.set(cacheKey, { value, timestamp: Date.now() });\n    return value;\n  });\n});\n```\n\n### 🔥 **Nuclear Option**\n\n```typescript\n// Transaction management with rollback\naround(pointcut.classes.withDecorator(\"Transactional\").methods)((ctx) =\u003e {\n  return withTransaction(async (tx) =\u003e {\n    try {\n      const result = await ctx.proceed(...ctx.args);\n      await tx.commit();\n      return result;\n    } catch (error) {\n      await tx.rollback();\n      throw error;\n    }\n  });\n});\n```\n\n## 🌍 Real World Scenarios\n\nBecause toy examples are cute, but real code pays the bills:\n\n### 🏢 **Enterprise API Gateway**\n\n```typescript\n// Rate limiting + auth + logging + metrics in 15 lines\nconst apiMethods = pointcut.classes.withDecorator(\"Controller\").methods;\n\nmacro.trace({ threshold: 1000 }).applyTo(apiMethods);\nmacro.retry({ max: 3, backoff: \"exp\" }).applyTo(apiMethods.name(/external/i));\n\nbefore(apiMethods)((ctx) =\u003e {\n  validateAuth(getCurrentUser());\n  enforceRateLimit(ctx.targetName);\n});\n```\n\n### 🛒 **E-commerce Service Layer**\n\n```typescript\n// Caching + validation + audit logging\nconst orderMethods = pointcut.classes.name(\"OrderService\").methods;\n\nmacro.memoize({ ttlMs: 60_000 }).applyTo(orderMethods.name(/^get/));\nmacro.validate({ schema: orderSchema }).applyTo(orderMethods.name(\"create\"));\n\nafter(orderMethods.name(/(create|update|delete)/))((ctx) =\u003e {\n  auditLogger.log({\n    action: ctx.targetName,\n    userId: getCurrentUser().id,\n    data: sanitize(ctx.args),\n  });\n});\n```\n\n### 📊 **Analytics Pipeline**\n\n```typescript\n// Performance monitoring + error tracking\nconst analyticsJobs = pointcut.classes.name(/Job$/).methods;\n\naround(analyticsJobs)((ctx) =\u003e {\n  const span = startSpan(ctx.targetName);\n\n  try {\n    const result = ctx.proceed(...ctx.args);\n    return ctx.wrap(result, (value) =\u003e {\n      span.setStatus(\"success\");\n      metrics.increment(`job.${ctx.targetName}.success`);\n      return value;\n    });\n  } catch (error) {\n    span.setStatus(\"error\", error.message);\n    metrics.increment(`job.${ctx.targetName}.error`);\n    throw error;\n  } finally {\n    span.end();\n  }\n});\n```\n\n## 👨‍🍳 Cookbook (Quick Wins)\n\nBite-sized solutions for common problems:\n\n### 🎯 **Method Performance Tracking**\n\n```typescript\nmacro\n  .trace({\n    threshold: 500,\n    logger: (msg, data) =\u003e data.duration \u003e 500 \u0026\u0026 console.warn(\"Slow!\", msg),\n  })\n  .applyTo(\n    pointcut.classes.methods.where((m) =\u003e m.decorators.includes(\"Critical\"))\n  );\n```\n\n### 🔄 **Smart Retry Logic**\n\n```typescript\nmacro\n  .retry({\n    max: 5,\n    backoff: \"exp\",\n    retryable: (error) =\u003e error.status \u003e= 500 || error.code === \"TIMEOUT\",\n  })\n  .applyTo(pointcut.functions.name(/fetch|api|http/i));\n```\n\n### 💾 **Intelligent Caching**\n\n```typescript\nmacro\n  .memoize({\n    ttlMs: 600_000, // 10 minutes\n    key: (userId, ...params) =\u003e `user:${userId}:${params.join(\":\")}`,\n    maxSize: 1000,\n  })\n  .applyTo(pointcut.classes.methods.name(/^(get|find|fetch)/));\n```\n\n### ✅ **Input Validation**\n\n```typescript\nimport { Type } from \"@sinclair/typebox\";\n\nmacro\n  .validate({\n    schema: Type.Object({\n      args: Type.Tuple([Type.String(), Type.Number()]),\n    }),\n  })\n  .applyTo(pointcut.functions.name(\"processPayment\"));\n```\n\n### 🔐 **Authorization Guards**\n\n```typescript\nbefore(pointcut.classes.methods.withDecorator(\"RequireAuth\"))((ctx) =\u003e {\n  const user = getCurrentUser();\n  if (!user || !hasPermission(user, ctx.targetName)) {\n    throw new UnauthorizedError(\"Access denied\");\n  }\n});\n```\n\n## 📖 API Reference\n\nComplete documentation for when you need the nitty-gritty details:\n\n### 🎯 **Core APIs**\n\n- **[Pointcuts](docs/api-reference.md#pointcutbuilder)** - Target selection with surgical precision\n- **[Advice](docs/api-reference.md#advice-functions)** - before/after/around method interception\n- **[Macros](docs/api-reference.md#macro-system)** - Compile-time code generation\n- **[CLI](docs/api-reference.md#cli-commands)** - Build, check, and playground commands\n\n### 🔧 **Type Definitions**\n\n- **[Core Types](docs/api-reference.md#core-types)** - TypeScript interfaces and type definitions\n- **[Context Objects](docs/api-reference.md#executioncontext)** - What you get in your advice functions\n- **[Diagnostic Codes](docs/api-reference.md#diagnostic-codes)** - Error codes and explanations\n\n### 🛠️ **Advanced APIs**\n\n- **[Registry](docs/api-reference.md#registry)** - Direct advice and macro management\n- **[Custom Transformers](docs/api-reference.md#custom-transformers)** - Build your own integrations\n- **[Plugin Development](docs/api-reference.md#plugin-development)** - Extend MetaDrama\n\n## 🚀 Future Roadmap (Where We're Going)\n\n_Inspired by decades of metaprogramming evolution across languages_\n\n### 🎯 **Near-Term Enhancements (Q1 2026)**\n\n#### 🧬 **Advanced Macro System**\n\n- **Procedural Macros**: Rust-style procedural macros for complex code generation\n- **Conditional Compilation**: Zig comptime-inspired conditional compilation directives\n- **Macro Composition**: Combine multiple macros with dependency resolution\n\n```typescript\n// Coming: Procedural macros\nmacro.procedural(\"benchmark\", (node) =\u003e {\n  return generateBenchmarkSuite(node, {\n    iterations: 1000,\n    warmup: 100,\n    profiles: [\"memory\", \"cpu\"],\n  });\n});\n\n// Coming: Conditional compilation\n#if(DEBUG);\nmacro.trace().applyTo(allMethods);\n#endif;\n\n#if(FEATURE_CACHE);\nmacro.memoize().applyTo(expensiveMethods);\n#endif;\n```\n\n#### 🎭 **Enhanced Pointcut Language**\n\n- **Pattern Matching**: More sophisticated pattern matching inspired by functional languages\n- **Temporal Logic**: Select methods based on call sequences and temporal relationships\n- **Dependency Analysis**: Target methods based on dependency graphs\n\n```typescript\n// Coming: Advanced pattern matching\npointcut.methods\n  .pattern(Pattern.sequence([\"validate\", \"transform\", \"save\"]))\n  .where((chain) =\u003e chain.every((m) =\u003e m.async));\n\n// Coming: Temporal pointcuts\npointcut\n  .callSequence()\n  .starts(methods.name(\"begin\"))\n  .followedBy(methods.name(/process/))\n  .endsWith(methods.name(\"commit\"));\n```\n\n### � **Medium-Term Vision (2026)**\n\n#### 🏗️ **Meta-Architecture System**\n\nDrawing from C++ template metaprogramming and advanced type-level programming:\n\n- **Architecture DSL**: Domain-specific language for describing system architectures\n- **Constraint Verification**: Compile-time verification of architectural constraints\n- **Pattern Enforcement**: Automatic enforcement of design patterns and principles\n\n```typescript\n// Coming: Architecture constraints\narchitecture({\n  layers: [\"ui\", \"service\", \"data\"],\n  rules: [\n    forbid(\"ui\").dependsOn(\"data\"),\n    require(\"service\").implements(Pattern.Repository),\n    enforce(layers.data).satisfies(ACID.properties),\n  ],\n});\n```\n\n#### ⚡ **Performance Metaprogramming**\n\nInspired by Zig's comptime performance analysis:\n\n- **Compile-Time Profiling**: Analyze performance characteristics at build time\n- **Automatic Optimization**: AI-driven code optimization based on usage patterns\n- **Memory Layout Control**: Fine-grained control over memory allocation patterns\n\n```typescript\n// Coming: Performance directives\n@comptime.optimize(\"memory\")\n@comptime.inline(conditions.hotPath)\n@comptime.vectorize(SIMD.auto)\nclass DataProcessor {\n  @comptime.profile({ budget: \"100ms\", critical: true })\n  async processLargeDataset(data: Float64Array) {}\n}\n```\n\n### 🌟 **Long-Term Ambitions (2027+)**\n\n#### 🧠 **AI-Assisted Metaprogramming**\n\n- **Intelligent Aspect Suggestion**: AI suggests aspects based on code patterns\n- **Automatic Performance Optimization**: ML-driven performance improvements\n- **Bug Prevention**: Proactive aspect generation to prevent common issues\n\n#### 🌍 **Cross-Language Integration**\n\n- **WASM Bridge**: Seamless integration with Rust/C++ libraries via WebAssembly\n- **Native Extensions**: C/Rust extensions for performance-critical paths\n- **Protocol Generation**: Automatic API/protocol generation across languages\n\n#### 🔮 **Quantum Metaprogramming** _(Because Why Not?)_\n\n- **Superposition Compilation**: Explore multiple compilation strategies simultaneously\n- **Entangled Aspects**: Aspects that affect each other across module boundaries\n- **Quantum Debugging**: Schrödinger's debugger - observe bugs without affecting them\n\n### 🎪 **The Meta-Meta Vision**\n\nUltimately, MetaDrama aims to become the **Lisp of the TypeScript world** - where the distinction between code and data, between program and program-generator, becomes beautifully blurred. We want to enable developers to think at the meta level, where:\n\n- **Code writes code** (but responsibly)\n- **Patterns become first-class citizens**\n- **Architecture is expressed declaratively**\n- **Performance is optimized automatically**\n- **Bugs are prevented before they exist**\n\n_\"The best code is the code you don't have to write, but still somehow did.\" - Ancient MetaDrama Proverb_\n\n---\n\n### 🤝 **Want to Help Shape the Future?**\n\nWe're always looking for fellow metaprogramming enthusiasts! Whether you're:\n\n- A C macro wizard who misses the power (but not the footguns)\n- A C++ template metaprogrammer who wants cleaner syntax\n- A Rust macro expert seeking new frontiers\n- A Zig comptime aficionado looking for broader adoption\n- Just someone who thinks code should be more dramatic\n\n**Join us!** Open an issue with your ideas, or better yet, submit a PR. Let's make metaprogramming accessible to mere mortals while keeping the power that makes it exciting.\n\n_\"The future of programming is meta, and the future is now... well, it's coming soon.\"_\n\n---\n\n## 📚 Documentation Hub\n\n- **[🚀 Getting Started](docs/getting-started.md)** - Your first steps with MetaDrama\n- **[🏗️ Architecture Deep Dive](docs/architecture.md)** - How the magic works under the hood\n- **[📖 Complete Usage Guide](docs/usage.md)** - Installation, configuration, and patterns\n- **[🧠 Compile-Time vs Runtime](docs/space.md)** - Understanding the transformation process\n- **[👨‍🍳 Recipe Collection](docs/recipes/index.md)** - Common patterns and solutions\n- **[🌍 Real-World Examples](docs/examples.md)** - Complete implementations\n- **[📖 API Reference](docs/api-reference.md)** - Complete API documentation\n\n---\n\n## 🛠️ Build Tool Integration\n\nMetaDrama plays nice with your existing tools:\n\n### TypeScript Compiler (ts-patch)\n\n```json\n{\n  \"compilerOptions\": {\n    \"plugins\": [{ \"transform\": \"@fajarnugraha37/metadrama/ts-patch\" }]\n  }\n}\n```\n\n### SWC\n\n```json\n{\n  \"jsc\": {\n    \"experimental\": {\n      \"plugins\": [[\"@fajarnugraha37/metadrama/swc\", {}]]\n    }\n  }\n}\n```\n\n### Vite\n\n```typescript\nimport { metadramaVitePlugin } from \"@fajarnugraha37/metadrama/vite\";\n\nexport default {\n  plugins: [metadramaVitePlugin()],\n};\n```\n\n### Bun\n\n```toml\n[build]\nplugins = [\"@fajarnugraha37/metadrama/bun-esbuild\"]\n```\n\n---\n\n## 🎯 Current Status\n\n_\"We don't say the P-word around here, but this thing is pretty solid\"_\n\n- ✅ **Core Framework** - Complete with comprehensive API\n- ✅ **TypeScript Integration** - Full ts-patch transformer (87% coverage)\n- ✅ **SWC Plugin** - Complete integration (95% coverage)\n- ✅ **Advice System** - Before/after/around with context preservation\n- ✅ **Macro System** - Memoize, retry, trace, validate macros\n- ✅ **Test Suite** - 32/32 tests passing (62% overall coverage)\n- ✅ **CLI Tools** - Build, check, and playground commands\n- ✅ **Multi-Platform** - Works across all major build tools\n- ✅ **Documentation** - Comprehensive guides and examples\n\n_It's stable enough for your side projects and sophisticated enough for your day job._\n\n---\n\n## 🤝 Contributing\n\nFound a bug? Want a feature? Think our jokes are terrible? We want to hear from you!\n\n1. **Check existing issues** - Maybe someone beat you to it\n2. **Open an issue** - Describe what you want or what's broken\n3. **Submit a PR** - Code speaks louder than words\n4. **Join discussions** - Share your metaprogramming war stories\n\n**Pro tip**: If you're contributing a new macro or aspect pattern, include tests and examples. Future developers will thank you (and so will we).\n\n---\n\n## 📄 License\n\nMIT License - Because sharing is caring, but attribution is nice.\n\nSee [LICENSE](LICENSE) for the boring legal stuff.\n\n---\n\n## 🙏 Acknowledgments\n\n_Standing on the shoulders of giants (and occasionally stepping on their toes)_\n\nInspired by the metaprogramming traditions of:\n\n- **C Macros** - For showing us the power (and the pain)\n- **C++ Templates** - For pushing the boundaries of what's possible\n- **Rust Macros** - For making metaprogramming approachable\n- **Zig Comptime** - For proving compile-time can be elegant\n- **Lisp** - For being meta before meta was cool\n\nSpecial thanks to the TypeScript team for making this kind of transformation possible, and to the SWC team for creating a fast, extensible parser that doesn't make us cry.\n\n## 🗺️ Roadmap to Zero Runtime Overhead\n\n### Current State (v0.1.0): ⚠️ Has Runtime Overhead\n\n```javascript\n// ❌ What we generate now (still has overhead)\nfunction _ts_decorate(decorators, target, key, desc) {\n  /* reflection */\n}\nimport { weaveFunction } from \"@fajarnugraha37/metadrama\"; // runtime import\nUserService = _ts_decorate([Service()], UserService); // runtime weaving\n```\n\n### Target State (v0.2.0): ✅ Zero Runtime Overhead\n\n```javascript\n// ✅ What we will generate (pure JavaScript)\nexport class UserService {\n  async getUser(id) {\n    // All aspect logic compiled directly in\n    const start = performance.now();\n    console.log(`🚀 Starting getUser`, [id]);\n\n    const result = await this.db.findById(id);\n\n    console.log(\n      `✅ getUser completed in ${(performance.now() - start).toFixed(2)}ms`\n    );\n    return result;\n  }\n}\n// No imports, No decorators, No reflection, No runtime overhead\n```\n\n### 🎯 **Phase 5 Goals (Q1-Q2 2025)**\n\n- [ ] **Pure Code Generation**: Eliminate all runtime imports and reflection\n- [ ] **Compile-time Markers**: Replace `@decorators` with `/** @metadrama */` comments\n- [ ] **Inline Everything**: Aspects and macros compiled directly into methods\n- [ ] **Performance Parity**: Generated code matches hand-written performance\n- [ ] **Bundle Size**: Zero MetaDrama footprint in production builds\n\n### 📋 **Detailed Planning Documents**\n\n- [**ROADMAP.md**](./ROADMAP.md) - Updated roadmap with Phase 5 zero runtime goals\n- [**docs/zero-runtime-plan.md**](./docs/zero-runtime-plan.md) - Complete technical implementation plan\n- [**docs/zero-runtime-tasks.md**](./docs/zero-runtime-tasks.md) - Detailed task breakdown and tracking\n- [**docs/before_after.md**](./docs/before_after.md) - Current vs target transformation examples\n\n---\n\n_\"Remember: With great metaprogramming power comes great debugging responsibility.\"_ 🕷️\n\n---\n\n**Made with ☕ and 🎭 by developers who think regular programming isn't dramatic enough.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffajarnugraha37%2Fmetadrama","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffajarnugraha37%2Fmetadrama","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffajarnugraha37%2Fmetadrama/lists"}