Overview
The Mapademics platform is built around a comprehensive data model that organizes educational content, job market data, and extracted skills in a hierarchical, multi-tenant structure. This reference provides technical administrators with a complete understanding of how data is organized, related, and processed within the platform. Understanding this data model is essential for:- Data import planning and bulk operations
- Integration with external systems
- Troubleshooting data relationships
- Configuring skills processing pipelines
- Understanding report data sources
Core Architecture Principles
Multi-Tenant Organization Structure
Every entity in Mapademics belongs to an Organization, which serves as the primary tenant boundary. Organizations provide complete data isolation and independent configuration management.Section-Based Skills Architecture
Soft Deletion Pattern
All core entities use soft deletion withdeletedAt
timestamps, ensuring data integrity and audit capabilities. Deleted items remain in the database but are excluded from normal queries.
Educational Data Hierarchy
Organization → Program → Course → Course Section
The educational data follows a clear hierarchical structure:Level | Entity | Purpose | Key Relationships |
---|---|---|---|
1 | Organization | Tenant boundary | Root of all data |
2 | Program | Degree/Certificate programs | Contains ordered courses |
3 | Course | Individual academic courses | Has multiple sections |
4 | Course Section | Specific course offerings | Instructor + skills |
Program Structure
Programs represent degree programs, certificates, or other educational pathways with specific Classification of Instructional Programs (CIP) codes. Key Fields:name
- Program titlecode
- Internal program identifiercipCode
- Standard CIP classificationcourseOrder
- Array defining course sequencemetadata
- JSON metadata storageauditTrail
- JSON audit logging
- Many-to-many with Courses (supports shared courses across programs)
- Belongs to single Organization
Course Structure
Courses are the fundamental academic units that can appear in multiple programs. Key Fields:name
- Course titlecode
- Course identifier (e.g., “CS101”)description
- Course descriptiondefaultSectionId
- Primary section referencesyllabusHref
- Legacy syllabus linkskills
- JSON array of extracted skills
- Many-to-many with Programs
- One-to-many with Course Sections
- Belongs to single Organization
Course Section Structure
Course Sections represent specific offerings of a course, typically with unique instructors and syllabi. Key Fields:name
- Section identifierdescription
- Section-specific descriptionsyllabusHref
- Section-specific syllabusskills
- JSON array of ParsedSkill objectsmetadata
- JSON metadata storageauditTrail
- JSON audit logging
- Belongs to one Course
- Optional relationship with Instructor
- Many-to-many with Stackable Credentials
- Belongs to single Organization
Instructor Structure
Instructors are faculty members who teach course sections. Key Fields:name
- Instructor full nameemail
- Contact emaildetails
- Additional instructor information
- One-to-many with Course Sections
- Belongs to single Organization
Job Market Data Structure
Employer → Custom Job Hierarchy
Job market data is organized to support both national labor statistics and institution-specific employer relationships.Entity | Purpose | Skills Source |
---|---|---|
Employer | Partner organizations | Via Custom Jobs |
Custom Job | Specific job descriptions | Direct skills extraction |
Employer Structure
Employers represent partner organizations or companies that provide job descriptions for analysis. Key Fields:name
- Company/organization namedescription
- Employer description
- One-to-many with Custom Jobs
- Belongs to single Organization
Custom Job Structure
Custom Jobs contain specific job descriptions that undergo skills extraction processing. Key Fields:name
- Job titledescription
- Job descriptionjobDescriptionHref
- Document linkskills
- JSON array of extracted skills
- Belongs to one Employer (optional)
- Belongs to single Organization
Skills Data Structure
ParsedSkill Type Definition
Skills across the platform use a consistent ParsedSkill structure:Skills Storage Locations
Skills are stored as JSON arrays in multiple locations:Entity | Skills Field | Primary Use |
---|---|---|
Course Section | skills | Primary skills storage (current model) |
Course | skills | Legacy support (being migrated) |
Custom Job | skills | Job requirements analysis |
Open Skills Taxonomy (OST) Integration
All skills reference the Open Skills Taxonomy, a standardized framework providing:- Unique skill identifiers
- Hierarchical skill categories
- Standardized skill descriptions
- Cross-industry skill mapping
Stackable Credentials System
Many-to-Many Course Section Relationships
Stackable Credentials represent micro-credentials or certificates that span multiple course sections. Key Fields:name
- Credential titlecode
- Credential identifierdescription
- Credential descriptionmetadata
- JSON metadata storage
- Many-to-many with Course Sections
- Belongs to single Organization
- Industry certifications
- Professional development tracks
- Competency-based credentials
- Cross-program skill pathways
Batch Processing Architecture
Processing Job Hierarchy
All heavy computational work is handled through Trigger.dev batch processing jobs with a consistent parent-child pattern:Syllabus Processing Jobs
Structure:- SyllabusProcessingBatchJob (parent)
- SyllabusProcessingItems (children)
- Section-based processing (new model)
- Course-based processing (legacy support)
- Prompt configuration tracking
- Status monitoring and error handling
Job Description Processing Jobs
Structure:- JobDescriptionProcessingBatchJob (parent)
- JobDescriptionProcessingItems (children)
- Custom job document analysis
- Skills extraction using AI
- Manual review for uncertain classifications
- Final skills attachment to job records
SOC Skills Mapping Jobs
Structure:- SocClassificationBatchJob (parent)
- SOCSkillsMapping records (children)
- Maps Standard Occupational Classification (SOC) codes to OST skills
- Enables job market alignment analysis
- Supports career pathway recommendations
AI Processing Configuration
Organization-Level Model Configuration
Each organization maintains a ModelConfiguration record controlling AI model selection and parameters: Syllabus Processing Models:- Structure extraction model & temperature
- Skills extraction model & temperature
- Skills grading model & temperature
- Cognitive skills model & temperature
- Structure extraction model & temperature
- Skills extraction model & temperature
- Skills grading model & temperature
- Classification model & temperature
Custom Prompt Templates
Organizations can override default AI prompts with PromptTemplate records: Structure:pipeline
- “syllabus” or “job-description”step
- Processing stage identifierversion
- Template versioninstructionPrompt
- Custom prompt textisActive
- Template status
Bulk Data Import System
Import Process Structure
BulkImport records track large-scale data import operations: Key Fields:filename
- Source file nametotalItems
- Expected import countprocessedItems
- Current progressstatus
- Processing stateconflictResolutions
- User decisions for conflictsresults
- Detailed import outcomes
Conflict Resolution System
The bulk import system handles data conflicts through structured resolution types:Authentication & User Management
User Organization Relationships
Users belong to organizations with role-based access control: User Roles:USER
- Standard organization memberADMIN
- Organization administratorMAPADEMICS_ADMIN
- Platform administrator
organization
- Primary organization membershipmaOrganization
- Mapademics admin organization (for staff)
Authentication Models
Supported Authentication:- NextAuth.js with multiple providers
- Credentials provider with password storage in
IdPUser
- OAuth providers (GitHub, etc.)
- Session management with JWT tokens
Data Integrity & Constraints
Required Relationships
Critical Foreign Keys:- All entities MUST belong to an organization
- Course sections MUST belong to a course
- Processing items MUST belong to a batch job
- Skills MUST reference valid OST identifiers
Unique Constraints
Important Uniqueness Rules:- Organization
publicApiKey
is globally unique - User
email
is globally unique - SOC code mapping is unique per SOC code
- Prompt templates are unique per organization+pipeline+step
JSON Field Validation
Structured JSON Fields:skills
arrays must contain valid ParsedSkill objectsmetadata
follows organization-specific schemasauditTrail
maintains chronological change records
Performance Considerations
Indexing Strategy
Key Database Indexes:- Organization ID on all tenant-scoped entities
- Skills processing batch job status
- User email for authentication lookups
- SOC processing status for review workflows
Query Optimization
Best Practices:- Always filter by organization ID first
- Use soft deletion filters consistently
- Leverage JSON indexing for skills queries
- Cache OST skills data for performance
Migration & Compatibility
Section-Based Skills Migration
The platform supports both legacy course-level skills and modern section-level skills: Migration Process:- Legacy courses with skills create a “Main Section”
- Skills are copied to the new section
- Course maintains skills for backward compatibility
- New workflows use section-based skills exclusively
- Existing reports work with both models
- API endpoints support both access patterns
- Bulk imports create sections automatically