Document

المستند (Document)

GLS-000091

Beginnerdatabase1 min read
firestore documentdocument referencedocrecord

Definition

A single record in Firestore — like a row in a table — stored as a key-value object.

سجل واحد في Firestore — مثل صف في جدول — مخزّن ككائن قيمة-مفتاح.

Why It Matters

Every piece of content on 404Fault (glossary term, project, prompt, rule, user) is stored as a Firestore document.

كل محتوى في 404Fault (مصطلح غلوساري ومشروع وبرومبت وقاعدة ومستخدم) مخزّن كمستند Firestore.

Full Definition

A Firestore document is a unit of storage containing fields and their values. Documents live inside collections and are identified by an ID (auto-generated or custom). Each glossary term in 404Fault is one document with fields like nameEn, slug, shortDefinitionEn, aliases, etc. Documents can contain nested objects and arrays but cannot exceed 1MB.
مستند Firestore هو وحدة تخزين تحتوي على حقول وقيمها. تعيش المستندات داخل مجموعات وتُحدَّد بمعرّف (يُولَّد تلقائيًا أو مخصص). كل مصطلح في الغلوساري في 404Fault هو مستند واحد بحقول مثل nameEn وslug وshortDefinitionEn وaliases وغيرها. يمكن للمستندات احتواء كائنات ومصفوفات متداخلة لكن لا يمكن أن تتجاوز 1 ميجابايت.

Example Usage

db.collection('glossary').doc('abc123').get() fetches the document with ID 'abc123' from the glossary collection.

db.collection('glossary').doc('abc123').get() يجلب المستند ذو المعرّف 'abc123' من مجموعة glossary.

Knowledge Graph

Avoid these mistakes when using Document:

1

Storing too much data in a single document (1MB limit)

2

Using sequential integer IDs (causes Firestore hotspots) — let Firestore auto-generate IDs

Sign in to unlock guided AI explanations from AI Teacher.

Generate a Prompt

Copy this prompt and use it directly with any AI model — no setup needed.

Ready-to-Use Prompt
Help me build a project using Document.

Explain:
1. What is Document and why it matters
2. The core architecture and required tools
3. Step-by-step implementation plan
4. Common mistakes to avoid: Storing too much data in a single document (1MB limit), Using sequential integer IDs (causes Firestore hotspots) — let Firestore auto-generate IDs
5. Best practices and production tips

Official Resources