|
| 1 | +--- |
| 2 | +title: Build and Deploy an iApp? |
| 3 | +description: |
| 4 | + How to build an confidential iexec application and deploy it on iexec protocol |
| 5 | +--- |
| 6 | + |
| 7 | +## iApp Generator: Your Development Tool |
| 8 | + |
| 9 | +Bootstrap TEE-compatible applications in minutes without any hardcoding skills, |
| 10 | +iApp Generator handles all the low-level complexity for you. |
| 11 | + |
| 12 | +- **Access to TEEs easily** - No need to dive into low-level requirements, build |
| 13 | + iApps that connect to TEEs in minutes. |
| 14 | +- **Check and deploy iApps quickly** - iApp Generator checks that your iApp |
| 15 | + complies with the iExec Framework and streamlines its deployment. |
| 16 | +- **Select your project mode & language** - Get started with either a basic or |
| 17 | + advanced setup, depending on your experience with the iExec framework. You can |
| 18 | + use Python or JavaScript—whichever you prefer! |
| 19 | + |
| 20 | +```bash |
| 21 | +# Create your iApp (Python or Node.js supported) |
| 22 | +iapp init my-privacy-app |
| 23 | +cd my-privacy-app |
| 24 | + |
| 25 | +# Develop and test locally (simulates TEE environment) |
| 26 | +iapp test |
| 27 | +# Deploy to the network |
| 28 | +iapp deploy |
| 29 | +``` |
| 30 | + |
| 31 | +<div class="bg-gradient-to-r from-blue-400/10 to-blue-400/5 rounded-[6px] p-4 border-l-4 border-blue-600 mb-6"> |
| 32 | + <p class="m-0! text-sm"><strong>Note:</strong> iApp Generator currently supports Python and Node.js, but iApps can be built in any language that runs in Docker.</p> |
| 33 | +</div> |
| 34 | + |
| 35 | +## Real Examples |
| 36 | + |
| 37 | +Here are some real-world examples of iApps to help you understand how they work |
| 38 | +in practice. |
| 39 | + |
| 40 | +**Email Notification iApp** |
| 41 | + |
| 42 | +This iApp lets you send updates to your contacts without ever seeing their email |
| 43 | +addresses, privacy is preserved by design. |
| 44 | + |
| 45 | +::: code-group |
| 46 | + |
| 47 | +```python [Python] |
| 48 | +# User runs: "Send updates to my contacts about my project" |
| 49 | +contacts = load_protecteddata() # User's protected contact list |
| 50 | +for contact in contacts: |
| 51 | + send_email(contact, project_update_message) |
| 52 | +# → Emails sent directly, you never see the addresses |
| 53 | +``` |
| 54 | + |
| 55 | +```js [Node.js] |
| 56 | +/* User runs: "Send updates to my contacts about my project" */ |
| 57 | +const contacts = loadProtectedData(); // User's protected contact list |
| 58 | +contacts.forEach((contact) => { |
| 59 | + sendEmail(contact, projectUpdateMessage); |
| 60 | +}); |
| 61 | +// → Emails sent directly, you never see the addresses |
| 62 | +``` |
| 63 | + |
| 64 | +::: |
| 65 | + |
| 66 | +**Oracle Update iApp** |
| 67 | + |
| 68 | +This iApp securely updates a price oracle using private trading data, ensuring |
| 69 | +sensitive information stays confidential. |
| 70 | + |
| 71 | +::: code-group |
| 72 | + |
| 73 | +```python [Python] |
| 74 | +# User runs: "Update price oracle with my private trading data" |
| 75 | +trading_data = load_protecteddata() # User's protected trading history |
| 76 | +average_price = calculate_weighted_average(trading_data) |
| 77 | +update_oracle_contract(average_price) |
| 78 | +# → Oracle updated with real data, trading history stays private |
| 79 | +``` |
| 80 | + |
| 81 | +```js [Node.js] |
| 82 | +/* User runs: "Update price oracle with my private trading data" */ |
| 83 | +const tradingData = loadProtectedData(); // User's protected trading history |
| 84 | +const averagePrice = calculateWeightedAverage(tradingData); |
| 85 | +updateOracleContract(averagePrice); |
| 86 | +// → Oracle updated with real data, trading history stays private |
| 87 | +``` |
| 88 | + |
| 89 | +::: |
| 90 | + |
| 91 | +**Automated Transactions iApp** |
| 92 | + |
| 93 | +This iApp automates monthly payments using protected payment details, so |
| 94 | +financial information remains private. |
| 95 | + |
| 96 | +::: code-group |
| 97 | + |
| 98 | +```python [Python] |
| 99 | +# User runs: "Automate payments every month" |
| 100 | +payment_info = load_protecteddata() # User's payment details |
| 101 | +for month in range(12): |
| 102 | + process_payment(payment_info) |
| 103 | +# → Payments processed, payment details stay private |
| 104 | +``` |
| 105 | + |
| 106 | +```js [Node.js] |
| 107 | +/* User runs: "Automate payments every month" */ |
| 108 | +const paymentInfo = loadProtectedData(); // User's payment details |
| 109 | +for (let month = 0; month < 12; month++) { |
| 110 | + processPayment(paymentInfo); |
| 111 | +} |
| 112 | +// → Payments processed, payment details stay private |
| 113 | +``` |
| 114 | + |
| 115 | +::: |
0 commit comments