netbox-service-canvas 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. netbox_service_canvas-0.3.0/LICENSE +177 -0
  2. netbox_service_canvas-0.3.0/PKG-INFO +280 -0
  3. netbox_service_canvas-0.3.0/README.md +254 -0
  4. netbox_service_canvas-0.3.0/netbox_service_canvas/__init__.py +27 -0
  5. netbox_service_canvas-0.3.0/netbox_service_canvas/api/__init__.py +0 -0
  6. netbox_service_canvas-0.3.0/netbox_service_canvas/api/serializers.py +231 -0
  7. netbox_service_canvas-0.3.0/netbox_service_canvas/api/urls.py +18 -0
  8. netbox_service_canvas-0.3.0/netbox_service_canvas/api/views.py +353 -0
  9. netbox_service_canvas-0.3.0/netbox_service_canvas/choices.py +69 -0
  10. netbox_service_canvas-0.3.0/netbox_service_canvas/constants.py +45 -0
  11. netbox_service_canvas-0.3.0/netbox_service_canvas/filtersets.py +262 -0
  12. netbox_service_canvas-0.3.0/netbox_service_canvas/forms/__init__.py +4 -0
  13. netbox_service_canvas-0.3.0/netbox_service_canvas/forms/bulk_edit.py +112 -0
  14. netbox_service_canvas-0.3.0/netbox_service_canvas/forms/bulk_import.py +139 -0
  15. netbox_service_canvas-0.3.0/netbox_service_canvas/forms/filtersets.py +167 -0
  16. netbox_service_canvas-0.3.0/netbox_service_canvas/forms/model_forms.py +203 -0
  17. netbox_service_canvas-0.3.0/netbox_service_canvas/graph.py +275 -0
  18. netbox_service_canvas-0.3.0/netbox_service_canvas/graphql/__init__.py +0 -0
  19. netbox_service_canvas-0.3.0/netbox_service_canvas/graphql/filters.py +87 -0
  20. netbox_service_canvas-0.3.0/netbox_service_canvas/graphql/schema.py +39 -0
  21. netbox_service_canvas-0.3.0/netbox_service_canvas/graphql/types.py +127 -0
  22. netbox_service_canvas-0.3.0/netbox_service_canvas/migrations/0001_initial.py +165 -0
  23. netbox_service_canvas-0.3.0/netbox_service_canvas/migrations/0002_applications_notes.py +82 -0
  24. netbox_service_canvas-0.3.0/netbox_service_canvas/migrations/__init__.py +0 -0
  25. netbox_service_canvas-0.3.0/netbox_service_canvas/models/__init__.py +3 -0
  26. netbox_service_canvas-0.3.0/netbox_service_canvas/models/applications.py +63 -0
  27. netbox_service_canvas-0.3.0/netbox_service_canvas/models/canvas.py +233 -0
  28. netbox_service_canvas-0.3.0/netbox_service_canvas/models/connections.py +236 -0
  29. netbox_service_canvas-0.3.0/netbox_service_canvas/navigation.py +43 -0
  30. netbox_service_canvas-0.3.0/netbox_service_canvas/search.py +38 -0
  31. netbox_service_canvas-0.3.0/netbox_service_canvas/signals.py +66 -0
  32. netbox_service_canvas-0.3.0/netbox_service_canvas/static/netbox_service_canvas/dist/canvas.css +1 -0
  33. netbox_service_canvas-0.3.0/netbox_service_canvas/static/netbox_service_canvas/dist/canvas.js +67 -0
  34. netbox_service_canvas-0.3.0/netbox_service_canvas/static/netbox_service_canvas/dist/chunks/elk.bundled-BkCBnqF-.js +24 -0
  35. netbox_service_canvas-0.3.0/netbox_service_canvas/static/netbox_service_canvas/dist/chunks/html2canvas.esm-B0tyYwQk.js +22 -0
  36. netbox_service_canvas-0.3.0/netbox_service_canvas/static/netbox_service_canvas/dist/chunks/index.es-w7MLceHM.js +18 -0
  37. netbox_service_canvas-0.3.0/netbox_service_canvas/static/netbox_service_canvas/dist/chunks/jspdf.es.min-C1H5N2qJ.js +169 -0
  38. netbox_service_canvas-0.3.0/netbox_service_canvas/static/netbox_service_canvas/dist/chunks/purify.es-BKvm9NlY.js +3 -0
  39. netbox_service_canvas-0.3.0/netbox_service_canvas/tables.py +182 -0
  40. netbox_service_canvas-0.3.0/netbox_service_canvas/template_content.py +98 -0
  41. netbox_service_canvas-0.3.0/netbox_service_canvas/templates/netbox_service_canvas/application.html +5 -0
  42. netbox_service_canvas-0.3.0/netbox_service_canvas/templates/netbox_service_canvas/canvas.html +5 -0
  43. netbox_service_canvas-0.3.0/netbox_service_canvas/templates/netbox_service_canvas/canvas_editor.html +16 -0
  44. netbox_service_canvas-0.3.0/netbox_service_canvas/templates/netbox_service_canvas/connectionhop.html +5 -0
  45. netbox_service_canvas-0.3.0/netbox_service_canvas/templates/netbox_service_canvas/inc/show_on_canvas_button.html +15 -0
  46. netbox_service_canvas-0.3.0/netbox_service_canvas/templates/netbox_service_canvas/inc/url_attr.html +1 -0
  47. netbox_service_canvas-0.3.0/netbox_service_canvas/templates/netbox_service_canvas/serviceconnection.html +5 -0
  48. netbox_service_canvas-0.3.0/netbox_service_canvas/tests/__init__.py +0 -0
  49. netbox_service_canvas-0.3.0/netbox_service_canvas/tests/test_api.py +521 -0
  50. netbox_service_canvas-0.3.0/netbox_service_canvas/tests/test_filtersets.py +104 -0
  51. netbox_service_canvas-0.3.0/netbox_service_canvas/tests/test_models.py +145 -0
  52. netbox_service_canvas-0.3.0/netbox_service_canvas/tests/test_signals.py +138 -0
  53. netbox_service_canvas-0.3.0/netbox_service_canvas/tests/test_views.py +312 -0
  54. netbox_service_canvas-0.3.0/netbox_service_canvas/tests/utils.py +41 -0
  55. netbox_service_canvas-0.3.0/netbox_service_canvas/ui/__init__.py +0 -0
  56. netbox_service_canvas-0.3.0/netbox_service_canvas/ui/panels.py +36 -0
  57. netbox_service_canvas-0.3.0/netbox_service_canvas/urls.py +21 -0
  58. netbox_service_canvas-0.3.0/netbox_service_canvas/views.py +451 -0
  59. netbox_service_canvas-0.3.0/netbox_service_canvas.egg-info/PKG-INFO +280 -0
  60. netbox_service_canvas-0.3.0/netbox_service_canvas.egg-info/SOURCES.txt +62 -0
  61. netbox_service_canvas-0.3.0/netbox_service_canvas.egg-info/dependency_links.txt +1 -0
  62. netbox_service_canvas-0.3.0/netbox_service_canvas.egg-info/top_level.txt +1 -0
  63. netbox_service_canvas-0.3.0/pyproject.toml +54 -0
  64. netbox_service_canvas-0.3.0/setup.cfg +4 -0
