# Where do/should Gateway Scripts live with respect to an inherited project structure?

**URL:** <https://forum.inductiveautomation.com/t/where-do-should-gateway-scripts-live-with-respect-to-an-inherited-project-structure/83460>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [December 22, 2023, 4:39am UTC](https://forum.inductiveautomation.com/t/where-do-should-gateway-scripts-live-with-respect-to-an-inherited-project-structure/83460 "2023-12-22T04:39:57Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 27, 2023, 11:22pm UTC](https://forum.inductiveautomation.com/t/where-do-should-gateway-scripts-live-with-respect-to-an-inherited-project-structure/83460/15 "2023-12-27T23:22:21Z")

</div>

> [@sherman](#):
>
> In general, I feel that if I have to copy-paste a function into a bunch of different places

That just means there should be function in your "universe" project that does this work, and your message handlers in your leaf nodes would be just one-liners. 🤷‍♂️

> [@sherman](#):
>
> Did I mention I would really love for this to be a system command?

Write a module. Modules can declare any desired RPC they like.

_Edit September 2025:_

> [@sherman](#):
>
> What if callback is a path to a script in the project library specified?

I suppose this is the right place to mention that my Integration Toolkit's `@system.util.runInGateway` decorator basically achieves this goal. You simply annotate the library function and any calls from client/designer scope will silently marshal the arguments and unmarshal the return value.

---

_[View the full topic](https://forum.inductiveautomation.com/t/where-do-should-gateway-scripts-live-with-respect-to-an-inherited-project-structure/83460)._
