Skip to content

saisreekantam/SMILE_AGAIN

Repository files navigation

smileagain_meenarashi

Smile Again 🌟

About The Project

Smile Again is an innovative mental health support platform that provides anonymous peer support, professional counseling connections, and AI-powered emotional assistance. The platform is designed to create a safe space where users can share their struggles, connect with others facing similar challenges, and track their journey toward better mental well-being.

Key Features 🎯

  • MultiLingual AI Chatbot Support: Empathetic conversation partner available 24/7 and talk in 7 indian languages with same emotion
  • Anonymous Registration & Authentication: Secure, privacy-focused user accounts
  • Chat with Anounymous persons: A user can send friend request to another user and discuss about thier problems
  • Community Building: Auto-generated support groups based on problem of user and we generate smile path for bettermet
  • Blogs related to smile reason: Users can post blogs related to differet issues and other users can like comment and also connect with author
  • Professional Counselor Connection: Direct access to mental health professionals
  • Milestone System: Community-wide progress tracking with visual transformations
  • Real-time Interactions: Live chat and community discussions
  • Stress Level Monitoring: Personalized support recommendations based on user state

A glimpse of our project

image alt

  • Response of Bot in Telugu and Kannada:

image alt

Technology Stack πŸ’»

Backend Infrastructure

  • Framework: Flask (Python)
  • Database: SQLite (Development) / PostgreSQL (Production)
  • Authentication: Flask-Login with session management
  • Real-time Communication: Flask-SocketIO
  • API Documentation: OpenAPI/Swagger

AI and Machine Learning

  • Core Chat Model: ModelLake API integration for multilingual empathetic responses
  • Language Support: Real-time conversation in multiple languages including:
    • English
    • Hindi
    • Telugu
    • Tamil
    • Kannada
    • Marathi
    • Bengali
    • Gujarati
    • Malyalam
  • NLP Processing:
    • NLTK for text analysis
    • Language detection and automatic translation
    • Cultural context awareness
    • Sentiment analysis across languages
  • Emotion Detection:
    • Cross-cultural emotion classification system
    • Context-aware emotional response generation
    • Cultural sensitivity filters
  • Crisis Detection:
    • Multi-language pattern-based crisis identification
    • Culture-specific crisis intervention protocols
    • Region-specific emergency resource recommendations

Multilingual Empathy Bot Features πŸ€–

  • Adaptive Language Processing:

    • Automatic language detection and switching
    • Preservation of emotional context across translations
    • Culture-specific empathy expressions
    • Dialect and regional variation awareness
  • Cultural Competency:

    • Region-specific mental health approaches
    • Culturally appropriate metaphors and expressions
    • Local support resource recommendations
    • Cultural sensitivity in crisis situations
  • Technical Implementation:

    • ModelLake API integration for natural language understanding
    • Custom emotion-aware translation pipeline
    • Real-time language switching without context loss
    • Multilingual conversation history management
  • Response Generation:

    • Culture-aware empathetic responses
    • Language-specific comfort phrases
    • Localized coping strategies
    • Regional support resource integration

Environment Variables Configuration πŸ”§

# ModelLake API Configuration
MODELLAKE_API_KEY=your_api_key
MODELLAKE_MODEL=llama3
MODELLAKE_MAX_TOKENS=300

# Language Support Configuration
DEFAULT_LANGUAGE=en
SUPPORTED_LANGUAGES=en,Te-In,Tl-In,Ml-In,Gj-In,Mr-In,Be-In,Ka-In
TRANSLATION_FALLBACK=en

# Bot Personality Settings
BOT_NAME=Joy
EMPATHY_LEVEL=high
CRISIS_THRESHOLD=0.7

### Security Features
- **Data Encryption**: AES for sensitive data
- **Password Hashing**: Bcrypt
- **Session Management**: Secure cookie handling
- **CORS Protection**: Configured for secure cross-origin requests

## Getting Started πŸš€

### Prerequisites