@@ -0,0 +1,177 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,280 @@
1
+ Metadata-Version: 2.4
2
+ Name: netbox-service-canvas
3
+ Version: 0.3.0
4
+ Summary: Interactive canvas for NetBox: which services run where, how they talk to each other and what breaks if a host fails.
5
+ Author: Jasper Claus
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/Jasper-Claus/netbox-service-canvas
8
+ Project-URL: Source, https://github.com/Jasper-Claus/netbox-service-canvas
9
+ Project-URL: Issues, https://github.com/Jasper-Claus/netbox-service-canvas/issues
10
+ Project-URL: Changelog, https://github.com/Jasper-Claus/netbox-service-canvas/blob/main/CHANGELOG.md
11
+ Keywords: netbox,netbox-plugin,homelab,service-map,dependency-mapping,impact-analysis,ipam,dcim,diagram,network-documentation
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Web Environment
14
+ Classifier: Framework :: Django
15
+ Classifier: Intended Audience :: System Administrators
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: JavaScript
20
+ Classifier: Topic :: System :: Networking
21
+ Classifier: Topic :: System :: Systems Administration
22
+ Requires-Python: >=3.12
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Dynamic: license-file
26
+
27
+ <div align="center">
28
+
29
+ # πŸ—ΊοΈ NetBox Service Canvas
30
+
31
+ **See which services run where and how they talk to each other, right inside NetBox.**
32
+
33
+ An interactive, drag-and-drop canvas for [NetBox](https://github.com/netbox-community/netbox) that turns your
34
+ devices, VMs, services and applications into a living architecture diagram. The diagram is built from real
35
+ NetBox data, not just drawn.
36
+
37
+ [![NetBox](https://img.shields.io/badge/NetBox-4.5.x-0d6efd?logo=netbox&logoColor=white)](https://github.com/netbox-community/netbox)
38
+ [![Python](https://img.shields.io/badge/Python-3.12+-3776ab?logo=python&logoColor=white)](https://www.python.org/)
39
+ [![React](https://img.shields.io/badge/React-18-61dafb?logo=react&logoColor=black)](https://react.dev/)
40
+ [![PyPI](https://img.shields.io/pypi/v/netbox-service-canvas?logo=pypi&logoColor=white)](https://pypi.org/project/netbox-service-canvas/)
41
+ [![License](https://img.shields.io/badge/License-Apache--2.0-green)](https://github.com/Jasper-Claus/netbox-service-canvas/blob/main/LICENSE)
42
+ [![Built with AI](https://img.shields.io/badge/Built%20100%25%20with-AI-8a2be2?logo=anthropic&logoColor=white)](#-built-100-with-ai)
43
+ [![CI](https://github.com/Jasper-Claus/netbox-service-canvas/actions/workflows/ci.yml/badge.svg)](https://github.com/Jasper-Claus/netbox-service-canvas/actions/workflows/ci.yml)
44
+
45
+ [Features](#-features) Β· [Install](#-installation) Β· [How it works](#-how-it-works) Β· [Permissions](#-permissions) Β·
46
+ [API](#-rest-api--graphql) Β· [πŸ“– Wiki](https://github.com/Jasper-Claus/netbox-service-canvas/wiki) Β·
47
+ [πŸ‡©πŸ‡ͺ Deutsch](https://github.com/Jasper-Claus/netbox-service-canvas/blob/main/docs/README.de.md)
48
+
49
+ </div>
50
+
51
+ <p align="center">
52
+ <img src="https://raw.githubusercontent.com/Jasper-Claus/netbox-service-canvas/main/docs/images/demo.gif" alt="Demo: drag a NAS onto the canvas, add its services, draw a connection, run the impact analysis" width="100%">
53
+ <br><sub>Drag a host in, let <i>Add missing</i> pull in its services, draw a connection, then ask what breaks if it fails.</sub>
54
+ </p>
55
+
56
+ ---
57
+
58
+ ## πŸ’™ Why this exists
59
+
60
+ I love NetBox. It's the source of truth for everything in my homelab: racks, devices, VMs, IPs, VLANs. But one
61
+ question it never answered at a glance was:
62
+
63
+ > *"Which service runs on which box, and who talks to whom over which port?"*
64
+
65
+ The topology plugins show cables and links. I wanted the **service layer**: Grafana pulling metrics from Prometheus,
66
+ Paperless writing to Postgres on the NAS, the reverse proxy in front of everything. So I built this plugin, and I
67
+ hope it's useful to you too. ✨
68
+
69
+ ## πŸ€– Built 100% with AI
70
+
71
+ Full transparency: **every line of this plugin was written by AI.** That includes the Django models, the REST and
72
+ GraphQL API, the React editor, the tests and this README. It was created with [Claude](https://claude.ai) (Anthropic)
73
+ through *Claude Code*, with me as the product owner. I described what I wanted, tested it in my homelab and gave
74
+ feedback.
75
+
76
+ It was an experiment in how far you can get when a NetBox fan with ideas teams up with an AI pair programmer. The
77
+ answer: pretty far. Issues, ideas and PRs from humans (or their AIs πŸ˜„) are very welcome.
78
+
79
+ ---
80
+
81
+ ## ✨ Features
82
+
83
+ ### 🧩 Data model (usable everywhere in NetBox, even without a canvas)
84
+
85
+ | Object | What it is |
86
+ |---|---|
87
+ | **Service** *(NetBox core)* | A port/protocol on exactly one device or VM, e.g. `grafana, TCP 3000 on nas`. |
88
+ | **Application** *(new)* | The software as a whole, made of one or more services, e.g. **Grafana** = web UI service + database service. Has status, version and URL. |
89
+ | **Service Connection** *(new)* | "A talks to B": source/target can be a service, device, VM or application. Includes direction, protocol, port, *data* description and status. |
90
+ | **Connection Hop** *(new)* | Ordered waypoints of a connection: reverse proxy, VRF, VLAN, tunnel, prefix, IP… |
91
+
92
+ - Full NetBox integration: list views, filters, CSV import, bulk edit, global search, REST API, GraphQL, change log
93
+ and journal.
94
+ - **Connections** tab (dependency table) on device, VM, service and application pages.
95
+ - **Applications** panel on service, device and VM pages.
96
+ - **Show on canvas** button that jumps straight into the editor and highlights the object.
97
+
98
+ ### 🎨 Canvas editor
99
+
100
+ - πŸ–±οΈ **Drag & drop** devices, VMs, services and applications from a searchable sidebar.
101
+ - πŸ”— **Draw an edge to create real data.** A *data flow* creates a `ServiceConnection`, and *runs on* sets the
102
+ service's host.
103
+ - πŸͺŸ **Node panel** (click any node): details, its connections, quick edit for services and applications, a link to
104
+ the full NetBox form (with a jump back to the editor) and *remove from canvas*.
105
+ - ⚑ **Impact analysis**: "What breaks if this box goes down?" Red marks what fails with it (a hypervisor takes its
106
+ VMs, their services and applications down with it), orange marks everything that depends on it (transitively).
107
+ - πŸ“ **Sticky notes** for maintenance windows, TODOs and explanations.
108
+ - πŸ—‚οΈ **Groups** (racks, clusters, VLANs…) with name, colour and resizing.
109
+ - πŸͺ„ **Auto layout** (ELK), *add missing* (pulls in related hosts, services and peers), minimap, snap to grid.
110
+ - πŸ’Ύ **Autosave**: only what actually changed is written, so your change log isn't flooded.
111
+ - πŸ–¨οΈ **Export** as PNG, SVG or a **print-ready DIN A4 PDF** with header and legend.
112
+ - πŸŒ— Follows the NetBox **light/dark theme**. **Read-only mode** respects NetBox permissions, including object
113
+ constraints.
114
+ - πŸ”’ **No CDNs, no external calls.** The frontend is bundled with the plugin.
115
+
116
+ ### 🧭 Service vs. Application (in one sentence each)
117
+
118
+ - **Service** = *where* something listens: one port on one host (`grafana Β· TCP 3000 Β· nas`).
119
+ - **Application** = *what* it is: the software, optionally spanning several services and hosts (`Grafana`).
120
+
121
+ For a simple one-port app you only need a service. When you create a service in the editor, you can create or link
122
+ the application in the same dialog.
123
+
124
+ ### πŸ“Έ Screenshots
125
+
126
+ <p align="center">
127
+ <img src="https://raw.githubusercontent.com/Jasper-Claus/netbox-service-canvas/main/docs/images/editor.png" alt="The canvas editor inside NetBox: hosts, services, applications and data flows" width="100%">
128
+ </p>
129
+
130
+ <table>
131
+ <tr>
132
+ <td width="50%"><img src="https://raw.githubusercontent.com/Jasper-Claus/netbox-service-canvas/main/docs/images/impact.png" alt="Impact analysis: truenas fails, red and orange mark everything that breaks with it"></td>
133
+ <td width="50%"><img src="https://raw.githubusercontent.com/Jasper-Claus/netbox-service-canvas/main/docs/images/new-service.png" alt="Create a service and its application in one dialog"></td>
134
+ </tr>
135
+ <tr>
136
+ <td align="center">⚑ <b>Impact analysis</b>: what breaks if <code>truenas</code> goes down?</td>
137
+ <td align="center">βž• <b>New service</b> with an optional application, in one dialog</td>
138
+ </tr>
139
+ </table>
140
+
141
+ > The editor follows your NetBox language: English by default, German if NetBox is set to German.
142
+ > Screenshots show a demo homelab, not real infrastructure.
143
+
144
+ ---
145
+
146
+ ## πŸ“¦ Installation
147
+
148
+ Requirements: **NetBox 4.5.x** (tested with 4.5.7) and Python 3.12+. Works with
149
+ [netbox-docker](https://github.com/netbox-community/netbox-docker) and plain installs.
150
+
151
+ **Plain install**: install the package into the NetBox virtual environment:
152
+
153
+ ```bash
154
+ source /opt/netbox/venv/bin/activate
155
+ pip install netbox-service-canvas
156
+ ```
157
+
158
+ To keep it across NetBox upgrades, add `netbox-service-canvas` to `local_requirements.txt` in the NetBox root.
159
+
160
+ **netbox-docker**: add the plugin to `plugin_requirements.txt`:
161
+
162
+ ```text
163
+ netbox-service-canvas
164
+ ```
165
+
166
+ (Pin a version with `netbox-service-canvas==0.3.0` if you like.)
167
+
168
+ Enable it in `configuration/plugins.py`:
169
+
170
+ ```python
171
+ PLUGINS = [
172
+ # ...
173
+ "netbox_service_canvas",
174
+ # "netbox_branching", # if you use branching, keep it last
175
+ ]
176
+ PLUGINS_CONFIG = {
177
+ "netbox_service_canvas": {"grid_size": 10},
178
+ }
179
+ ```
180
+
181
+ Then migrate and collect static files (plain install: `python manage.py migrate` and
182
+ `python manage.py collectstatic --no-input`, then restart NetBox). With netbox-docker, rebuild first:
183
+
184
+ ```bash
185
+ docker compose build --no-cache netbox && docker compose up -d
186
+ docker compose exec netbox /opt/netbox/netbox/manage.py migrate
187
+ docker compose exec netbox /opt/netbox/netbox/manage.py collectstatic --no-input
188
+ ```
189
+
190
+ πŸ“– Step-by-step guide with backup, update and uninstall (German):
191
+ [docs/install-netbox-docker.md](https://github.com/Jasper-Claus/netbox-service-canvas/blob/main/docs/install-netbox-docker.md) Β·
192
+ πŸ§ͺ Dev/test environment on a VM or LXC: [dev/README.md](https://github.com/Jasper-Claus/netbox-service-canvas/blob/main/dev/README.md)
193
+
194
+ ---
195
+
196
+ ## πŸš€ How it works
197
+
198
+ 1. **Plugins β†’ Service Canvas β†’ Canvases β†’ Add**, give it a name (e.g. *Homelab*).
199
+ 2. Open the **Editor** tab.
200
+ 3. Drag your devices and VMs onto the canvas, then click **Add missing** to pull in their services.
201
+ 4. Drag from the dot on the right of a node to another node to create a **data flow**.
202
+ 5. Click a node or an edge to edit it. Use ⚑ **Impact analysis** to see what depends on it.
203
+ 6. Export the result as a **PDF (A4)** for your documentation folder. πŸ–¨οΈ
204
+
205
+ **Design principle:** relationships are real NetBox data; the canvas only stores the layout. The same object can
206
+ appear on many canvases, and if it is deleted in NetBox it disappears from every canvas. The plugin is compatible
207
+ with [netbox-branching](https://github.com/netboxlabs/netbox-branching): all models are change-logged and there is
208
+ no raw SQL.
209
+
210
+ ---
211
+
212
+ ## πŸ” Permissions
213
+
214
+ | Action | Required permission |
215
+ |---|---|
216
+ | View a canvas | `view` on *canvas* (objects and connections only as far as you may view them) |
217
+ | Move, add, remove nodes | `change` on the canvas + `add/change/delete` on *canvas node* |
218
+ | Groups / notes | additionally `add/change/delete` on *canvas group* / *canvas note* |
219
+ | Create / edit / delete data flows | `add/change/delete` on *service connection* |
220
+ | Hops | `add/change/delete` on *connection hop* |
221
+ | New service, "runs on", quick edit | `add` / `change` on *ipam β€Ί service* |
222
+ | Applications | `add` / `change` on *application* |
223
+
224
+ ---
225
+
226
+ ## πŸ”Œ REST API & GraphQL
227
+
228
+ Base URL: `/api/plugins/service-canvas/`
229
+
230
+ | Endpoint | |
231
+ |---|---|
232
+ | `applications/`, `connections/`, `connection-hops/`, `canvases/`, `canvas-groups/`, `canvas-nodes/`, `canvas-notes/` | Standard NetBox CRUD, bulk, filters, brief mode |
233
+ | `GET canvases/<id>/graph/` | Everything the editor needs in one request |
234
+ | `GET canvases/<id>/missing/` | Related objects not yet on the canvas |
235
+ | `GET/PUT canvases/<id>/layout/` | Read / atomically save the layout (diff only) |
236
+ | `POST connections/<id>/reorder-hops/` | Reorder hops in one transaction |
237
+
238
+ GraphQL: `service_canvas_application(_list)`, `service_canvas_connection(_list)`, `service_canvas_canvas(_list)`
239
+ and more.
240
+
241
+ ---
242
+
243
+ ## πŸ› οΈ Development
244
+
245
+ ```bash
246
+ # Frontend (React 18 + React Flow 12 + Vite), output goes to netbox_service_canvas/static/…/dist
247
+ cd frontend && npm ci && npm test && npm run build
248
+
249
+ # Backend tests run inside a NetBox dev environment, see dev/README.md
250
+ python manage.py test netbox_service_canvas
251
+ ```
252
+
253
+ See [CONTRIBUTING.md](https://github.com/Jasper-Claus/netbox-service-canvas/blob/main/CONTRIBUTING.md) for details.
254
+
255
+ ## πŸ—ΊοΈ Roadmap ideas
256
+
257
+ - [ ] Auto-fill groups from cluster / site / tag
258
+ - [ ] Services drawn inside their host's container
259
+ - [ ] Live status (e.g. from monitoring) on nodes
260
+ - [ ] Filters and search on the canvas, undo/redo
261
+ - [ ] More UI languages (one dictionary file each, PRs welcome)
262
+
263
+ Got an idea? [Open an issue](https://github.com/Jasper-Claus/netbox-service-canvas/issues/new/choose). ⭐ Stars
264
+ are appreciated if you find this useful!
265
+
266
+ ## πŸ“„ License
267
+
268
+ [Apache-2.0](https://github.com/Jasper-Claus/netbox-service-canvas/blob/main/LICENSE). Not affiliated with NetBox Labs. NetBox is a trademark of NetBox Labs, Inc.
269
+
270
+ ---
271
+
272
+ <div align="center">
273
+
274
+ Made with πŸ’™ for the NetBox community: an idea from a homelabber, code by AI.
275
+
276
+ `#NetBox` `#NetBoxPlugin` `#Homelab` `#SelfHosted` `#SourceOfTruth` `#IPAM` `#DCIM` `#NetDevOps`
277
+ `#NetworkAutomation` `#InfrastructureDocumentation` `#ServiceMap` `#DependencyMapping` `#ImpactAnalysis`
278
+ `#SysAdmin` `#DevOps` `#Django` `#React` `#ReactFlow` `#OpenSource` `#BuiltWithAI` `#ClaudeCode` `#AIAssisted`
279
+
280
+ </div>