1022 B
1022 B
Base de Dados — Firestore
🔐 Users
users/ userId/ email: string username: string themeMode: "system" | "light" | "dark" primaryColor: string (hex) language: "pt" | "en" favoriteGenres: [string] createdAt: timestamp
🎵 Songs
songs/ songId/ title: string artist: string url: string coverUrl: string userId: string genre: string mood: string duration: number createdAt: timestamp
📂 Playlists
playlists/ playlistId/ name: string userId: string songs: [songId] createdAt: timestamp
💬 Chats
chats/ chatId/ participants: [userId] lastMessage: string updatedAt: timestamp
📨 Messages
messages/ messageId/ chatId: string senderId: string text: string (optional) songId: string (optional) timestamp: timestamp
⚡ Regras importantes
- Nunca duplicar dados desnecessários
- Usar IDs para relações
- Otimizar leituras (Firestore billing)