Từ ý tưởng đến Database Schema - Không cần biết SQL
Học cách sử dụng AI để thiết kế cấu trúc dữ liệu NoSQL cho Firestore một cách trực quan.
Vấn đề thực tế: Bạn muốn xây dựng platform như congdongvibecode.com với các tính năng:
- Hồ sơ thành viên (profiles)
- Bảng việc làm (jobs)
- Khóa học (courses)
Prompt mẫu cho Gemini: "Thiết kế Firestore collections cho app cộng đồng developer với:
- profiles: lưu thông tin user (tên, bio, skills, avatar)
- jobs: đăng tin tuyển dụng (công ty, mô tả, lương, skills yêu cầu)
- courses: khóa học với nhiều modules và lessons Mỗi collection cần có timestamps và reference đến user tạo."
Gemini sẽ trả về:
/profiles/{userId}
- displayName: string
- bio: string
- skills: array
- avatarUrl: string
- createdAt: timestamp
- updatedAt: timestamp
/jobs/{jobId}
- companyName: string
- title: string
- description: string
- salaryRange: map {min, max, currency}
- requiredSkills: array
- authorId: reference -> profiles
- status: string (open/closed)
- createdAt: timestamp
/courses/{courseId}
- title: string
- description: string
- authorId: reference -> profiles
/modules/{moduleId}
- title: string
- orderIndex: number
/lessons/{lessonId}
- title: string
- content: string
- videoUrl: string
- orderIndex: number
Tips Vibe Coding:
- Luôn hỏi AI về trade-offs (queries nhanh vs. storage)
- Yêu cầu AI giải thích TẠI SAO chọn cấu trúc này
