# Cheat Sheet to create an Infinito.Nexus web-\* role with AI

**URL:** https://hub.infinito.nexus/t/cheat-sheet-to-create-an-infinito-nexus-web-role-with-ai/455
**Category:** AI
**Created:** [March 17, 2026, 12:23pm UTC](https://hub.infinito.nexus/t/cheat-sheet-to-create-an-infinito-nexus-web-role-with-ai/455 "2026-03-17T12:23:20Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![kevinveenbirkenbach](https://hub.infinito.nexus/user_avatar/hub.infinito.nexus/kevinveenbirkenbach/32/7_2.png) [@kevinveenbirkenbach](https://hub.infinito.nexus/u/kevinveenbirkenbach)
#### Post date: [March 17, 2026, 12:23pm UTC](https://hub.infinito.nexus/t/cheat-sheet-to-create-an-infinito-nexus-web-role-with-ai/455/1 "2026-03-17T12:23:20Z")

</div>

This guide helps you efficiently create new `web-app` roles within the Infinito.Nexus ecosystem using a structured, iterative approach.

The goal is to stay fast, consistent, and maintainable by:

- leveraging proven reference implementations (e.g. Pixelfed),
- applying clean engineering principles,
- and validating early through local testing and automation.

Whether you’re working with high or low confidence in AI-generated code, this workflow ensures that every role you create is understandable, testable, and production-ready.

Recommendations about what AI to choose and how to set it up you will find [here](https://s.infinito.nexus/aibestpractice).

## 🚀 Task Prompt

```bash
Follow the instructions from AGENTS.md. 

Add a new port for application x to port group_vars/all/*_port.yml

Add a new network for application x to group_vars/all/*_network.yml

Create a new web-app role named web-app-x  
Reference implementation: https://github.com/infinito-nexus/core/tree/master/roles/web-app-pixelfed

Implement these Acceptance Criteria:
- A
- B
- C
- D

Follow this iteration procedure, until everything is deployed and all tests pass:
docs/agents/action/iteration.md

```

* * *

## 🔁 Optimization Iteration

```bash
Validate the implementation:
- Check for errors
- Compare structure and behavior with the Pixelfed role

```

💡 **Important:** Always provide a strong reference (like Pixelfed) so the AI has a clear quality benchmark.

* * *

## 🧠 Best Practice

### ✅ Do’s

#### 🔹 Keep Things Atomic

Ask the AI to:

- Apply [KISS](https://de.wikipedia.org/wiki/KISS-Prinzip) → keep it simple and focused
- Follow [DRY](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself) → avoid duplication
- Respect [SPOT](https://de.wikipedia.org/wiki/Single_Point_of_Truth) → ensure a single source of truth

Keep the design patterns for [Clean Code](https://en.wikipedia.org/wiki/Robert_C._Martin#Clean_Code) in mind.

* * *

#### 🔹 Follow [MVP](https://de.wikipedia.org/wiki/Minimum_Viable_Product) for Yourself

Work iteratively and validate early instead of trying to solve everything at once:

1. 🧪 **Set up a [local test environment 🧪](https://hub.infinito.nexus/t/local-test-environment-deploy/435)**

2. ✅ **Verify a working baseline**  
→ e.g. deploy and test `web-app-pixelfed`

3. 🤖 **Adjust scope based on your confidence with AI**

4. 🧹 Run:

5. 🚀 **Deploy locally**

6. 🖱 **Test via UI** → click through the application

7. 🎭 **Write Playwright tests**

8. 🔍 **Review the code carefully**

9. 🔄 **Push CI/CD**

10. 🟢 If pipelines pass → open Pull Request

The CI/CD merge flow is documented [here](https://hub.infinito.nexus/t/working-with-folks-in-infinito-nexus/436).

* * *

## 🧰 Tips & Tricks

### 🔌 Developing with minimal hardware resources

Keep your environment minimal and focused:

```yaml
compose:
  services:
    matomo:
      enabled: false
      shared: false
    dashboard:
      enabled: false
      shared: false
    oidc:
      enabled: false
      shared: false
    logout:
      enabled: false
      shared: false

```

💡 This reduces noise, speeds up debugging, and improves iteration time.

* * *

## 🎯 Summary

- Use Pixelfed as your **reference standard**
- Work **iteratively (MVP mindset)**
- Validate early with `make test`
- Keep everything **simple, clean, and consistent**
- Never ship code you don’t understand
