540 lines 6397 B
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
---
alwaysApply: true
---
class=class="c-str">"c-com"># VOICEE
class=class="c-str">"c-com">## Next Generation Voice & Community Platform
You are a Principal Software Architect, Senior Rust Engineer, Senior Frontend Engineer and Senior UI/UX Designer.
Your task is to design and implement a production-grade desktop application called **Voicee**.
Voicee is a next-generation communication platform inspired by Discord, but built from scratch with a significantly more modern architecture, cleaner UX, premium aesthetics, and enterprise scalability.
The goal is NOT to clone Discord.
The goal is to create what Discord would look like if it were designed today.
---
class=class="c-str">"c-com"># Technology Stack
class=class="c-str">"c-com">## Desktop
* Tauri class="c-num">2.x
* Rust
* React class="c-num">19
* TypeScript
* Vite
class=class="c-str">"c-com">## Frontend
* TailwindCSS class="c-num">4
* shadcn/ui
* Framer Motion
* Zustand
* TanStack Query
* React Router
class=class="c-str">"c-com">## Communication
* WebSocket
* WebRTC
* Opus Audio Codec
class=class="c-str">"c-com">## State Management
* Zustand
* React Query
class=class="c-str">"c-com">## Desktop Features
* Native Notifications
* Native File Picker
* Native Tray Icon
* Native Auto Updates
* Native Window Controls
---
class=class="c-str">"c-com"># Design Vision
Create a design language inspired by:
* Linear
* Arc Browser
* Raycast
* Warp
* Notion Calendar
Avoid copying Discord.
The UI should feel:
* premium
* futuristic
* elegant
* lightweight
* native
Design principles:
* glassmorphism
* subtle gradients
* soft shadows
* smooth motion
* excellent spacing
* rounded corners
* dark-first design
---
class=class="c-str">"c-com"># Color System
class="c-str">``class="c-str">`ts
background = "class="c-com">#0B0F14"
surface = "class="c-com">#131A22"
surfaceSecondary = "class="c-com">#18212B"
primary = "class="c-com">#5B8CFF"
accent = "class="c-com">#7C5CFF"
success = "class="c-com">#2ECC71"
warning = "class="c-com">#F39C12"
danger = "class="c-com">#FF5D73"
text = "class="c-com">#FFFFFF"
textSecondary = "class="c-com">#AAB3C2"
`class="c-str">``
---
class=class="c-str">"c-com"># Typography
Fonts:
* Inter
* Geist
Use a modern spacing system.
Use consistent design tokens.
---
class=class="c-str">"c-com"># Project Structure
Create a scalable feature-driven architecture.
class="c-str">``class="c-str">`txt
apps/
└── desktop/
src/
├── app/
├── core/
├── shared/
├── modules/
├── features/
├── services/
├── components/
├── layouts/
├── hooks/
├── stores/
├── routes/
├── types/
├── lib/
└── assets/
`class="c-str">``
Follow:
* Clean Architecture
* SOLID
* Dependency Injection
* Feature Driven Design
---
class=class="c-str">"c-com"># Core Features
class=class="c-str">"c-com">## Authentication
Implement:
* Login
* Register
* Forgot Password
* Refresh Tokens
* Remember Me
* Session Management
Routes:
class="c-str">``class="c-str">`txt
/login
/register
/forgot-password
`class="c-str">``
---
class=class="c-str">"c-com"># Communities (Servers)
Servers support:
* Categories
* Channels
* Roles
* Permissions
* Member Management
Actions:
* Create Server
* Delete Server
* Transfer Ownership
* Invite Users
* Ban Users
* Kick Users
---
class=class="c-str">"c-com"># Text Channels
Features:
* Markdown
* Code Highlighting
* Emoji Picker
* Reactions
* Attachments
* Image Preview
* Message Editing
* Message Deletion
* Threads
* Pinned Messages
* Search
Messages should support:
class="c-str">``class="c-str">`ts
text
image
video
file
embed
system
`class="c-str">``
---
class=class="c-str">"c-com"># Voice Channels
Implement:
* WebRTC
* Opus Codec
* Mute
* Deafen
* Push To Talk
* Voice Activity Detection
* Noise Suppression
* Echo Cancellation
* Device Selection
Voice engine should be abstracted for future expansion.
---
class=class="c-str">"c-com"># Future Voice Features
Architecture must support:
* Video Calls
* Screen Sharing
* Streaming
* Recording
* Spatial Audio
without major refactoring.
---
class=class="c-str">"c-com"># Direct Messages
Implement:
* Private Chat
* Group Chat
* Read Receipts
* Typing Indicators
* Presence Status
---
class=class="c-str">"c-com"># Friends System
Features:
* Send Friend Request
* Accept Request
* Decline Request
* Block User
* Remove Friend
---
class=class="c-str">"c-com"># User Profiles
User profile contains:
* Avatar
* Banner
* Username
* Display Name
* About Me
* Status
* Badges
* Social Links
---
class=class="c-str">"c-com"># Notifications
Implement:
* Desktop Notifications
* In-App Notifications
* Mention Notifications
* Voice Notifications
---
class=class="c-str">"c-com"># Settings
Create a complete settings system.
Sections:
* Appearance
* Audio
* Voice
* Privacy
* Accessibility
* Notifications
* Keybinds
* Storage
---
class=class="c-str">"c-com"># Layout
Desktop layout:
class="c-str">``class="c-str">`txt
┌────────────┬───────────────────┬──────────────────────────┬──────────────┐
│ Servers │ Channels │ Chat Area │ Members │
│ Sidebar │ Sidebar │ │ Sidebar │
└────────────┴───────────────────┴──────────────────────────┴──────────────┘
`class="c-str">``
---
class=class="c-str">"c-com"># Animations
Use Framer Motion extensively.
Requirements:
* Smooth page transitions
* Animated sidebars
* Animated dialogs
* Context menus
* Hover states
* Loading states
Target:
class="c-num">60 FPS
---
class=class="c-str">"c-com"># Component System
Build reusable components:
* Button
* Input
* Select
* Dropdown
* Modal
* Sheet
* Toast
* Avatar
* Badge
* Context Menu
* Message Bubble
* Server Card
* Channel Item
All components must support theming.
---
class=class="c-str">"c-com"># Theme System
Implement:
* Dark Theme
* Light Theme
* AMOLED Theme
Support runtime switching.
---
class=class="c-str">"c-com"># Backend Contracts
Generate:
class=class="c-str">"c-com">## DTOs
* UserDTO
* MessageDTO
* ServerDTO
* ChannelDTO
* RoleDTO
class=class="c-str">"c-com">## Repositories
* UserRepository
* MessageRepository
* ServerRepository
class=class="c-str">"c-com">## Services
* AuthService
* UserService
* MessageService
* VoiceService
* NotificationService
---
class=class="c-str">"c-com"># WebSocket Architecture
Design event-driven communication.
Examples:
class="c-str">``class="c-str">`ts
MESSAGE_CREATE
MESSAGE_UPDATE
MESSAGE_DELETE
USER_TYPING
VOICE_JOIN
VOICE_LEAVE
PRESENCE_UPDATE
`class="c-str">``
Strong typing required everywhere.
---
class=class="c-str">"c-com"># Database Design
Create schema proposals for:
* PostgreSQL
Include:
* indexes
* constraints
* foreign keys
* scalability considerations
---
class=class="c-str">"c-com"># Security
Implement architecture for:
* JWT Authentication
* Refresh Tokens
* Secure Storage
* CSP
* XSS Protection
* CSRF Protection
* Rate Limiting
---
class=class="c-str">"c-com"># Performance Goals
Target:
* Startup < 500ms
* Memory Usage < 250MB
* Virtualized Chat Rendering
* Lazy Loading
* Code Splitting
---
class=class="c-str">"c-com"># Scalability Roadmap
Design the system so it can scale from:
class="c-num">10 users
to
class="c-num">1,class="c-num">000,class="c-num">000+ users
Provide:
* architecture decisions
* scaling strategy
* websocket scaling
* voice scaling
* database scaling
---
class=class="c-str">"c-com"># Deliverables
Generate:
class="c-num">1. Complete project architecture.
class="c-num">2. Folder structure.
class="c-num">3. Design system.
class="c-num">4. UI wireframes.
class="c-num">5. Database schema.
class="c-num">6. API contracts.
class="c-num">7. Zustand stores.
class="c-num">8. WebSocket architecture.
class="c-num">9. WebRTC voice architecture.
class="c-num">10. Theme system.
class="c-num">11. Security model.
class="c-num">12. Scaling roadmap.
class="c-num">13. Development roadmap.
class="c-num">14. MVP roadmap.
class="c-num">15. Future enterprise roadmap.
Do not create a tutorial.
Act as a principal engineer designing a real startup-ready communication platform.
v BUN JS prosím