LifeSync — a modular, AI-powered personal operating system that unifies behavioral analytics, adaptive personas, and seamless cross-platform automation. Built to scale from prototype to production with a clean, event-driven architecture.
LifeSync is a comprehensive personality assessment platform that combines the Big Five (OCEAN) personality model with AI-powered insights. The platform features a modern web interface, a cross-platform mobile app, and a robust backend API that provides personality scoring, MBTI proxy conversion, and intelligent explanations.
- 30-Question Personality Quiz: Balanced question distribution across all OCEAN traits
- Big Five Scoring: Accurate OCEAN trait calculation with confidence metrics
- MBTI Proxy: Conversion of OCEAN scores to MBTI-style 4-letter codes
- AI-Powered Explanations: Multi-LLM support (Gemini, OpenAI, Grok) for personalized insights
- Persona System: 16 human-friendly persona profiles with strengths, challenges, and communication styles
- Cross-Platform: Web (Next.js) and Mobile (Expo React Native) applications
- Null-Safe Scoring: Returns
nullfor insufficient data instead of defaulting to 50% - Cache Busting: Ensures fresh question data on every fetch
- Response Validation: Backend validation for balanced question coverage
- Data Persistence: Mobile app stores assessment results locally
- PDF Reports: Downloadable personality assessment reports
- Backend First: The Python engine is the single source of truth.
- Strict Validation: All scores are validated against a strict schema (0-1.0 range, mandatory metadata).
- Safe Fallback: Offline mode uses a compatible local engine, strictly mapped to the canonical contract.
- Versioning:
SCORING_VERSIONensures compatibility between frontend and backend.
- Framework: FastAPI (Python)
- Database: Supabase (PostgreSQL)
- LLM Providers: Google Gemini (primary), OpenAI, Grok (fallback)
- Scoring Engine: Custom OCEAN personality scorer with facet-level analysis
- PDF Generation: ReportLab for assessment reports
- Framework: Next.js 14 (React)
- Styling: Tailwind CSS
- Charts: Recharts (radar charts, trait bars)
- Icons: Lucide React
- Animations: Framer Motion
- Framework: Expo React Native
- Platform: iOS, Android, Web
- Navigation: Expo Router
- State Management: React Hooks + AsyncStorage
- UI Components: Custom components with Moti animations
- Icons: Ionicons, Lucide React Native
lifesync/
├── backend/ # FastAPI backend service
│ ├── src/
│ │ ├── api/ # API endpoints
│ │ ├── scorer/ # Personality scoring engine
│ │ ├── llm/ # LLM provider integrations
│ │ ├── personas/ # Persona definitions
│ │ └── config/ # Configuration management
│ ├── infra/ # Infrastructure (Supabase migrations)
│ ├── scripts/ # Utility scripts
│ └── tests/ # Test suite
│
├── web/ # Next.js web application
│ ├── app/ # Next.js app router pages
│ ├── components/ # React components
│ ├── lib/ # Utilities and API client
│ └── hooks/ # React hooks
│
├── mobile/ # Expo React Native mobile app
│ ├── app/ # Expo router screens
│ │ ├── screens/ # Screen components
│ │ ├── components/ # Reusable components
│ │ ├── hooks/ # Custom hooks
│ │ └── lib/ # Utilities and API client
│ └── assets/ # Images and icons
│
└── docs/ # Documentation
- Python 3.9+ (for backend)
- Node.js 18+ (for web and mobile)
- Expo CLI (for mobile development)
- Supabase account (for database)
-
Navigate to backend directory:
cd backend -
Install Python dependencies:
pip install -r requirements.txt
-
Configure environment variables:
cp .env.example .env # Edit .env with your Supabase and LLM API keys -
Run database migrations:
# Apply Supabase migrations from infra/supabase/schemas/ -
Start the server:
python -m uvicorn src.api.server:app --reload --port 5174 --host 0.0.0.0
The backend API will be available at http://localhost:5174
-
Navigate to web directory:
cd web -
Install dependencies:
npm install
-
Start the development server:
npm run dev
The web app will be available at http://localhost:3000
To deploy the backend API for production:
- Render (Recommended - Free Tier Available):
-
See RENDER_DEPLOYMENT_GUIDE.md for step-by-step instructions
-
Connect GitHub repository
-
Set root directory to
backend -
Configure environment variables (Supabase, API keys)
-
Auto-deploys on every push
-
Railway, Heroku, DigitalOcean, AWS, etc.
-
See backend README.md for details
-
The system includes automated health monitoring to ensure database connectivity and API responsiveness:
-
Daily Auto-Healing:
- A GitHub Action (
.github/workflows/supabase-health-check.yml) runs every 24 hours at 00:00 UTC. - It executes
backend/scripts/supabase_health_check.pyto ping the Supabase database. - If successful, it prevents database pausing (for free tier projects).
- A GitHub Action (
-
Discord Notifications:
- Health status reports are sent to a private Discord channel.
- Reports include:
Status,Latency,Total Assessments, andRecent Activity. - Setup: Add
DISCORD_WEBHOOK_URLto GitHub Secrets and local.env.
To deploy the web app for your colleagues to view:
-
GitHub Pages (Free & Automatic):
- See GITHUB_PAGES_SETUP.md for setup
- Enable GitHub Pages in repository settings
- Set
NEXT_PUBLIC_API_URLsecret to your backend URL - Auto-deploys on every push
-
Other Options:
- See DEPLOYMENT_GUIDE.md for detailed instructions
- Vercel, Netlify, Docker, and self-hosted options available
-
Automated Deployment:
- GitHub Actions workflow included (
.github/workflows/deploy-web.yml) - Automatically builds and tests on every push
- GitHub Actions workflow included (
-
Navigate to mobile directory:
cd mobile -
Install dependencies:
npm install --legacy-peer-deps
-
Configure environment variables:
cp .env-example .env.local # Edit .env.local with your backend API URL # Use your PC's local IP (e.g., http://192.168.0.12:5174) instead of localhost
-
Start Expo development server:
npx expo start --lan
Note: Use
--laninstead of--tunnelfor faster startup (60-90 seconds faster). Tunnel mode is only needed if you're not on the same network. -
Connect with Expo Go:
- Install Expo Go app on your mobile device
- Scan the QR code or use the LAN URL
- Ensure your mobile and PC are on the same network
To avoid slow command loading:
- Use LAN mode instead of tunnel:
npx expo start --lan(much faster) - Install Expo CLI globally:
npm install -g expo-clithen useexpo start --lan - Exclude cache files: Already configured in
.gitignore - Clear caches if needed:
npm cache clean --forceand removenode_modules/.cache
- Personality assessment engine
- Web interface
- Mobile app (iOS/Android)
- AI-powered explanations
- Persona system
- Historical assessment tracking
- Personality trait trends over time
- Comparative analysis (team, group insights)
- Career matching based on personality
- Calendar integration for daily syncs
- Task management integration
- Habit tracking
- Cross-platform data synchronization
- Multi-language support
- Custom assessment templates
- Team/organization dashboards
- API for third-party integrations
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License