-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy path.itsypad-preview.html
More file actions
171 lines (154 loc) · 8.41 KB
/
Copy path.itsypad-preview.html
File metadata and controls
171 lines (154 loc) · 8.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#d4d4d4;background:#25252c}.hljs-keyword{color:#ff6188}.hljs-built_in{color:#a9dc76}.hljs-type{color:#78dce8}.hljs-literal{color:#ab9df2}.hljs-number{color:#ab9df2}.hljs-operator{color:#ff6188}.hljs-punctuation{color:#939293}.hljs-property{color:#78dce8}.hljs-regexp{color:#ffd866}.hljs-string{color:#ffd866}.hljs-char.escape_{color:#fc9867}.hljs-subst{color:#fc9867}.hljs-symbol{color:#ab9df2}.hljs-variable{color:#78dce8}.hljs-variable.language_{color:#fc9867}.hljs-variable.constant_{color:#ab9df2}.hljs-title{color:#a9dc76}.hljs-title.class_{color:#78dce8}.hljs-title.function_{color:#a9dc76}.hljs-params{color:#fc9867}.hljs-comment{color:#727072}.hljs-doctag{color:#ff6188}.hljs-meta{color:#ff6188}.hljs-section{color:#ff6188}.hljs-tag{color:#ff6188}.hljs-name{color:#ff6188}.hljs-attr{color:#a9dc76}.hljs-attribute{color:#a9dc76}.hljs-bullet{color:#ff6188}.hljs-code{color:#ffd866}.hljs-emphasis{color:#ab9df2;font-style:italic}.hljs-strong{color:#fc9867;font-weight:700}.hljs-formula{color:#78dce8}.hljs-link{color:#78dce8;font-style:italic}.hljs-quote{color:#727072;font-style:italic}.hljs-selector-tag{color:#ff6188}.hljs-selector-id{color:#78dce8}.hljs-selector-class{color:#a9dc76}.hljs-selector-attr{color:#fc9867}.hljs-selector-pseudo{color:#78dce8}.hljs-template-tag{color:#fc9867}.hljs-template-variable{color:#fc9867}.hljs-addition{color:#a9dc76;background:rgba(169,220,118,.15)}.hljs-deletion{color:#ff6188;background:rgba(255,97,136,.15)}
* { box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
font-size: 14px;
line-height: 1.6;
color: #d4d4d4;
background: #25252c;
padding: 16px 24px;
margin: 0;
-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 1.4em;
margin-bottom: 0.6em;
font-weight: 600;
line-height: 1.25;
}
h1 { font-size: 1.8em; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 0.3em; }
h2 { font-size: 1.5em; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 0.3em; }
h3 { font-size: 1.25em; }
h1:first-child, h2:first-child, h3:first-child { margin-top: 0; }
p { margin: 0.8em 0; }
a { color: #78b9f2; text-decoration: none; }
a:hover { text-decoration: underline; }
code {
font-family: ui-monospace, "SF Mono", Menlo, monospace;
font-size: 0.9em;
background: rgba(255,255,255,0.06);
padding: 0.2em 0.4em;
border-radius: 4px;
}
pre {
background: rgba(255,255,255,0.06);
border-radius: 6px;
padding: 12px 16px;
overflow-x: auto;
margin: 1em 0;
}
pre code {
background: none;
padding: 0;
font-size: 0.85em;
line-height: 1.5;
}
/* Override highlight.js block styling to match our container */
pre code.hljs {
background: none;
padding: 0;
}
blockquote {
border-left: 3px solid rgba(255,255,255,0.1);
margin: 1em 0;
padding: 0.5em 1em;
color: #d4d4d4;
opacity: 0.8;
}
img {
max-width: 100%;
height: auto;
border-radius: 4px;
}
table {
border-collapse: collapse;
width: 100%;
margin: 1em 0;
}
th, td {
border: 1px solid rgba(255,255,255,0.1);
padding: 8px 12px;
text-align: left;
}
th { font-weight: 600; }
hr {
border: none;
border-top: 1px solid rgba(255,255,255,0.1);
margin: 1.5em 0;
}
ul, ol { padding-left: 2em; margin: 0.5em 0; }
li { margin: 0.3em 0; }
mark {
background: rgba(255, 230, 0, 0.35);
color: inherit;
padding: 0.1em 0.2em;
border-radius: 2px;
}
/* Checklist styling */
ul li input[type="checkbox"] {
margin-right: 0.4em;
}
</style>
</head>
<body>
<h1>Itsyconnect – LLM build guide</h1>
<p>Self-hosted App Store Connect dashboard. Next.js 16, TypeScript, Tailwind v4, shadcn/ui, SQLite.</p>
<h2>Required reading</h2>
<p>Before writing any code, read these docs:</p>
<ul>
<li><strong><a href="docs/UI.md">docs/UI.md</a></strong> – typography, icons, component patterns, form conventions, layout rules. All UI must follow these conventions exactly.</li>
<li><strong><a href="docs/BACKEND.md">docs/BACKEND.md</a></strong> – architecture, security model, database schema, caching strategy, API conventions, testing. All server-side code must follow these conventions.</li>
<li><strong><a href="docs/DB.md">docs/DB.md</a></strong> – database migrations, how to add tables/columns, checklist. Must read before any schema changes.</li>
</ul>
<h2>Project rules</h2>
<ol>
<li><strong>shadcn/ui 100%</strong> – every UI element uses shadcn. No custom primitives.</li>
<li><strong>Phosphor icons only</strong> – <code>@phosphor-icons/react</code>. Never import from lucide-react.</li>
<li><strong>Geist font</strong> – sans (body) and mono (code/inputs). Set globally, never override.</li>
<li><strong>Custom CSS classes over inline Tailwind</strong> – reusable styles live in <code>globals.css</code> <code>@layer components</code>. Use <code>.section-title</code> for form headings, not ad-hoc utility classes. Add new classes there when a pattern repeats.</li>
<li><strong>Sosumi for Apple docs</strong> – always use the <code>sosumi</code> MCP server to search and fetch Apple developer documentation. Never guess at ASC API shapes, field names, or endpoint paths – look them up via sosumi first.</li>
</ol>
<h2>Core principles</h2>
<ol>
<li><strong>Security first</strong> – never expose API keys client-side. Use session tokens for browser auth, API keys server-side only. No security shortcuts.</li>
<li><strong>Test-driven</strong> – write tests before code. No untested code in production.</li>
<li><strong>No hacks</strong> – fix root causes, not symptoms. No "temporary" workarounds.</li>
<li><strong>No dead code</strong> – remove unused code immediately. Every line must serve a purpose.</li>
<li><strong>Refactor continuously</strong> – extract duplication, simplify complexity, rename for clarity. Not optional.</li>
<li><strong>No assumptions</strong> – ask if uncertain. Verify with tests. Facts over guesses.</li>
<li><strong>Research before guessing</strong> – web search for solutions before guessing at fixes, especially for platform-specific layout/rendering issues. Facts over trial-and-error.</li>
<li><strong>Revert failed changes</strong> – if a code change doesn't fix the problem, remove it completely before trying the next approach. Never leave dead or ineffective code behind.</li>
<li><strong>Clean up failed fixes immediately</strong> – if a code change aimed at fixing something has no effect, remove it completely before trying the next approach. Never accumulate layers of ineffective code.</li>
</ol>
<h2>Routing and request interception</h2>
<ul>
<li><strong><code>src/proxy.ts</code></strong> handles all request interception (setup redirect, auth guards, etc.). This is Next.js 16's replacement for <code>middleware.ts</code> – never create a <code>middleware.ts</code> file.</li>
<li>The proxy checks <code>/api/health</code> on root (<code>/</code>) to determine if setup is needed, then redirects to <code>/setup</code> or <code>/dashboard</code>.</li>
<li>Electron loads <code>/</code> so the proxy can handle initial routing. Never hardcode <code>/dashboard</code> as the Electron entry URL.</li>
</ul>
<h2>Versioning</h2>
<ul>
<li><strong>Single source of truth</strong>: <code>src/lib/version.ts</code> – exports <code>APP_VERSION</code> and <code>BUILD_NUMBER</code>.</li>
<li><code>package.json</code> <code>"version"</code> must match <code>APP_VERSION</code>.</li>
<li><code>forge.config.ts</code> imports <code>BUILD_NUMBER</code> for <code>CFBundleVersion</code>.</li>
<li>When asked to bump: update <code>src/lib/version.ts</code> and <code>package.json</code> version.</li>
</ul>
<h2>Style</h2>
<ol>
<li><strong>European-style titles</strong> – never use American Title Case.</li>
<li><strong>En dashes, not em dashes</strong> – use – not —.</li>
</ol>
<h2>Git</h2>
<ol>
<li><strong>No autonomous commits</strong> – never commit or push without explicit user instruction.</li>
<li><strong>No co-authorship</strong> – never add Co-Authored-By lines to commits.</li>
<li><strong>No git reverts without permission</strong> – never revert files using git checkout, git restore, or any git command without explicit user approval. Debug and fix issues instead.</li>
</ol>
</body>
</html>