Skip to content

nibr1609/solace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌸 Solace - Post-Loss Administrative Companion

Built during a 24-hour Swiss AI Hackathon with a focus on the business case rather than coding perfection. Developed primarily with AI assistance to explore rapid prototyping and AI-driven development methodologies.

Solace is an intelligent assistant that helps relatives navigate German and Swiss bureaucracy after a loss, providing step-by-step guidance through insurance claims, inheritance procedures, financial matters, and administrative tasks. By combining AI-powered document analysis with empathetic guidance, it transforms overwhelming administrative tasks into manageable steps.

🎬 How It Works

Demo: Intelligent Insurance Query & Email Generation

The system understands complex natural language requests like "What life insurance policies might the deceased have had and how do I notify them?" It automatically researches relevant insurers and generates pre-filled notification emails in one click:

Solace Query Demo

PDF Upload & OCR-Powered Form Filling

Upload a will, insurance policy, or any relevant document. The system extracts text using PDF analysis, processes it with AI, and automatically identifies and fills relevant form fields (beneficiaries, executors, property details, etc.):

Will Upload & Auto-Fill

Insurance Management Interface

Easily add, manage, and track multiple insurance policies with automatic deadline tracking and notification reminders. The system helps identify what policies to notify and when:

Insurance Management

✨ Key Features

🎯 Core Capabilities

  • Intelligent Initial Questionnaire: Gathers death circumstances and location before unlocking the AI assistant
  • 7-Phase Guided Process: Logical flow through Basic Information β†’ Death Certificate β†’ Insurances β†’ Burial β†’ Finances β†’ Subscriptions β†’ Heritage
  • PDF Upload & OCR: Extract text from wills, insurance policies, and documents with AI-powered field extraction
  • Structured Data Extraction: Automatically parses wills and burial wishes into organized, editable data
  • AI-Powered Email Generation: Creates pre-filled notification emails with one click for contacting insurers
  • Context-Aware Assistance: Remembers user information and provides personalized guidance throughout the journey

πŸ€– AI Intelligence

  • Smart Web Search: Automatically researches contact information, procedures, and deadlines for specific institutions
  • German/Swiss Law Expertise: Tailored responses for German and Swiss legal frameworks (Erbrecht, Versicherungsrecht, inheritance tax)
  • Agentic Decision-Making: Intelligently determines when to perform web searches vs. use stored knowledge
  • LangChain Integration: Advanced reasoning for complex bureaucratic scenarios
  • Empathetic Tone: Compassionate guidance optimized for an emotionally difficult time
  • Multi-turn Conversations: Maintains context across interactions and user sessions

🎨 User Experience

  • Responsive Design: Works seamlessly on desktop, tablet, and mobile devices
  • One-Click Actions: Interactive buttons for emails (with pre-filled content), phone calls, and website links
  • Auto-expanding Input: Textarea grows naturally as users type longer messages
  • Visual Progress Tracking: See completion status across all 7 phases
  • Clean, Modern Interface: Built with shadcn/ui components and Tailwind CSS
  • Accessible Design: WCAG-compliant components for all users

πŸ—οΈ Architecture

Backend (FastAPI + OpenAI GPT)

Technology Stack: FastAPI, OpenAI API, LangChain, PyPDF2

Core Endpoints:

  • POST /start_conversation - Initial greeting with questionnaire validation
  • POST /msg - Main chat endpoint with section context and web search capability
  • POST /extract_pdf_text - PDF text extraction using PyPDF2
  • POST /extract_structured - AI-powered data extraction for wills and burial wishes

Intelligent Features:

  • LangChain-powered branching for web search activation decisions
  • GPT-powered extraction of structured data (beneficiaries, executors, properties, etc.)
  • Multi-turn context management with chat history
  • Section-specific system prompts for accurate legal guidance
  • Automatic button generation for emails, websites, and phone numbers
  • User-specific context storage (insurance details, estate information, questionnaire responses)

Frontend (Next.js + TypeScript)

Technology Stack: Next.js, TypeScript, React, Tailwind CSS, shadcn/ui

Pages:

  • / - Setup wizard and initial questionnaire
  • /fill_information - Document upload and field extraction interface
  • /post_death - Main chat interface with section navigation

Component Architecture:

  • DeathQuestionnaire - Multi-step form for gathering death circumstances
  • ChatInterface - Main conversation interface with message streaming
  • ChatMessages - Smart rendering of messages and interactive buttons
  • NavigationOverlay - Phase progress indicator and section navigation
  • SetupPage - Onboarding and initial setup flow

Form Components (pre-built form templates):

  • Will information form (beneficiaries, executors, property)
  • Insurance policy form (carriers, coverage types, policy numbers)
  • Banking accounts form (banks, account types, account holders)
  • Burial wishes form (preferences, arrangements, location)
  • Digital accounts form (email, social media, online services)
  • Contracts form (subscriptions, ongoing obligations)
  • Other documents form (flexible custom entries)

πŸ“‹ Usage Flow

  1. Initial Setup: User completes questionnaire about death circumstances (location, relationship, basic details)
  2. Assistant Unlock: After questionnaire completion, AI assistant is unlocked with empathetic welcome
  3. 7-Phase Guidance: Bot guides users through logical phases:
    • Basic Information: Gather essential details
    • Death Certificate: Process official documentation (Sterbeurkunde/Todesbescheinigung)
    • Insurances: Identify and notify insurance companies
    • Burial: Plan funeral and memorial arrangements
    • Finances: Manage bank accounts and inheritance tax
    • Subscriptions: Cancel ongoing services and digital accounts
    • Heritage: Navigate inheritance law and estate distribution
  4. Flexible Navigation: Users can jump between sections but receive suggestions for logical order
  5. AI Research: Bot automatically performs web searches for current contact information and procedures
  6. Email Generation: One-click email generation for insurance notifications and inquiries

πŸ“– German & Swiss Law Context

The system is specifically designed for the German and Swiss legal environments:

German Law (DE)

  • Erbrecht (Inheritance Law): Guidance through legal succession and estate distribution
  • Versicherungsrecht (Insurance Law): Rules for beneficiary claims and policy cancellations
  • Administrative Deadlines:
    • 3 days for death reporting (Anzeige des Todesfalls)
    • 8-10 days for burial (Beerdigung)
    • 30 days typical for insurance notifications
  • Key Terms: Sterbeurkunde, Erbschaftssteuer, Nachlass, Testamentsvollstrecker

Swiss Law (CH)

  • Cantonal Variations: Recognizes canton-specific inheritance taxes and procedures
  • Administrative Deadlines:
    • 2 days for death reporting
    • 4-6 days for burial
  • Key Differences: Swiss inheritance system, personal property distribution, double taxation treaties

πŸ› οΈ Technical Stack Summary

Backend:

  • FastAPI 0.104.1 - Modern async Python web framework
  • OpenAI GPT API - AI conversations and structured data extraction
  • LangChain 0.1+ - Advanced reasoning and tool integration
  • PyPDF2 3.0+ - PDF text extraction
  • Uvicorn 0.24.0 - ASGI server

Frontend:

  • Next.js 15+ - React framework with API routes
  • TypeScript - Type-safe development
  • Tailwind CSS - Utility-first styling
  • shadcn/ui - High-quality component library
  • pnpm - Fast package management

πŸŽ“ Hackathon Context

This project was built during a 24-hour Swiss AI Hackathon with the following constraints and focus:

  • Time Constraint: 24 hours from concept to MVP
  • AI-First Development: Leveraged AI code generation and assistance throughout
  • Business Focus: Prioritized user experience and feature completeness over code optimization
  • Real-World Problem: Solving an actual pain point in post-loss administration
  • Rapid Prototyping: Quick iteration and MVP validation over perfect architecture

The team focused on delivering a working prototype that demonstrates the business value of AI-assisted bureaucracy navigation rather than production-ready code.

πŸ“Š Project Status

This is a functional MVP with the following components complete:

  • βœ… Full frontend-backend integration
  • βœ… Questionnaire flow with validation
  • βœ… Multi-turn conversational AI
  • βœ… Section-based guidance system
  • βœ… Web search integration with agentic decision-making
  • βœ… PDF upload and text extraction
  • βœ… Structured data extraction from documents
  • βœ… AI-generated email buttons with pre-filled content
  • βœ… Progress tracking across 7 phases
  • βœ… Responsive, user-friendly interface
  • βœ… German and Swiss law focus
  • βœ… In-memory user context management

🚧 Future Enhancements

  • Database Integration: Persistent user data storage (PostgreSQL, MongoDB)
  • Authentication: User accounts, session management, data privacy
  • Cloud Deployment: Deploy backend to cloud (AWS, GCP, Azure)
  • Document Storage: Secure cloud storage for uploaded documents
  • Email Integration: Direct email sending without mailto links
  • Calendar Integration: Automatic deadline reminders and calendar invites
  • Multi-language Support: German, French, Italian, English
  • Export Functionality: Generate PDF reports and checklists
  • Notification System: Email and SMS reminders for important deadlines
  • Advanced Analytics: Track common questions and pain points
  • Lawyer Network: Integration with local lawyers and notaries
  • Mobile App: Native iOS/Android applications

πŸš€ Getting Started

Backend Setup

# Install dependencies
pip install -r requirements.txt

# Set OpenAI API key
export OPENAI_API_KEY="your-openai-api-key"

# Run the FastAPI server
uvicorn main:app --reload

The backend will be available at http://localhost:8000

Frontend Setup

cd frontend

# Install dependencies (requires Node.js >= 20.9.0 and pnpm)
pnpm install

# Run development server
pnpm dev

The frontend will be available at http://localhost:3000

πŸ“„ License

Built with ❀️ for the Swiss AI Hackathon 2025

About

Post-Loss Administrative Companion (Swiss A.I. Hackathon by ETH Entrepreneur Club )

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors