FamiRoots is an AI-enhanced web platform designed to preserve and explore Ugandan family heritage. It serves as a digital repository of family histories, relationships, and cultural knowledge, with a focus on Uganda's tribal and clan systems.
-
Family Heritage
- In Ugandan context: The passing down of family history, traditions, and relationships
- Includes: Names, stories, relationships, tribal affiliations, and clan connections
- Cultural significance: Preserves traditional knowledge for future generations
-
Tribe (Endemic to Uganda)
- Major ethnic groupings in Uganda (e.g., Baganda, Banyankole, Basoga)
- Each has distinct cultural practices, languages, and traditions
- Hierarchical structure with clans as subdivisions
-
Clan System
- Subdivisions within tribes
- Share common ancestors and totems
- Important for marriage customs and social organization
-
Elder
- Every tribe has an ancestor from whom clans descend broken down into families
- An elder is a man in a particular clan from whom many families can trace their origins
- Individuals trace their origins from paternal figures from either side of parents
- Elders are crucial reference points for verifying family relationships
-
Family Tree
- Visual representation of family relationships
- Shows generational connections
- Includes tribal and clan affiliations
-
Verification System
- Process of confirming family connections
- Involves elder approval and expert review
- Maintains accuracy of family histories
-
Cultural Resources
- Traditional practices
- Historical information
- Customs and ceremonies
- Naming conventions
-
User Types
- Seeker: Regular users seeking family information
- Expert: Verified cultural/genealogical experts
- Admin: Platform managers
FamiRoots is an AI-enhanced web platform that preserves Ugandan family heritage by connecting individuals to their ancestral roots through tribal and clan systems. The platform enables users to discover, document, and verify family connections while preserving cultural knowledge across generations.
- Simple registration system with basic personal details
- Profile creation with tribal affiliation, clan identification, and known family connections
- Option to upload photos and share family stories
- Core Feature: AI family tree generator that builds and expands connections based on verified clan and elder information
- Visual representation of family relationships organized by clans, not individuals
- Family trees expand automatically when connections through shared elders are verified
- Focuses on showing relationships between families within clans, not isolated individuals
- Centralized database of verified clan elders serving as ancestral anchors
- Three-level verification process:
- User submissions (unverified)
- Community verification (by multiple family members)
- Expert verification (by historians, researchers, or recognized clan authorities)
- Simple interface for users to connect their lineage to established elders
- Structured information about Ugandan tribes and clans
- Cultural practices, traditions, and naming conventions
- Accessible reference for users exploring their heritage
- Tool for determining if two specific individuals are related
- Users input information about themselves and another person
- System analyzes clan affiliations and elder connections to determine relatedness
- Provides clear explanation of relationship if it exists
- Collaborative verification system allowing family members to confirm relationships
- Simple dispute resolution for conflicting information
- Rating system for information reliability
- User-friendly interface with Uganda flag colors (black, yellow, red)
- Intuitive navigation between family members, clans, and tribes
- Mobile-responsive design for access across devices
- User registers and creates a profile with tribal and clan information
- User connects their lineage to a known elder from their clan
- AI generates initial family tree showing the user's family's place within the clan structure
- User adds known family members aligned with clan organization
- User can use the Relationship Analyzer to check connections with specific individuals
- User explores clan-based family structures and cultural information
- Family tree expands as more families within the clan are connected through shared elders
- Expert registers with credentials and expertise in specific tribal/clan knowledge
- Admin reviews and verifies expert status based on qualifications
- Expert gains access to verification dashboard showing pending elder verifications
- Expert reviews user-submitted elder connections and family-clan relationships
- Expert approves, rejects, or suggests modifications to submissions
- Expert contributes to clan knowledge base with historical information
- Expert participates in resolving conflicting family claims within clans
- Expert validates the accuracy of clan-based family organizations
- Admin registers through special administrative channel
- Admin reviews expert applications and assigns verification privileges
- Admin monitors verification activities and quality metrics
- Admin resolves escalated disputes between users or experts
- Admin manages the elder database, ensuring integrity
- Admin oversees clan-based family tree structures
- Admin maintains tribal and clan knowledge base
- Admin generates reports on platform usage and cultural preservation impact
The AI Relationship Analyzer is a focused tool that determines whether two specific individuals are related by analyzing their connections to elders and clan affiliations.
-
Input Collection: User inputs:
- Information about themselves (clan, known elders, family connections)
- Information about the other person (clan, known elders, family connections)
-
Relationship Analysis: The system:
- Traces both individuals' connections to verified elders
- Analyzes clan and subclan affiliations
- Examines family lineages within clan structures
- Identifies common ancestral points if they exist
-
Relationship Determination: The analyzer:
- Confirms or denies the existence of a relationship
- If related, specifies the exact nature of the relationship (e.g., third cousins, sharing the same great-grandfather)
- Provides the clan-based context of the relationship
- Shows the common elder connection that establishes the relationship
-
Result Communication: The system:
- Presents clear visual representation of the relationship path
- Explains the relationship in cultural context
- Indicates the generational distance between individuals
- Highlights the clan significance of the connection
-
Verification Guidance: If relationship status is uncertain:
- Suggests specific information needed for confirmation
- Directs users to relevant clan elders who might verify the connection
- Recommends specific experts who could provide clarification
-
Primary Sources:
- Uganda National Museum archives
- Cultural Research Centre at Makerere University
- Traditional kingdom records (Buganda, Bunyoro, Toro, etc.)
- Oral history recordings from tribal elders
- Colonial-era anthropological records
-
Secondary Sources:
- Published ethnographic studies on Ugandan tribes
- Academic research on clan structures
- Historical migration records
- National census data with tribal affiliations
- Cultural preservation NGO databases
-
Community Contributions:
- Verified family histories
- Elder interviews and testimonies
- Cultural practice documentation
- Traditional naming pattern records
- Self-Improving Database: A core knowledge repository that continuously refines and expands based on machine learning algorithms
- Data Verification: Cross-references new information against established patterns
- Pattern Recognition: Identifies tribal and clan relationships from fragmented information
- Knowledge Gap Identification: Highlights areas where cultural information is incomplete
-
AI Family Tree Generator:
- Algorithm: Graph Neural Networks (GNN)
- OpenAI API: GPT-4 with fine-tuning on family relationship patterns
- Purpose: Constructs clan-based family trees by analyzing connections between families and elders
- Implementation: Uses GPT-4's reasoning capabilities to establish logical family connections based on verified elder relationships
-
Relationship Analyzer:
- Algorithm: Path-finding algorithms with GPT-assisted reasoning
- OpenAI API: GPT-4 with few-shot learning examples
- Purpose: Determines precise relationships between two individuals by tracing their connections to common elders
- Implementation: Combines structured data analysis with GPT-4's understanding of Ugandan family relationship terminology
-
Elder Verification System:
- Algorithm: Ensemble learning with human-in-the-loop verification
- OpenAI API: GPT-4 with classification fine-tuning
- Purpose: Evaluates the likelihood of submitted elder information being accurate
- Implementation: Analyzes consistency with known historical records and cultural patterns, flagging discrepancies for expert review
-
Cultural Knowledge Base:
- Algorithm: Knowledge graph with semantic embedding
- OpenAI API: GPT-4 + Embeddings API
- Purpose: Organizes cultural information into interconnected knowledge structure
- Implementation: Creates semantic relationships between cultural concepts, traditions, and practices
-
Information Verification:
- Algorithm: Consensus-based truth discovery
- OpenAI API: GPT-4 with content verification fine-tuning
- Purpose: Evaluates the reliability of submitted cultural and genealogical information
- Implementation: Analyzes information consistency across multiple submissions and sources
const UGANDA_THEME = {
colors: {
black: "#000000", // Header, text
yellow: "#FFCE00", // Accents, highlights
red: "#D90000", // Primary actions, important elements
background: "#FAF6F1" // Warm, earthy background
}
};const TYPOGRAPHY = {
headings: {
fontFamily: "'Playfair Display', serif", // Traditional
weights: [600, 700]
},
body: {
fontFamily: "'Inter', sans-serif", // Modern
weights: [400, 500]
}
};const DESIGN_PATTERNS = {
borderRadius: '0.5rem',
shadows: {
small: '0 2px 4px rgba(0,0,0,0.1)',
medium: '0 4px 6px rgba(0,0,0,0.1)'
},
spacing: {
base: '1rem',
container: '2rem'
}
};const DEFAULT_USERS = {
seeker: {
username: "DefaultSeeker",
password: "Test@2025",
role: "user",
permissions: ["view", "create", "connect"]
},
expert: {
username: "DefaultExpert",
password: "Test@2025",
role: "expert",
permissions: ["view", "create", "connect", "verify"]
},
admin: {
username: "DefaultAdmin",
password: "Test@2025",
role: "admin",
permissions: ["all"]
}
};// User Types
interface BaseUser {
id: string;
username: string;
role: 'user' | 'expert' | 'admin';
fullName?: string;
tribe?: string;
clan?: string;
createdAt: Date;
}
// Family Member
interface FamilyMember {
id: string;
name: string;
birthYear?: number;
deathYear?: number;
tribe: string;
clan: string;
isElder: boolean;
verified: boolean;
verificationLevel: 'unverified' | 'community' | 'expert';
stories: Story[];
relationships: Relationship[];
familyUnit: string; // Reference to family unit within clan
}
// Cultural Context
interface CulturalContext {
tribe: string;
clan: string;
traditions: string[];
ceremonies: string[];
language: string;
}
// Relationship
interface Relationship {
fromId: string;
toId: string;
type: 'parent' | 'child' | 'spouse' | 'sibling';
verified: boolean;
verifiedBy?: string;
}
// Story
interface Story {
id: string;
title: string;
content: string;
memberId: string;
verified: boolean;
createdAt: Date;
}
// Clan Structure
interface Clan {
id: string;
name: string;
tribe: string;
origin: string;
totem?: string;
elders: ElderReference[];
culturalPractices: string[];
historicalNotes: string[];
verificationThreshold: number; // Minimum verification score needed
}
// Elder Reference
interface ElderReference {
id: string;
name: string;
approximateEra: string;
verificationScore: number;
verifiedBy: string[];
familyUnits: string[]; // Families descended from this elder
}
// Enhanced Relationship Analyzer Result
interface RelationshipResult {
isRelated: boolean;
relationshipType?: string;
commonElder?: ElderReference;
generationalDistance?: number;
clanContext: string;
confidenceScore: number;
verificationPath: string[];
}import React from 'react';
import { useAuth } from '@/hooks/useAuth';
import { UGANDA_THEME } from '@/constants/theme';
interface ComponentProps {
// props definition
}
export const ComponentName: React.FC<ComponentProps> = ({ prop1, prop2 }) => {
const { user } = useAuth();
return (
<div className="bg-background p-4 rounded-lg">
{/* Component content */}
</div>
);
};// Auth Context
interface AuthContextType {
user: BaseUser | null;
isLoading: boolean;
login: (username: string, password: string) => Promise<void>;
logout: () => Promise<void>;
}
// Family Context
interface FamilyContextType {
members: FamilyMember[];
addMember: (member: Omit<FamilyMember, 'id'>) => Promise<void>;
updateMember: (id: string, data: Partial<FamilyMember>) => Promise<void>;
}// Family Tree Generation
const generateFamilyTree = async (
userId: string,
elderConnections: ElderReference[],
clanId: string
): Promise<FamilyTreeStructure> => {
// 1. Gather all verified family units connected to the user's elders
// 2. Use OpenAI GPT-4 to analyze connections and establish hierarchy
// 3. Generate tree structure organized by clan and elder connections
const response = await openai.createCompletion({
model: "gpt-4",
prompt: generateFamilyTreePrompt(userId, elderConnections, clanId),
temperature: 0.3, // Lower temperature for more deterministic results
max_tokens: 2000
});
return parseFamilyTreeResponse(response.data);
};
// Relationship Analysis
const analyzeRelationship = async (
person1: FamilyMember,
person2: FamilyMember
): Promise<RelationshipResult> => {
// 1. Trace connections to shared elders
// 2. Use GPT-4 to determine relationship type and context
// 3. Calculate confidence score based on verification levels
const response = await openai.createCompletion({
model: "gpt-4",
prompt: generateRelationshipPrompt(person1, person2),
temperature: 0.2,
max_tokens: 1000
});
return parseRelationshipResponse(response.data);
};
// Knowledge Base Enhancement
const enhanceKnowledgeBase = async (
newInformation: CulturalInformation,
existingKnowledge: KnowledgeBase
): Promise<KnowledgeBaseUpdate> => {
// 1. Use Embeddings API to find related knowledge
// 2. Use GPT-4 to assess consistency and novelty
// 3. Integrate new information into knowledge structure
const embeddingResponse = await openai.createEmbedding({
model: "text-embedding-ada-002",
input: newInformation.content
});
const relatedKnowledge = findRelatedKnowledge(
embeddingResponse.data.embedding,
existingKnowledge
);
const integrationResponse = await openai.createCompletion({
model: "gpt-4",
prompt: generateKnowledgeIntegrationPrompt(newInformation, relatedKnowledge),
temperature: 0.3,
max_tokens: 1500
});
return parseKnowledgeUpdate(integrationResponse.data);
};- Use default users only (no signup)
- Implement role-based access
- Maintain session with Supabase
- Handle loading and error states
- Implement basic tree visualization
- Allow adding/editing family members
- Support relationship mapping
- Include elder verification
- Add tribe/clan selection
- Include basic traditions listing
- Support elder verification
- Store cultural resources
- Lazy load components
- Optimize images
- Implement basic caching
- Minimize API calls
- Use pagination where needed
- Role-based access control
- Input validation
- Basic error handling
- Session management
- Set up basic project structure
- Implement authentication
- Create family tree visualization
- Add cultural information
- Implement verification system
- Add admin features
const BREAKPOINTS = {
mobile: '320px',
tablet: '768px',
desktop: '1024px'
};
// Tailwind classes example
const RESPONSIVE_CLASSES = {
container: 'w-full px-4 md:px-6 lg:px-8',
card: 'p-4 md:p-6 rounded-lg shadow-sm',
grid: 'grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4'
};const handleError = (error: unknown) => {
console.error('Operation failed:', error);
return {
message: error instanceof Error ? error.message : 'An unexpected error occurred',
status: 'error'
};
};- Network failures
- Invalid data
- Unauthorized access
- Concurrent updates
- Missing relationships
- Unverified information
- Test user roles
- Verify relationships
- Check cultural data
- Validate form inputs
- Test responsiveness
- Keep the interface simple and intuitive
- Focus on cultural authenticity
- Prioritize performance
- Handle errors gracefully
- Maintain consistent styling using the Ugandan flag colors
- Ensure the platform respects cultural sensitivities
- Make the family tree visualization clear and understandable
- Prioritize the elder verification system as a cornerstone feature