NÜAge Database
16 Tables, 1 Vision
MariaDB (projectx) — nx_* schema
Tables
57
Columns
~180
Relationships
14 FK
Design
Plugin-ready
📋 Schema Groups
🧬 Identity (2 tables)
👤
nx_users
Unified identity (email, phone, display_name, locale, status)
1 rows · 16.0 KB
🧬
nx_nuage_profiles
Biological age, scores, tier, streaks, lifestyle data
1 rows · 16.0 KB
📸 Nutrition (2 tables)
📸
nx_food_scans
Photo AI analysis (meal_type, nutrients, nuage_impact, inflammation)
0 rows · 16.0 KB
📝
nx_daily_logs
Comprehensive daily tracking (sleep, activity, vitals, environment, fasting, mood)
0 rows · 16.0 KB
📋 Intelligence (1 tables)
📋
nx_protocols
AI-generated daily plans (morning/afternoon/evening routines, meals, supplements, exercise, fasting)
0 rows · 16.0 KB
🏆 Gamification (2 tables)
🏆
nx_rankings
Cached rankings (global/country/city/age_group/family scope)
0 rows · 16.0 KB
🎖️
nx_badges
18 achievement types (tier_up, streaks, bio_age_down, community_star, etc.)
0 rows · 16.0 KB
💬 Social (4 tables)
💬
nx_posts
Community posts with verified NÜAge data attached
0 rows · 16.0 KB
💭
nx_comments
Post comments
0 rows · 16.0 KB
👥
nx_follows
Follow relationships
0 rows · 16.0 KB
❤️
nx_reactions
Likes, inspire, fire, heart
0 rows · 16.0 KB
👨👩👧👦 Family (2 tables)
👨👩👧👦
nx_families
Family groups
0 rows · 16.0 KB
👶
nx_family_members
Members with roles (parent, child, spouse, etc.)
0 rows · 16.0 KB
💰 Business (4 tables)
🤝
nx_partners
B2B partner brands (restaurants, fitness, supplements, insurance)
0 rows · 16.0 KB
🎁
nx_redemptions
User redemptions of partner offers
0 rows · 16.0 KB
🔔
nx_notifications
All notification types
0 rows · 16.0 KB
📊
nx_metrics
Analytics tracking
0 rows · 16.0 KB
🏗️ Key Design Principles
🧬
Single Source of Truth
NÜAge Profile = ทุกอย่างคำนวณกลับมาที่
biological_age
📸
Every Scan Counts
Every Food Scan →
nuage_impact — ทุกมื้อมีผลต่ออายุ
✅
Verified Posts
ทุก post ติด
verified_nuage + verified_bio_age จาก DB จริง
👨👩👧👦
Family Graph
nx_families + nx_family_members เชื่อมครอบครัว
🔌
Plugin Partners
nx_partners + target_tiers ทำ B2B matching อัตโนมัติ
🔗 Entity Relationships
nx_users ─┬─ nx_nuage_profiles (1:1)
│
├─ nx_food_scans (1:N) ──── nx_protocols (1:N)
├─ nx_daily_logs (1:N)
│
├─ nx_rankings (1:N)
├─ nx_badges (1:N)
│
├─ nx_posts (1:N) ─┬─ nx_comments (1:N)
│ └─ nx_reactions (1:N)
├─ nx_follows (N:N)
│
├─ nx_family_members (N:N) ── nx_families
│
├─ nx_redemptions (1:N) ←── nx_partners
└─ nx_notifications (1:N)
nx_metrics (standalone analytics)