A comprehensive personality assessment tool that identifies your social archetype through a series of carefully crafted questions. Built with modern web technologies and designed to provide deep insights into personality types and social behavior patterns.
- Separated concerns: Questions, archetypes, and utilities are now in separate files
- Easy customization: Modify archetypes and questions independently
- Better maintainability: Clear separation of data and logic
- Enhanced admin features: Delete functionality with X icons
- User choice tracking: Capture what users actually resonate with vs quiz results
- Added
user_selected_archetype
field to track user preferences - Automatic migration from v1 and v2 schemas
- Better analytics and insights
- 15-Question Assessment: Scientifically-designed questions that map to 9 distinct archetypes
- Real-time Results: Instant calculation and display of personality breakdown
- User Choice Capture: Track which archetype users actually resonate with
- Email Integration: Automated delivery of detailed results to participants
- Admin Dashboard: Comprehensive analytics and submission management with delete functionality
- Data Export: Enhanced CSV export with quiz results vs user selections
- Progressive Interface: Email → Intro → Countdown → Quiz → Results → Choice Selection flow
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- Interactive Elements: Smooth animations, progress tracking, and visual feedback
- Social Sharing: Built-in sharing capabilities for social media platforms
- Archetype Selection: Users can choose which archetype they most resonate with
- Quiz vs Reality Comparison: See how quiz results compare to user self-selection
- Personality Complexity Scoring: Measures trait distribution balance (0.0-1.0)
- Response Consistency Analysis: Evaluates answer pattern consistency
- Completion Time Tracking: Detailed timing analytics for each submission
- Archetype Distribution: Statistical breakdown of result patterns
- SQLite Database: Robust local storage with automatic schema versioning (v3.0)
- Data Migration: Seamless upgrades between schema versions
- Privacy Protection: IP hashing and secure data handling
- Admin Controls: Delete individual submissions with confirmation
- Backup & Recovery: Built-in data export and recovery mechanisms
CREATE TABLE sssc_quiz_submissions_v3 ( id INTEGER PRIMARY KEY AUTOINCREMENT, email TEXT NOT NULL, primary_archetype TEXT NOT NULL, secondary_archetype TEXT, user_selected_archetype TEXT, -- NEW: User's actual choice breakdown TEXT NOT NULL, -- JSON: archetype scores answers TEXT NOT NULL, -- JSON: user responses timestamp DATETIME DEFAULT CURRENT_TIMESTAMP, completion_time INTEGER, -- milliseconds insights TEXT, -- JSON: additional analytics user_agent TEXT, ip_hash TEXT, -- hashed for privacy session_id TEXT, quiz_version TEXT DEFAULT '3.0', personality_complexity_score REAL, -- 0.0-1.0 response_consistency_score REAL, -- 0.0-1.0 created_at DATETIME DEFAULT CURRENT_TIMESTAMP, updated_at DATETIME DEFAULT CURRENT_TIMESTAMP );
ssscQuiz/
├── frontend/
│ ├── components/
│ │ ├── App.tsx # Main application component
│ │ ├── EmailScreen.tsx # Email collection interface
│ │ ├── IntroScreen.tsx # Welcome and instructions
│ │ ├── CountdownScreen.tsx # Pre-quiz countdown
│ │ ├── PersonalityQuiz.tsx # Main quiz interface
│ │ └── QuizResultsComponent.tsx # Results + archetype selection
│ ├── index.html # Main HTML template
│ ├── index.tsx # Frontend entry point
│ └── style.css # Application styles
├── shared/
│ ├── archetypes.ts # 🆕 Archetype definitions (modular)
│ ├── questions.ts # 🆕 Quiz questions (modular)
│ ├── database.ts # Database schema and utilities
│ ├── quizData.ts # Re-exports for compatibility
│ ├── types.ts # TypeScript interfaces
│ └── utils.ts # Shared utility functions
├── admin.http.ts # Admin dashboard with delete functionality
├── config.ts # Configuration and settings
├── index.http.ts # Main HTTP entry point
├── main.tsx # Legacy entry point (redirects)
└── README.md # This file
Adventurous, Curious
- Driven by curiosity and love for adventure
- Thrives on discovering new experiences and cultures
- Natural pioneer who inspires others to step outside comfort zones
Transformative, Intuitive
- Transforms challenges into opportunities for growth
- Deep intuition and spiritual insight
- Helps others navigate life transitions
Empathetic, Collaborative
- Excels at bringing people together
- Natural bridge-builder and relationship facilitator
- Creates inclusive environments for collaboration
Creative, Innovative
- Sees possibilities where others see limitations
- Forward-thinking with ability to inspire others
- Naturally drawn to cutting-edge ideas
Caring, Compassionate
- Natural gift for caring and supporting others
- Creates safe spaces for healing and growth
- Deep fulfillment from helping others reach potential
Protective, Reliable
- Protector and stabilizer ensuring safety and security
- Practical wisdom that keeps communities strong
- Provides foundation for others to take risks
Wise, Reflective
- Seeker of wisdom and understanding
- Helps others navigate complex situations with clarity
- Knowledge becomes guiding light for truth-seekers
Creative, Expressive
- Brings beauty and creativity into the world
- Unique perspective and skilled craftsmanship
- Sees world through artistic lens
Motivating, Dynamic
- Force for positive change and transformation
- High energy that motivates entire communities
- Drives action toward meaningful goals
Edit shared/archetypes.ts
:
export const archetypeInfo: Record<string, ArchetypeInfo> = {
"Your New Archetype": {
name: "Your New Archetype",
subtitle: "Descriptive, Adjective",
description: "Detailed description...",
traits: ["Trait 1", "Trait 2", ...],
strengths: ["Strength 1", ...],
challenges: ["Challenge 1", ...],
idealEvents: ["Event 1", ...],
famousExamples: ["Person 1", ...],
careerPaths: ["Career 1", ...],
compatibility: ["Works well with...", ...]
}
};
// Don't forget to add the icon and insights
export const archetypeIcons: Record<string, string> = {
"Your New Archetype": "🆕"
};
Edit shared/questions.ts
:
export const quizQuestions: QuizQuestion[] = [
{
id: 16, // Next available ID
text: "Your question text here?",
options: [
{
id: 1,
text: "Option 1",
archetypeWeights: {
"The Explorer": 3,
"The Sage": 2,
"The Artisan": 1
}
},
// ... 3 more options
]
}
];
Use the built-in validation:
import { validateQuestions } from './shared/questions.ts';
const validation = validateQuestions();
if (!validation.isValid) {
console.error("Question validation errors:", validation.errors);
}
GET /
- Main quiz interfacePOST /api/submit-quiz
- Submit quiz resultsPOST /api/update-selection
- 🆕 Update user's archetype selectionGET /frontend/*
- Static frontend assetsGET /shared/*
- Shared utility files
GET /admin
- Admin dashboard with delete functionalityGET /api/submission/:id
- Get individual submissionDELETE /api/submission/:id
- 🆕 Delete submissionGET /api/test-data
- Insert test data
GET /api/database-info
- Database health checkGET /api/test-email
- Test email functionalityGET /api/debug-config
- Configuration verification
- Quiz Result: Shows the algorithm-determined archetype
- User Selected: Shows what the user actually chose (if any)
- Delete Functionality: X icons with confirmation dialogs
- Real-time Updates: Instant UI updates after deletions
Enhanced export includes:
- Quiz results vs user selections
- Secondary archetype information
- Completion time analysis
- Full breakdown data
- Compare quiz accuracy vs user self-perception
- Track archetype preference patterns
- Monitor completion time trends
- Analyze response consistency
- Clone the repository
- Ensure Deno is installed
- Configure email settings in
config.ts
- Run the main HTTP val:
deno run --allow-all index.http.ts
- Modify Archetypes: Edit
shared/archetypes.ts
- Update Questions: Edit
shared/questions.ts
- Test Changes: Use validation functions
- Deploy: Upload to Val Town
The system automatically handles schema versioning and migrations. To add new fields:
- Update the schema in
shared/database.ts
- Increment the version number (currently v3.0)
- Add migration logic for existing data
- Test with sample data
The system automatically migrates from v2 to v3, adding:
user_selected_archetype
field (initially NULL)- Updated quiz version tracking
- Enhanced analytics support
-- Add new column to existing v2 table ALTER TABLE sssc_quiz_submissions_v2 ADD COLUMN user_selected_archetype TEXT; -- Update version UPDATE sssc_quiz_submissions_v2 SET quiz_version = '3.0';
- Indexed key fields for fast queries
- Efficient pagination for large datasets
- Optimized CSV export queries
- Modular imports reduce bundle size
- Lazy loading for components
- Efficient state management
- Non-blocking email sending
- Efficient file serving
- Error isolation
- Check database health regularly via
/api/database-info
- Monitor email delivery success rates
- Review completion time trends
- Analyze quiz vs user selection accuracy
- Email Issues: Check
/api/test-email
endpoint - Database Problems: Use
/api/database-info
for diagnostics - Performance: Monitor response times and optimize queries
- Data Issues: Validate submissions and check for anomalies
This project is designed for educational and research purposes. Please ensure compliance with data privacy regulations when collecting and storing personal information.
Contributions are welcome! Please focus on:
- Improving question quality and archetype accuracy
- Enhancing modular architecture
- Adding new analytics and insights
- Optimizing performance and reliability
Built with ❤️ for understanding human personality and social dynamics