easy-starter 1.0.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.
@@ -0,0 +1,283 @@
1
+ // Premium Dark Theme
2
+ $bg: #09090b;
3
+ $surface: #18181b;
4
+ $primary: #6366f1; // Indigo
5
+ $primary-hover: #818cf8;
6
+ $text: #f4f4f5;
7
+ $text-muted: #a1a1aa;
8
+ $border: #27272a;
9
+
10
+ body {
11
+ font-family: 'Inter', system-ui, sans-serif;
12
+ background-color: $bg;
13
+ color: $text;
14
+ margin: 0;
15
+ padding: 0;
16
+ line-height: 1.6;
17
+ }
18
+
19
+ a {
20
+ color: $primary;
21
+ text-decoration: none;
22
+ font-weight: bold;
23
+ transition: color 0.2s;
24
+
25
+ &:hover {
26
+ color: $primary-hover;
27
+ }
28
+ }
29
+
30
+ .container {
31
+ max-width: 800px;
32
+ margin: 50px auto;
33
+ padding: 40px;
34
+ background: $surface;
35
+ border-radius: 16px;
36
+ box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
37
+ border: 1px solid $border;
38
+
39
+ .hero {
40
+ text-align: center;
41
+ margin-bottom: 40px;
42
+
43
+ h1 {
44
+ margin: 0 0 10px;
45
+ color: $text;
46
+ font-size: 2.5rem;
47
+ background: linear-gradient(90deg, #818cf8, #c084fc);
48
+ -webkit-background-clip: text;
49
+ -webkit-text-fill-color: transparent;
50
+ }
51
+
52
+ p {
53
+ color: $text-muted;
54
+ font-size: 1.1rem;
55
+ }
56
+
57
+ .app-icon {
58
+ width: 140px;
59
+ height: 140px;
60
+ margin: 0 auto 20px;
61
+ background-image: url("./images/icon.png?as=webp");
62
+ background-size: contain;
63
+ background-repeat: no-repeat;
64
+ background-position: center;
65
+ }
66
+ }
67
+ }
68
+
69
+ .api-test {
70
+ margin-top: 40px;
71
+ padding: 30px;
72
+ background: rgba(255, 255, 255, 0.02);
73
+ border-radius: 12px;
74
+ border: 1px solid $border;
75
+
76
+ h2,
77
+ h3 {
78
+ margin-top: 0;
79
+ color: #fff;
80
+ }
81
+
82
+ ul {
83
+ list-style: none;
84
+ padding: 0;
85
+
86
+ li {
87
+ display: flex;
88
+ align-items: center;
89
+ justify-content: space-between;
90
+ padding: 15px 20px;
91
+ background: $bg;
92
+ border-radius: 8px;
93
+ margin-bottom: 12px;
94
+ border: 1px solid $border;
95
+ transition: transform 0.2s, border-color 0.2s;
96
+
97
+ &:hover {
98
+ transform: translateY(-2px);
99
+ border-color: $primary;
100
+ }
101
+ }
102
+ }
103
+
104
+ .item-details {
105
+ padding: 20px;
106
+ background: $bg;
107
+ margin-top: 20px;
108
+ border-radius: 8px;
109
+ border: 1px solid $primary;
110
+ box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
111
+
112
+ h3 {
113
+ color: $primary;
114
+ margin-bottom: 10px;
115
+ }
116
+
117
+ p {
118
+ margin: 5px 0;
119
+ color: $text;
120
+ }
121
+ }
122
+
123
+ form {
124
+ display: flex;
125
+ gap: 12px;
126
+ margin-top: 20px;
127
+ flex-wrap: wrap;
128
+ }
129
+ }
130
+
131
+ // Global Controls
132
+ input {
133
+ padding: 12px 16px;
134
+ background: $bg;
135
+ border: 1px solid $border;
136
+ border-radius: 8px;
137
+ color: $text;
138
+ outline: none;
139
+ transition: border-color 0.2s;
140
+ flex: 1;
141
+ min-width: 150px;
142
+
143
+ &:focus {
144
+ border-color: $primary;
145
+ }
146
+ }
147
+
148
+ button {
149
+ padding: 12px 24px;
150
+ background: $primary;
151
+ color: #fff;
152
+ border: none;
153
+ border-radius: 8px;
154
+ cursor: pointer;
155
+ font-weight: bold;
156
+ transition: background 0.2s, transform 0.1s;
157
+
158
+ &:hover:not(:disabled) {
159
+ background: $primary-hover;
160
+ transform: scale(1.02);
161
+ }
162
+
163
+ &:active:not(:disabled) {
164
+ transform: scale(0.98);
165
+ }
166
+
167
+ &:disabled {
168
+ opacity: 0.5;
169
+ cursor: not-allowed;
170
+ }
171
+
172
+ &.btn-danger {
173
+ background: #ef4444;
174
+ &:hover:not(:disabled) {
175
+ background: #dc2626;
176
+ }
177
+ }
178
+ }
179
+
180
+ // --- ADMIN DASHBOARD ---
181
+ .admin-login {
182
+ padding: 40px;
183
+ max-width: 400px;
184
+ margin: 0 auto;
185
+ text-align: center;
186
+
187
+ h2 { color: $text; }
188
+
189
+ .back-link {
190
+ margin-bottom: 20px;
191
+ }
192
+
193
+ form {
194
+ display: flex;
195
+ flex-direction: column;
196
+ gap: 15px;
197
+ margin-top: 20px;
198
+ }
199
+
200
+ input { width: 100%; box-sizing: border-box; }
201
+ }
202
+
203
+ .admin-container {
204
+ padding: 40px;
205
+ max-width: 1200px;
206
+ margin: 0 auto;
207
+
208
+ .header {
209
+ display: flex;
210
+ justify-content: space-between;
211
+ align-items: center;
212
+ margin-bottom: 30px;
213
+
214
+ h2 { margin: 0; color: $text; }
215
+ a { color: $primary; text-decoration: none; font-weight: bold; }
216
+ }
217
+
218
+ .controls {
219
+ display: flex;
220
+ gap: 15px;
221
+ align-items: center;
222
+ margin-bottom: 30px;
223
+ flex-wrap: wrap;
224
+
225
+ strong { font-size: 1.1rem; color: $text; }
226
+
227
+ .btn-logout {
228
+ margin-left: auto;
229
+ background: #ef4444;
230
+ &:hover { background: #dc2626; }
231
+ }
232
+ }
233
+
234
+ .chart-container {
235
+ margin-bottom: 40px;
236
+ background: rgba(255, 255, 255, 0.02);
237
+ padding: 25px;
238
+ border-radius: 12px;
239
+ border: 1px solid $border;
240
+
241
+ h3 {
242
+ margin: 0 0 20px;
243
+ font-size: 1.1rem;
244
+ color: $text;
245
+ }
246
+
247
+ .chart {
248
+ display: flex;
249
+ align-items: flex-end;
250
+ height: 150px;
251
+ gap: 4px;
252
+
253
+ .bar-wrapper {
254
+ flex: 1;
255
+ display: flex;
256
+ flex-direction: column;
257
+ align-items: center;
258
+ justify-content: flex-end;
259
+ height: 100%;
260
+
261
+ .count { font-size: 11px; color: $text; margin-bottom: 4px; font-weight: bold; }
262
+ .date { font-size: 10px; margin-top: 8px; color: $text-muted; }
263
+
264
+ .bar {
265
+ width: 100%;
266
+ max-width: 24px;
267
+ border-radius: 4px 4px 0 0;
268
+ transition: height 0.3s ease;
269
+ }
270
+
271
+ .bar.active {
272
+ background: $primary;
273
+ }
274
+ }
275
+ }
276
+ }
277
+
278
+ .grid {
279
+ display: grid;
280
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
281
+ gap: 20px;
282
+ }
283
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "CommonJS",
5
+ "lib": [
6
+ "DOM",
7
+ "DOM.Iterable",
8
+ "ES2022"
9
+ ],
10
+ "jsx": "react-jsx",
11
+ "strict": true,
12
+ "esModuleInterop": true,
13
+ "strictNullChecks": true,
14
+ "skipLibCheck": true,
15
+ "forceConsistentCasingInFileNames": true,
16
+ "resolveJsonModule": true
17
+ },
18
+ "include": [
19
+ "src/**/*",
20
+ "server/**/*",
21
+ "types.d.ts"
22
+ ]
23
+ }
@@ -0,0 +1,26 @@
1
+ import { APIDefinition, Endpoint, Token } from "typed-client-server-api";
2
+
3
+ // The API type defines the contract between your React frontend and Express backend.
4
+ // Every property here represents an endpoint. Both the client and server use this
5
+ // to ensure type safety. If you change a parameter here, TypeScript will immediately
6
+ // warn you if you forgot to update the frontend or backend!
7
+ export type API = APIDefinition<{
8
+ getItems: Endpoint<{}, Item[]>;
9
+ getItem: Endpoint<{ id: string }, Item>;
10
+ addItem: Endpoint<Omit<Item, "_id">, string>;
11
+ removeItem: Endpoint<{ id: string }, boolean>;
12
+
13
+ getEasyAnalyticsData: Endpoint<{ password: string, month: string }, any[]>;
14
+ }>;
15
+
16
+ export type Item = {
17
+ _id: string;
18
+ name: string;
19
+ value: number;
20
+ };
21
+
22
+ // The Database type defines the structure of your JSON files managed by easy-db-node.
23
+ // Each property represents a 'table' (or a separate JSON file).
24
+ export type Database = {
25
+ item: Omit<Item, "_id">;
26
+ };