```bash
# Python 3.8+ required
python --version

# Create virtual environment
python -m venv venv

# Activate virtual environment
# For Windows:
venv\Scripts\activate
# For Unix/MacOS:
source venv/bin/activate

##Installation
---bash
# git clone https://github.com/your-username/smile-again.git
cd smile-again

# pip install -r requirements.txt

# cp .env.example .env
# Edit .env with your configuration

# flask db upgrade
python init_db.py  # Loads initial data

# flask run

##Project Structure

---bash
#smile-again/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ activity/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ routes.py
β”‚   β”‚   └── utils.py
β”‚   β”œβ”€β”€ auth/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ routes.py
β”‚   β”‚   └── utils.py
β”‚   β”œβ”€β”€ blogs/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ routes.py
β”‚   β”‚   └── utils.py
β”‚   β”œβ”€β”€ bot/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ routes.py
β”‚   β”‚   └── utils.py
β”‚   β”œβ”€β”€ chats/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ routes.py
β”‚   β”‚   └── utils.py
β”‚   β”œβ”€β”€ community/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ routes.py
β”‚   β”‚   └── utils.py
β”‚   β”œβ”€β”€ friends/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ routes.py
β”‚   β”‚   └── utils.py
β”‚   β”œβ”€β”€ games/
β”‚   β”‚   β”œβ”€β”€ routes.py
β”‚   β”‚   └── utils.py
β”‚   β”œβ”€β”€ meditation/
β”‚   β”‚   β”œβ”€β”€ routes.py
β”‚   β”‚   └── utils.py
β”‚   β”œβ”€β”€ mood/
β”‚   β”‚   β”œβ”€β”€ routes.py
β”‚   β”‚   └── utils.py
β”‚   β”œβ”€β”€ smile_journey/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ routes.py
β”‚   β”‚   └── utils.py
β”‚   β”œβ”€β”€ stress_assessment/
β”‚   β”‚   β”œβ”€β”€ routes.py
β”‚   β”‚   └── utils.py
β”‚   β”œβ”€β”€ users/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ routes.py
β”‚   β”‚   └── utils.py
β”‚   β”œβ”€β”€ workshops/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ routes.py
β”‚   β”‚   └── utils.py
β”‚   β”œβ”€β”€ app.py
β”‚   β”œβ”€β”€ config.py
β”‚   β”œβ”€β”€ create_admin.py
β”‚   β”œβ”€β”€ db_inspector.py
β”‚   β”œβ”€β”€ extensions.py
β”‚   β”œβ”€β”€ models.py
β”‚   └── users.db
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ NavAfterLogin.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Bot_Speech.jsx
β”‚   β”‚   β”‚   └─ALL COMPONENTS OF JAVASCRIPT AND CSS ARE IN SRC
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”‚   β”œβ”€β”€ ChatBotPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ProfilePage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ FriendsPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ BlogsPage.jsx
β”‚   β”‚   β”‚   └── SmileJourney.jsx
β”‚   β”‚   β”œ
β”‚   β”‚   β”‚   
β”‚   β”‚   β”‚   
β”‚   β”‚   β”‚   
β”‚   β”‚   β”‚   
β”‚   β”‚   β”‚   
β”‚   β”‚   β”œβ”€β”€ contexts/
β”‚   β”‚   β”‚   β”œβ”€β”€ AuthContext.jsx
β”‚   β”‚   β”‚   └── UserContext.jsx
β”‚   β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”‚   β”œβ”€β”€ api.js
β”‚   β”‚   β”‚   β”œβ”€β”€ constants.js
β”‚   β”‚   β”‚   └── helpers.js
β”‚   β”‚   β”œβ”€β”€ App.jsx
β”‚   β”‚   β”œβ”€β”€ index.jsx
β”‚   β”‚   └── index.css
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ .env
β”‚   └── .env.example
β”œβ”€β”€ instance/
β”œβ”€β”€ README.md
β”œβ”€β”€ .gitignore
└── requirements.txt

API Documentation πŸ“š

Authentication Endpoints

  • POST /auth/register - User registration
  • POST /auth/login - User login
  • POST /auth/logout - User logout

Chat Endpoints

  • POST /bot/chat - Send message to AI bot
  • GET /chat/history - Retrieve chat history

Community Endpoints

  • GET /groups - List available groups
  • POST /groups - Create new group
  • POST /groups//join - Join specific group

User Management Endpoints

  • GET /profile - Get user profile
  • PUT /profile - Update user profile
  • GET /friends - List friends
  • POST /friend-request - Send friend request

Contributing 🀝

  • Fork the repository
  • Create your feature branch (git checkout -b feature/AmazingFeature)
  • Commit your changes (git commit -m 'Add some AmazingFeature')
  • Push to the branch (git push origin feature/AmazingFeature)
  • Open a Pull Request

Core Features Implementation Details πŸ”§

Multi lingual AI Chatbot Capabilities

Anonymous User System

Unique identifier generation

Privacy-focused data storage

Secure session management

Emotional state detection

Crisis intervention protocols

Contextual response generation

Conversation history management

Community Management

Stress Tracking System

stress level monitoring

Intervention triggers

Progress visualization

Milestone achievement system

Security Considerations πŸ”’

-All sensitive data is encrypted at rest -Regular security audits -Rate limiting on all endpoints -Input validation and sanitization -XSS and CSRF protection -Regular dependency updates

License πŸ“„

-Distributed under the MIT License. See LICENSE for more information.

Support πŸ’‘

-For support, email [email protected] or join our Slack channel. Acknowledgments πŸ™ -Open source community -All contributors and supporters

Built with ❀️ by the Smile Again Team

About

No description, website, or topics provided.

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •