Skip to content

AI-powered pattern recognition system for better decision-making. Helps users identify behavioral patterns, simulate consequences, and interrupt self-sabotage with ethical guardrails.

Notifications You must be signed in to change notification settings

pelzade127/lifeOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LifeOS - Pattern Recognition for Life

A free, web-based AI life-support system built for high-potential adults with mental illness or neurodivergence who feel like they are "doing life wrong."

LifeOS Preview License


🎯 Core Problem

Users make decisions that feel right in the moment but have lasting negative consequences they couldn't anticipate. LifeOS exists to help users identify hidden patterns in behavior and decision-making, simulate long-term outcomes, and interrupt self-sabotage.

✨ Key Features

1. Chat-First Interface

  • Natural conversation as the primary interaction
  • No forced forms or rigid structure
  • Adaptive tone based on user state

2. Pattern Detection Engine

  • Identifies recurring themes across conversations
  • Tracks decision archetypes (escape decisions, people-pleasing, impulse-driven choices)
  • Detects temporal and emotional patterns

3. Decision Simulation

  • 3-horizon framework: 1 week / 1 month / 6 months
  • Second-order effect exploration
  • Values alignment scoring

4. Insight Surfacing

  • Pattern summaries with contextual examples
  • "DΓ©jΓ  vu alerts" when current decisions mirror past patterns
  • Real-time pattern notifications

πŸš€ Quick Start

Option 1: Open Directly in Browser

  1. Download lifeos.html
  2. Open it in any modern browser (Chrome, Firefox, Safari, Edge)
  3. Start conversing

That's it. No installation, no servers, no dependencies.

Option 2: Deploy to Vercel (Production)

# 1. Install Vercel CLI
npm i -g vercel

# 2. Create a new directory
mkdir lifeos-app
cd lifeos-app

# 3. Copy lifeos.html to directory
cp /path/to/lifeos.html index.html

# 4. Deploy
vercel

Follow the prompts. Your app will be live in ~30 seconds.


πŸ—οΈ Technical Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   USER INTERFACE LAYER                  β”‚
β”‚              (React 18 - Single File App)               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  CONVERSATION MANAGER                   β”‚
β”‚  - Intent classification                                β”‚
β”‚  - Context window management                            β”‚
β”‚  - Tone calibration                                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           ↓
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        ↓                                     ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  PATTERN ENGINE  β”‚              β”‚  DECISION SIMULATOR  β”‚
β”‚                  β”‚              β”‚                      β”‚
β”‚ β€’ Keyword        β”‚              β”‚ β€’ Consequence trees  β”‚
β”‚   analysis       │◄────────────►│ β€’ Time horizons     β”‚
β”‚ β€’ Theme tagging  β”‚              β”‚ β€’ Risk assessment    β”‚
β”‚ β€’ Cycle detectionβ”‚              β”‚                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        ↓                                     ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  LOCAL STORAGE LAYER                    β”‚
β”‚              (Browser localStorage API)                 β”‚
β”‚                                                         β”‚
β”‚  Keys:                                                  β”‚
β”‚  β€’ lifeos_messages (conversation history)               β”‚
β”‚  β€’ lifeos_patterns (detected patterns)                  β”‚
β”‚  β€’ lifeos_settings (user preferences)                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Technology Stack

Component Technology Reasoning
Frontend React 18 (CDN) No build step, instant load, works offline
Styling Pure CSS Zero dependencies, full control, excellent performance
Storage localStorage Privacy-first, works offline, no backend needed
AI Simulated (Claude API ready) Pattern matching with keyword detection, easy to swap in real API
Fonts Google Fonts Crimson Pro (elegant serif) + IBM Plex Mono (technical feel)

🎨 Design Philosophy

Visual Identity

  • Dark theme: Reduces cognitive load, creates calm environment
  • Animated gradients: Subtle depth without distraction
  • Crimson Pro serif: Warm, literary, thoughtful
  • IBM Plex Mono: Technical precision for data/patterns

Color System

--bg-primary: #0a0e12      /* Deep space black */
--accent-primary: #7aa2f7  /* Calming blue */
--accent-secondary: #bb9af7 /* Thoughtful purple */
--accent-warm: #ff9e64      /* Gentle orange for emphasis */

UX Principles

  1. Conversation-first: No barriers to starting
  2. Progressive disclosure: Complex features appear as needed
  3. Calm technology: Smooth animations, generous spacing
  4. Transparency: Show why patterns were detected

🧠 Pattern Detection Algorithm

Current Implementation (MVP)

// Three primary pattern types
1. Escape When Overwhelmed
   Triggers: quit, leave, escape, overwhelmed, drowning
   
2. Repeating Mistakes
   Triggers: again, same, keep, always, every time
   
3. Impulse-Driven Decisions
   Triggers: right now, immediately, urgent, need to

Pattern Detection Logic

  • Analyzes last 5 user messages
  • Requires 2+ keyword matches to trigger
  • Stores examples for user review
  • Increments detection count on recurrence

Future Enhancements (Post-MVP)

  • Semantic similarity using embeddings
  • Temporal pattern analysis (time-of-day, day-of-week)
  • Emotional tone tracking via sentiment analysis
  • Cross-pattern correlation

πŸ›‘οΈ Ethical Safeguards

Crisis Detection

// Immediate override for crisis keywords
const crisisKeywords = [
  'kill myself', 
  'suicide', 
  'end it all', 
  'want to die', 
  'hurt myself'
];

// Response: Crisis resources + professional referral

Hard Boundaries

  • ❌ No medical diagnoses
  • ❌ No therapeutic treatment
  • ❌ No spiritual authority claims
  • ❌ No financial advice
  • βœ… Pattern observation only
  • βœ… Professional referrals when needed

Privacy

  • All data stored locally (localStorage)
  • No analytics, no tracking
  • User controls all data (clear/export)
  • No third-party API calls in demo

πŸ“Š Data Structures

Message Object

{
  role: 'user' | 'assistant',
  content: string,
  timestamp: number
}

Pattern Object

{
  id: string,                    // 'escape-when-overwhelmed'
  title: string,                 // 'Escape When Overwhelmed'
  description: string,           // Human-readable explanation
  detectedCount: number,         // How many times triggered
  examples: string[]             // Conversation snippets
}

Settings Object

{
  userName: string,              // Optional personalization
  worldview: string,             // secular | faith-based | philosophical
  apiKey: string                 // For future Claude API integration
}

πŸ”Œ Integrating Real AI (Claude API)

Currently, LifeOS uses simulated responses for demo purposes. To integrate the real Claude API:

1. Get API Key

# Sign up at https://console.anthropic.com
# Create API key

2. Update sendMessage Function

const sendMessage = async () => {
  // ... existing validation ...

  try {
    const response = await fetch('https://api.anthropic.com/v1/messages', {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'x-api-key': settings.apiKey,
        'anthropic-version': '2023-06-01'
      },
      body: JSON.stringify({
        model: 'claude-sonnet-4-20250514',
        max_tokens: 1000,
        system: SystemPrompts.getSystemPrompt(settings.userName, settings.worldview, patterns),
        messages: newMessages.map(m => ({
          role: m.role,
          content: m.content
        }))
      })
    });

    const data = await response.json();
    const assistantMessage = {
      role: 'assistant',
      content: data.content[0].text,
      timestamp: Date.now()
    };
    
    // ... rest of existing logic ...
  } catch (error) {
    console.error('API error:', error);
    // Fallback to simulated response
  }
};

3. Add API Key Input to Settings

Already built into the settings modal - just needs backend integration.


🎯 Success Metrics (Demo)

For portfolio demonstration:

  1. Pattern Detection Accuracy: Does it catch the 3 core patterns?
  2. User Experience: Smooth, calming, non-judgmental?
  3. Ethical Boundaries: Clear crisis handling and referrals?
  4. Technical Excellence: Clean code, good performance, responsive?

🚧 Current Limitations

MVP Constraints

  • Simulated AI: Keyword-based pattern detection (not semantic)
  • No backend: All data in browser localStorage
  • No authentication: Single-user device only
  • Limited patterns: 3 types (escape, repetition, impulse)
  • No analytics: Can't track effectiveness over time

Future Features (Post-MVP)

  • Real Claude API integration
  • Semantic pattern detection with embeddings
  • Weekly/monthly reflection summaries
  • Data export (JSON, PDF report)
  • Multi-device sync (optional backend)
  • Advanced decision simulation with probabilistic outcomes

πŸ“ Example Usage Flow

User opens LifeOS
  ↓
Reads welcome message
  ↓
Clicks "Start Conversation"
  ↓
LifeOS: "Hey. I'm LifeOS. Think of me as a pattern-recognition 
system for your life..."
  ↓
User: "I keep fucking up at work. Thinking about quitting."
  ↓
LifeOS: "Have you made a big change like this before when you 
felt overwhelmed?"
  ↓
User: "Yeah, I quit my last job too."
  ↓
LifeOS: [PATTERN DETECTED: Escape When Overwhelmed]
"I'm noticing this decision follows the same pattern as the 
last time. This might be a pattern, not a solution."
  ↓
User: "...fuck. Yeah. That's exactly it."
  ↓
LifeOS: "Let's focus on reducing overwhelm within this job 
for two weeks, then reassess?"

