You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for your interest in contributing to Taeafi! We welcome all contributions that help improve this application and make it more beneficial for users seeking recovery and spiritual growth.
# 1. Fork the repository# Click "Fork" button on GitHub# 2. Clone your fork
git clone https://github.com/YOUR-USERNAME/taeafi.git
# 3. Navigate to projectcd taeafi
# 4. Add upstream remote
git remote add upstream https://github.com/wsl-iq/taeafi.git
# 5. Create a branch
git checkout -b feature/your-feature-name
# 6. Start developing!# Use any local server to run the app
python -m http.server 8000
# or
npx http-server
# or use VS Code Live Server extension
Keeping Your Fork Updated
# Fetch upstream changes
git fetch upstream
# Merge into your main branch
git checkout main
git merge upstream/main
# Push to your fork
git push origin main
* Code Guidelines*
<!-- ✅ DO: Semantic HTML5 elements --><mainclass="main-content"><articleclass="card"><headerclass="card-header"><h2class="card-title">Title</h2></header><pclass="card-description">Description</p></article></main><!-- ❌ DON'T: Div soup without semantics --><divclass="content"><divclass="box"><divclass="title">Title</div><divclass="text">Description</div></div></div>
HTML Checklist
□ Use semantic elements (
, , , )
□ All text in Arabic (RTL)
□ Proper heading hierarchy (h1 → h2 → h3)
□ Accessible ARIA labels where needed
□ Alt text for images
□ Valid HTML5 markup
□ Use CSS variables from variables.css
□ Support dark theme (.theme-dark class)
□ Mobile-first responsive approach
□ RTL compatible (use right/left correctly)
□ No !important unless overriding inline styles
□ Proper Flexbox/Grid usage
// ✅ DO: ES6+ class syntaxclassStorageManager{static #privateField;staticgetData(){returnthis.#privateField;}}// ✅ DO: Async/await for async operationsasyncfunctionfetchData(){constdata=awaitgetFromStorage();returndata;}// ✅ DO: Template literals for HTMLconsthtml=` <div class="card"> <h2>${title}</h2> <p>${description}</p> </div>`;// ❌ DON'T: Use varvardata='old style';// ❌ DON'T: Use eval()eval('alert("danger")');// ❌ DON'T: Use innerHTML with user inputelement.innerHTML=userInput;// XSS risk!
JavaScript Checklist
□ Use const and let (never var)
□ ES6+ features (classes, arrow functions, template literals)
□ No eval() or Function() constructors
□ Proper error handling with try/catch
□ Comments in Arabic for complex logic
□ No external JS dependencies
□ All data from trusted sources (hardcoded in files)
Commit Convention
We use Arabic commit messages with specific prefixes:
Prefix Table
Prefix
Meaning
Example
إضافة:
New feature
إضافة: عداد التسبيح الرقمي
تصحيح:
Bug fix
تصحيح: إصلاح العداد المتوقف
تحديث:
Update
تحديث: تحسين محتوى العادة السرية
تحسين:
Improvement
تحسين: زيادة سرعة التحميل
توثيق:
Documentation
توثيق: إضافة README.md
حذف:
Removal
حذف: إزالة الكود غير المستخدم
إصلاح:
Hotfix
إصلاح: مشكلة الأيقونات في الوضع الداكن
تنظيف:
Refactor
تنظيف: إعادة هيكلة ملفات CSS
Commit Examples
# Feature
git commit -m "إضافة: نظام الرسائل التحفيزية حسب مدة التعافي"# Bug fix
git commit -m "تصحيح: العداد لا يعمل بعد تسجيل الانتكاسة"# Content
git commit -m "تحديث: إضافة محتوى خاص بالنساء لقسم التدخين"# Docs
git commit -m "توثيق: إضافة دليل المساهمة CONTRIBUTING.md"
🔄 Pull Request Process
Before Submitting
Step
Action
1
Test your changes thoroughly
2
Check all responsive breakpoints
3
Verify dark theme compatibility
4
Test PWA functionality
5
Run through accessibility checks
6
Update documentation if needed
7
Rebase on latest main branch
PR Template
## وصف التغييرات[شرح واضح للتغييرات التي قمت بها]## نوع التغيير-[ ] إضافة ميزة جديدة
-[ ] تصحيح خطأ
-[ ] تحسين
-[ ] توثيق
-[ ] أخرى: [حدد]## الاختبارات-[ ] تم الاختبار على Chrome
-[ ] تم الاختبار على Firefox
-[ ] تم الاختبار على Safari
-[ ] تم الاختبار على الموبايل
-[ ] تم اختبار الوضع الداكن
-[ ] تم اختبار اللغة العربية (RTL)
## لقطات شاشة[أضف لقطات إذا كانت التغييرات بصرية]## ملاحظات إضافية[أي معلومات إضافية]
Review Process
Stage
Timeframe
Action
Submission
Day 0
PR opened
Initial Review
1-3 days
Maintainer reviews
Feedback
1-2 days
Changes requested (if any)
Re-review
1-2 days
Updated code reviewed
Merge
After approval
Merged to main
📚 Content Guidelines
Health Information
Guideline
Description
Accuracy
All medical/health claims must be verifiable
Sources
Cite references where possible
Language
Use clear, respectful Arabic
Balance
Present both risks and solutions
No Extremism
Avoid fear-mongering or extreme claims
Religious Content
Guideline
Description
Authenticity
Use verified sources (Quran, authentic hadith)
Respect
Respect all Islamic schools of thought
Inclusivity
Content from both Sunni and Shia traditions
Accuracy
Verify text of verses and supplications
Sources
Always cite the source (book, chapter, narrator)
Data Structure for Content
// Example: Adding a new habit sectionconstHABIT_CONTENT={'habit-name': {title: 'العنوان بالعربية',icon: 'fa-icon-name',// Font Awesome iconcolor: '#HEX_COLOR',// Theme colorcommon: [// Shared content for both genders{id: 'unique-id',title: 'عنوان القسم',type: 'info',// 'info', 'danger', 'warning', 'success'content: 'محتوى القسم...'}],male: [// Male-specific content{id: 'male-unique-id',title: 'أضرار خاصة بالرجال',type: 'danger',content: 'محتوى خاص بالرجال...'}],female: [// Female-specific content{id: 'female-unique-id',title: 'أضرار خاصة بالنساء',type: 'danger',content: 'محتوى خاص بالنساء...'}]}};