Loading repository data…
Loading repository data…
TheNeovimmer / repository
An advanced AI-powered mental health platform combining cutting-edge natural language processing, emotional intelligence, and blockchain technology to provide personalized, secure, and accessible therapeutic support.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
An advanced AI-powered mental health platform combining cutting-edge natural language processing, emotional intelligence, and blockchain technology to provide personalized, secure, and accessible therapeutic support.
Multi-Model AI Integration
Intelligent Conversation Management
Blockchain-Enhanced Security
Advanced Authentication
Mindfulness & Wellness Activities
Personalized Therapy Tools
Frontend (Next.js)
Backend (Node.js/Express)
AI Integration
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Frontend │ │ Backend │ │ AI Services │
│ (Next.js) │◄──►│ (Express) │◄──►│ (OpenAI/Gemini)│
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
▼ ▼ ▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ User │ │ Database │ │ Blockchain │
│ Interface │ │ (MongoDB) │ │ (Smart │
└─────────────────┘ └─────────────────┘ │ Contracts) │
└─────────────────┘
interface TherapyAgent {
id: string;
name: string;
personality: string;
specialties: TherapySpecialty[];
languageModel: "gpt-4" | "gemini-1.5-flash";
temperature: number;
therapyApproach: TherapyApproach;
crisisProtocol: CrisisProtocol;
}
interface TherapySession {
id: string;
userId: string;
agentId: string;
startTime: Date;
endTime?: Date;
messages: TherapyMessage[];
summary?: string;
topics: string[];
moodScore: number;
achievements: string[];
completed: boolean;
}
// Authentication middleware
const authenticateUser = async (req: Request, res: Response, next: NextFunction) => {
try {
const token = req.headers.authorization?.split(' ')[1];
if (!token) throw new AuthenticationError('No token provided');
const decoded = jwt.verify(token, process.env.JWT_SECRET);
const user = await User.findById(decoded.id);
if (!user) throw new AuthenticationError('User not found');
req.user = user;
next();
} catch (error) {
next(new AuthenticationError('Invalid token'));
}
};
// Data encryption
const encryptSensitiveData = (data: string): string => {
const algorithm = 'aes-256-cbc';
const key = crypto.scryptSync(process.env.ENCRYPTION_KEY, 'salt', 32);
const iv = crypto.randomBytes(16);
const cipher = crypto.createCipheriv(algorithm, key, iv);
let encrypted = cipher.update(data, 'utf8', 'hex');
encrypted += cipher.final('hex');
return `${iv.toString('hex')}:${encrypted}`;
};
Clone the repository
git clone https://github.com/bouzayenilyes/ai-therapist-agent.git
cd ai-therapist-agent
Install dependencies
# Install frontend dependencies
cd Frontend
npm install
# Install backend dependencies
cd ../backend
npm install
Configure environment variables
# Frontend environment
cp Frontend/.env.example Frontend/.env.local
# Backend environment
cp backend/.env.example backend/.env
Edit the .env files with your configuration:
# Frontend .env.local
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_nextauth_secret
OPENAI_API_KEY=your_openai_api_key
GOOGLE_AI_API_KEY=your_google_ai_api_key
DATABASE_URL=your_mongodb_connection_string
# Backend .env
PORT=5000
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
OPENAI_API_KEY=your_openai_api_key
GOOGLE_AI_API_KEY=your_google_ai_api_key
Run the application
# Start the backend server
cd backend
npm run dev
# In a new terminal, start the frontend
cd Frontend
npm run dev
Access the application
Open your browser and navigate to http://localhost:3000
Data Protection
Access Control
Privacy Features
We welcome contributions! Please see our Contributing Guidelines for details.
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.