🎨 Design Tokens

Typography

/* Display */
font-family: 'Crimson Pro', serif;
font-weight: 300 | 400 | 600;

/* Monospace (data/code) */
font-family: 'IBM Plex Mono', monospace;
font-weight: 400 | 500;

Spacing Scale

--space-xs: 0.25rem;   /* 4px */
--space-sm: 0.5rem;    /* 8px */
--space-md: 1rem;      /* 16px */
--space-lg: 1.5rem;    /* 24px */
--space-xl: 2rem;      /* 32px */
--space-2xl: 3rem;     /* 48px */

Animation Timing

--timing-fast: 0.2s;
--timing-base: 0.3s;
--timing-slow: 0.6s;
--easing: cubic-bezier(0.4, 0, 0.2, 1);

🀝 Contributing

This is a portfolio project, but feedback is welcome:

  1. Found a bug? Open an issue with steps to reproduce
  2. Have an idea? Describe the use case and why it matters
  3. Want to improve UX? Show before/after designs

Development Setup

# No setup needed - it's a single HTML file!
# Just open in browser and start editing

# For live reload during development:
npx live-server

πŸ“„ License

MIT License - feel free to use, modify, and learn from this code.

Built by Pelz as part of a comprehensive fintech portfolio, demonstrating:

  • Applied cognitive psychology and behavioral economics
  • Ethical AI system design with clear safety boundaries
  • Compassionate user experience for high-stakes scenarios
  • Full-stack technical execution (React, localStorage, API-ready architecture)
  • Product thinking: solving real problems for specific user segments

🎯 Portfolio Positioning (For Fintech Interviews)

This project demonstrates capabilities highly valued in financial services:

Why This Matters for Financial Services

1. Risk Assessment & Decision Modeling

  • LifeOS's 3-horizon decision simulation mirrors risk modeling in trading/lending
  • Shows understanding of second-order effects and probabilistic thinking
  • Demonstrates ability to help users evaluate decisions under uncertainty

2. Pattern Detection & Behavioral Analysis

  • Core competency for fraud detection systems
  • Behavioral pattern recognition applies to customer financial behavior analysis
  • Shows understanding of how to surface insights from temporal data

3. Ethical AI & Responsible Design

  • Critical for banks deploying AI in consumer products
  • Clear boundaries, crisis detection, and privacy-first architecture
  • Demonstrates thinking about AI safety before deploying

4. User Trust & Security

  • Privacy-first design (local storage, no tracking) aligns with banking security
  • Crisis intervention shows understanding of high-stakes user scenarios
  • Ethical guardrails demonstrate mature product thinking

5. Full-Stack Capability

  • Complements your fintech portfolio (Budget Buddy, Fraud Detection, Stress Simulator)
  • Shows you can go from concept β†’ design β†’ implementation β†’ deployment
  • Clean architecture that scales from prototype to production

Skills Demonstrated

Skill How LifeOS Shows It
Behavioral Economics Decision simulation, pattern detection in user choices
Risk Modeling 3-horizon consequence analysis, probabilistic outcomes
System Design Modular architecture, separation of concerns
Ethics & Compliance Clear boundaries, crisis protocols, privacy design
Frontend Excellence Production-quality React, accessibility, responsive design
Product Thinking Solved a real problem for a specific user segment

How to Present This

In interviews, position LifeOS as:

"A pattern recognition system that helps users make better decisions by simulating long-term consequences and detecting behavioral patterns. It demonstrates my ability to build ethical AI systems with clear risk boundariesβ€”skills directly applicable to consumer banking products that require both technical excellence and responsible design."

Key talking points:

  1. Built with ethical AI principles and responsible design practices
  2. Pattern detection similar to fraud/anomaly detection in banking
  3. Decision modeling parallels credit risk assessment
  4. Privacy-first architecture aligns with financial data security
  5. Complete solo build (design β†’ code β†’ deploy) in portfolio timeline

This is your "I can build thoughtful, ethical systems" project that complements your "I can build technical fintech systems" projects.


πŸ”— Resources


πŸ’­ Philosophy

"LifeOS doesn't fix you. It helps you see yourself clearly enough to fix what's fixable β€” and accept what isn't."

This is not a replacement for therapy, spiritual guidance, or human connection. It's a tool for pattern recognition β€” nothing more, nothing less.

Use it wisely. Use it kindly. Use it as a supplement, not a substitute.


Version: 1.0.0-MVP
Last Updated: January 2026
Status: Portfolio Demo (Production-Ready Architecture)

About

AI-powered pattern recognition system for better decision-making. Helps users identify behavioral patterns, simulate consequences, and interrupt self-sabotage with ethical guardrails.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages