@archmap/icons 0.1.0

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.
package/README.md ADDED
@@ -0,0 +1,181 @@
1
+ # @archmap/icons
2
+
3
+ Opt-in icon pack for [ArchMap](../archmap). ArchMap core intentionally ships no
4
+ vendor assets; this package registers third-party service icons through
5
+ ArchMap's `registerIcon()` mechanism.
6
+
7
+ ## Usage
8
+
9
+ ```ts
10
+ import { registerIcon } from "archmap";
11
+ import { installCloudProviderIcons, installFamousServiceIcons } from "@archmap/icons";
12
+
13
+ installFamousServiceIcons(registerIcon);
14
+ installCloudProviderIcons(registerIcon);
15
+ ```
16
+
17
+ Then use matching `provider` values in ArchMap metadata:
18
+
19
+ ```archmap
20
+ graph LR
21
+ App[App] --> Logs[Log analytics]
22
+ ---
23
+ nodes:
24
+ Logs: { provider: splunk, kind: log_analytics }
25
+ DB: { provider: aws, kind: rds }
26
+ Warehouse: { provider: gcp, kind: bigquery }
27
+ App: { provider: azure, kind: app_services }
28
+ ```
29
+
30
+ ## Cloud Provider Service Icons
31
+
32
+ AWS, Google Cloud, and Azure service icons are generated from the official SVG
33
+ packages. They register as `provider/kind`, which matches ArchMap's most
34
+ specific icon lookup rule.
35
+
36
+ ```ts
37
+ import { registerIcon } from "archmap";
38
+ import {
39
+ cloudIconCounts,
40
+ getCloudIconEntry,
41
+ installAwsIcons,
42
+ installAzureIcons,
43
+ installCloudProviderIcons,
44
+ installGcpIcons,
45
+ listCloudIconKeys,
46
+ searchCloudIconEntries,
47
+ } from "@archmap/icons";
48
+
49
+ installCloudProviderIcons(registerIcon);
50
+ // or install one provider:
51
+ installAwsIcons(registerIcon);
52
+ installGcpIcons(registerIcon);
53
+ installAzureIcons(registerIcon);
54
+
55
+ console.log(cloudIconCounts); // { aws: 305, gcp: 261, azure: 705 }
56
+ ```
57
+
58
+ ### Finding the right service key
59
+
60
+ The cloud catalog is intentionally queryable so AI agents and code generators
61
+ do not need to guess provider-specific service names.
62
+
63
+ ```ts
64
+ import {
65
+ getCloudIconEntry,
66
+ listCloudIconKeys,
67
+ searchCloudIconEntries,
68
+ } from "@archmap/icons";
69
+
70
+ searchCloudIconEntries("rds", { provider: "aws" });
71
+ // [{ provider: "aws", key: "amazon_rds", title: "Amazon RDS", aliases: ["rds"], ... }]
72
+
73
+ getCloudIconEntry("aws", "rds")?.key; // "amazon_rds"
74
+ getCloudIconEntry("aws", "Amazon EC2")?.aliases; // ["ec2"]
75
+
76
+ listCloudIconKeys("aws").filter((key) => key.includes("lambda"));
77
+ // ["aws/aws_lambda", "aws/lambda", ...]
78
+ ```
79
+
80
+ For ArchMap metadata, use the provider without the prefix and the key or alias
81
+ as `kind`:
82
+
83
+ ```archmap
84
+ nodes:
85
+ Api: { provider: aws, kind: lambda }
86
+ Db: { provider: aws, kind: rds }
87
+ Bucket: { provider: aws, kind: s3 }
88
+ ```
89
+
90
+ Examples:
91
+
92
+ | Provider | Preferred key | Short alias examples |
93
+ | --- | --- | --- |
94
+ | AWS | `aws/amazon_ec2` | `aws/ec2` |
95
+ | AWS | `aws/aws_lambda` | `aws/lambda` |
96
+ | GCP | `gcp/compute_engine` | `gcp/gce`, `gcp/vm` |
97
+ | GCP | `gcp/cloud_storage` | `gcp/gcs`, `gcp/bucket` |
98
+ | GCP | `gcp/google_kubernetes_engine` | `gcp/gke`, `gcp/kubernetes` |
99
+ | GCP | `gcp/pubsub` | `gcp/pub_sub`, `gcp/messaging` |
100
+ | GCP | `gcp/cloud_sql` | `gcp/sql` |
101
+ | Azure | `azure/virtual_machine` | `azure/vm` |
102
+ | Azure | `azure/kubernetes_services` | `azure/kubernetes_service` |
103
+ | Azure | `azure/storage_accounts` | `azure/blob`, `azure/storage` |
104
+ | Azure | `azure/virtual_networks` | `azure/vnet` |
105
+ | Azure | `azure/key_vaults` | `azure/keyvault`, `azure/kv` |
106
+ | Azure | `azure/container_registries` | `azure/acr` |
107
+ | Azure | `azure/api_management_services` | `azure/apim` |
108
+ | Azure | `azure/load_balancers` | `azure/lb` |
109
+ | Azure | `azure/web_application_firewall_policies_waf` | `azure/waf` |
110
+
111
+ The generated cloud set currently contains:
112
+
113
+ | Provider | Icons |
114
+ | --- | ---: |
115
+ | AWS | 305 |
116
+ | Google Cloud | 261 |
117
+ | Azure | 705 |
118
+
119
+ Regenerate the generated file after downloading/extracting the official ZIPs:
120
+
121
+ ```bash
122
+ npm run generate:cloud-icons -- /tmp/archmap-icon-sources/extracted src/cloud-icons.generated.ts
123
+ ```
124
+
125
+ ## Included Set
126
+
127
+ This is the common external-services pack for architecture diagrams. It covers
128
+ observability, edge/security, identity, development platforms, incident/ITSM,
129
+ containers, infrastructure-as-code, databases, streaming, search, chat, and app
130
+ hosting.
131
+
132
+ | Rank | Service key(s) | Diagram role |
133
+ | ---: | --- | --- |
134
+ | 1 | `datadog` | Observability / Monitoring |
135
+ | 2 | `cloudflare` | Edge / DNS / WAF |
136
+ | 3 | `okta` | Identity Provider |
137
+ | 4 | `wiz` | Cloud Security / CNAPP |
138
+ | 5 | `sentry` | Error Tracking |
139
+ | 6 | `github` | Code / CI / Dev Platform |
140
+ | 7 | `pagerduty` | Incident / Alert Routing |
141
+ | 8 | `newrelic`, `dynatrace` | Observability |
142
+ | 9 | `splunk` | Log Analytics / SIEM |
143
+ | 10 | `servicenow`, `jira` | ITSM / Ticketing |
144
+ | 11 | `kubernetes` | Container Orchestration |
145
+ | 12 | `docker` | Containers |
146
+ | 13 | `terraform` | Infrastructure as Code |
147
+ | 14 | `grafana` | Dashboards / Observability |
148
+ | 15 | `prometheus` | Metrics / Monitoring |
149
+ | 16 | `postgresql` | Relational Database |
150
+ | 17 | `mysql` | Relational Database |
151
+ | 18 | `redis` | Cache / Key-Value Store |
152
+ | 19 | `mongodb` | Document Database |
153
+ | 20 | `kafka` | Event Streaming |
154
+ | 21 | `elasticsearch` | Search / Log Indexing |
155
+ | 22 | `slack` | ChatOps / Collaboration |
156
+ | 23 | `microsoftteams` | ChatOps / Collaboration |
157
+ | 24 | `auth0` | Identity Provider |
158
+ | 25 | `keycloak` | Identity Provider |
159
+ | 26 | `vercel` | Frontend Hosting / Deployment |
160
+ | 27 | `netlify` | Frontend Hosting / Deployment |
161
+ | 28 | `heroku` | PaaS / App Hosting |
162
+ | 29 | `supabase` | Backend Platform |
163
+ | 30 | `firebase` | Backend Platform |
164
+
165
+ Several spelling aliases are also registered, such as `new-relic`,
166
+ `pager-duty`, `service-now`, `k8s`, `postgres`, `apache_kafka`, `teams`, and
167
+ `microsoft_teams`.
168
+
169
+ ## Licensing Notes
170
+
171
+ Most logos are sourced from `simple-icons`, which is CC0-licensed, but brand
172
+ names and logos may still be subject to trademark rules. `wiz`, `servicenow`,
173
+ `slack`, `microsoftteams`, and `heroku` are lettered placeholder badges because
174
+ they are not available in the `simple-icons` set used here. Replace those with
175
+ official licensed assets in production if your usage requires brand-accurate
176
+ logos.
177
+
178
+ Cloud provider service icons are sourced from the official AWS Architecture
179
+ Icons package, Google Cloud Icon Library downloads, and Microsoft Azure
180
+ Architecture Icons download. The package code is MIT-licensed, but vendor icon
181
+ assets remain governed by each provider's published terms and trademark rules.
@@ -0,0 +1,30 @@
1
+ import type { RegisterIcon, RenderableIcon } from "./index.js";
2
+ export type CloudProvider = "aws" | "gcp" | "azure";
3
+ export interface CloudIconEntry {
4
+ provider: CloudProvider;
5
+ key: string;
6
+ title: string;
7
+ category: string;
8
+ aliases?: readonly string[];
9
+ icon: RenderableIcon;
10
+ }
11
+ export interface InstallCloudIconsOptions {
12
+ providers?: readonly CloudProvider[];
13
+ }
14
+ export interface SearchCloudIconOptions {
15
+ provider?: CloudProvider;
16
+ limit?: number;
17
+ }
18
+ export declare const cloudIconEntries: readonly CloudIconEntry[];
19
+ export declare const cloudIconCounts: {
20
+ readonly aws: 305;
21
+ readonly gcp: 261;
22
+ readonly azure: 705;
23
+ };
24
+ export declare function installCloudProviderIcons(registerIcon: RegisterIcon, options?: InstallCloudIconsOptions): void;
25
+ export declare function installAwsIcons(registerIcon: RegisterIcon): void;
26
+ export declare function installGcpIcons(registerIcon: RegisterIcon): void;
27
+ export declare function installAzureIcons(registerIcon: RegisterIcon): void;
28
+ export declare function getCloudIconEntry(provider: CloudProvider, kind: string): CloudIconEntry | undefined;
29
+ export declare function listCloudIconKeys(provider?: CloudProvider): string[];
30
+ export declare function searchCloudIconEntries(query: string, options?: SearchCloudIconOptions): CloudIconEntry[];
@@ -0,0 +1,7 @@
1
+ import type { CloudIconEntry } from "./cloud-icons.js";
2
+ export declare const generatedCloudIconEntries: readonly CloudIconEntry[];
3
+ export declare const generatedCloudIconCounts: {
4
+ readonly aws: 305;
5
+ readonly gcp: 261;
6
+ readonly azure: 705;
7
+ };