Skip to content

Latest commit

Β 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

image image

🧠 Memory Bridge

AI-Powered Digital Memory Companion for Alzheimer's and Dementia Care

Memory Bridge is an AI-powered memory preservation platform designed to help individuals with Alzheimer's disease and other cognitive impairments preserve, organize, and revisit their life memories. The platform transforms photos, audio recordings, and personal stories into meaningful digital memories using modern AI technologies.

Built with a scalable microservice architecture, Memory Bridge combines a React frontend, Express.js backend, FastAPI-based AI services, PostgreSQL, Prisma ORM, Redis caching, and Google Gemini to provide an intelligent and personalized memory assistance experience.


✨ Features

πŸ‘€ Authentication & User Management

  • Secure JWT Authentication
  • Refresh Token Support
  • Password Encryption using bcrypt
  • Forgot Password via Email
  • Protected Routes
  • Role-Based Access Control

πŸ“š Memory Management

Users can:

  • Create Memories
  • Edit Memories
  • Delete Memories
  • Organize Memories into Collections
  • Categorize Memories
  • Search Memories
  • Upload Images
  • Upload Audio Memories

πŸŽ™οΈ Audio Memory Processing

Memory Bridge supports voice-based memory creation.

Pipeline:

Audio Recording

↓

Speech Transcription

↓

AI Processing

↓

Memory Generation

↓

Storage in Database


πŸ€– AI-Powered Features

Using Google Gemini, the platform automatically:

  • Generates structured memories
  • Summarizes experiences
  • Creates emotional descriptions
  • Extracts important events
  • Generates life stories
  • Provides intelligent chat assistance

πŸ’¬ AI Chat Assistant

The platform includes an AI companion capable of:

  • Answering questions about stored memories
  • Helping users recall events
  • Providing conversational support
  • Understanding memory context
  • Maintaining chat sessions

πŸ“– Story Generation

Multiple memories can be transformed into coherent life stories.

Features include:

  • Story Generation
  • Story Storage
  • Story Playback
  • AI-generated Narratives

🌍 Life Insights

The application generates personalized life summaries by analyzing user memories.

Insights include:

  • Major Life Events
  • Frequently Mentioned People
  • Important Locations
  • Personal Interests
  • Emotional Timeline
  • Memory Highlights

πŸ“Š Dashboard Analytics

Interactive dashboard showing:

  • Total Memories
  • Collections
  • Stories Created
  • Recent Activity
  • AI Insights

⚑ Performance Optimizations

  • Redis Caching (Upstash)
  • Cache Invalidation
  • API Compression
  • Helmet Security
  • Rate Limiting
  • Optimized Database Queries

πŸ—οΈ System Architecture

                React Frontend
                      β”‚
                      β–Ό
             Express.js Backend
                      β”‚
      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
      β”‚               β”‚               β”‚
      β–Ό               β–Ό               β–Ό
 PostgreSQL       FastAPI AI      Cloudinary
   Prisma          Services        Storage
      β”‚               β”‚
      └──────► Google Gemini β—„β”€β”€β”€β”€β”€β”€β”˜

πŸ› οΈ Tech Stack

Frontend

  • React 19
  • Vite
  • React Router
  • Zustand
  • React Hook Form
  • Tailwind CSS
  • Axios
  • Recharts

Backend

  • Node.js
  • Express.js
  • Prisma ORM
  • PostgreSQL
  • JWT Authentication
  • bcrypt
  • Cookie Parser
  • Multer
  • Cloudinary
  • Nodemailer

AI Services

  • FastAPI
  • Google Gemini
  • OpenAI Whisper
  • PyTorch

Database

  • PostgreSQL
  • Prisma ORM

Caching

  • Upstash Redis

Deployment

Frontend

  • Vercel

Backend

  • Render

AI Service

  • FastAPI Deployment

Database

  • PostgreSQL

πŸ“‚ Project Structure

Memory_Bridge
β”‚
β”œβ”€β”€ frontend
β”‚   β”œβ”€β”€ src
β”‚   β”œβ”€β”€ components
β”‚   β”œβ”€β”€ pages
β”‚   β”œβ”€β”€ hooks
β”‚   └── assets
β”‚
β”œβ”€β”€ backend
β”‚   β”œβ”€β”€ prisma
β”‚   β”œβ”€β”€ src
β”‚   β”‚   β”œβ”€β”€ controllers
β”‚   β”‚   β”œβ”€β”€ routes
β”‚   β”‚   β”œβ”€β”€ middleware
β”‚   β”‚   β”œβ”€β”€ services
β”‚   β”‚   β”œβ”€β”€ config
β”‚   β”‚   └── utils
β”‚   └── sql
β”‚
└── ml_service
    β”œβ”€β”€ routers
    β”œβ”€β”€ services
    β”œβ”€β”€ utils
    └── models

πŸš€ Installation

Clone Repository

git clone https://github.com/Madhurtandon1/Memory_Bridge.git

cd Memory_Bridge

Backend Setup

cd backend

npm install

npm run dev

Frontend Setup

cd frontend

npm install

npm run dev

AI Service

cd ml_service

pip install -r requirements.txt

uvicorn app:app --reload

πŸ” Environment Variables

Backend

PORT=

DATABASE_URL=

JWT_SECRET=

JWT_REFRESH_SECRET=

CLOUDINARY_CLOUD_NAME=

CLOUDINARY_API_KEY=

CLOUDINARY_API_SECRET=

GEMINI_API_KEY=

REDIS_URL=

EMAIL_USER=

EMAIL_PASSWORD=

πŸ“‘ API Modules

Authentication

  • Register
  • Login
  • Logout
  • Refresh Token
  • Forgot Password

Memories

  • Create Memory
  • Update Memory
  • Delete Memory
  • Search Memories
  • Upload Audio

Collections

  • Create Collection
  • Manage Collections

Stories

  • Generate Story
  • Save Story
  • Retrieve Stories

AI Chat

  • Chat with Memory Assistant
  • Conversation History

Life Insights

  • Generate Personalized Insights

πŸ”’ Security Features

  • JWT Authentication
  • Refresh Tokens
  • Password Hashing
  • Secure Cookies
  • Helmet
  • CORS Protection
  • Rate Limiting
  • Environment Variable Management

πŸ“ˆ Future Improvements

  • Face Recognition
  • Family Collaboration
  • Memory Timeline Visualization
  • Calendar Integration
  • Mobile Application
  • Multi-language Support
  • Emotion Detection
  • Voice Cloning
  • Reminder Scheduling

πŸ‘¨β€πŸ’» Author

Madhur Tandon

Birla Institute of Technology, Mesra

GitHub: https://github.com/Madhurtandon1


πŸ“œ License

This project is intended for educational and research purposes.

Releases

Packages

Contributors

Languages