The Mental Well-being Platform is a web application designed to support users in tracking and enhancing their mental health. It enables users to write daily journal entries, which are analyzed using advanced AI models from Hugging Face. The platform evaluates the mood reflected in the entries and provides tailored feedback, fostering a safe and supportive environment for self-expression and personal growth.
The Content Section of the Mental Well-being Platform is designed to enhance user experience and provide meaningful insights into their mental health. Click the links below to explore each feature in detail:
1. 🚀 Features
2. 🛠️ Technologies Used
3. 🪜 Steps for Building
4. 📦 Installation
5. 🛡️ Security and Privacy
6. 🤝 Contributing
- Journal Writing: A secure and user-friendly interface for users to write daily journals.
- Mood Analysis: Leverages Hugging Face's API to analyze journal entries and assess the user's mood.
- Personalized Feedback: Provides tailored feedback and suggestions based on the mood analysis.
- Authentication: Secure login and registration implemented using NextAuth with options for Google and credential-based sign-in.
- Mood History: Visualizes trends in the user's mood over time to track mental health progress.
- Privacy-First: Ensures user data is secure and private.
- Frontend: Next.js with Tailwind CSS for a responsive and accessible UI.
- Backend: Next.js API routes for server-side functionality.
- Database: MongoDB (with Mongoose) for storing user journals and mood data.
- AI Integration: Hugging Face API for natural language processing and mood analysis.
- Authentication: NextAuth.js for secure and flexible user authentication.
- Visualization: Recharts for displaying mood history trends.
- ✅ Project Initialization:
- Set up a Next.js project.
- Configure Tailwind CSS for styling.
- ✅ Dependencies Installation:
- Installed NextAuth, MongoDB, Axios, Chart.js, jsPDF, and PapaParse.
- ✅ Environment Variables:
- Created
.env.localfor securely storing API keys and MongoDB credentials.
- Created
- ✅ Authentication Setup:
- Integrated NextAuth.js for user authentication.
- Configured sign-in with email/password and Google OAuth.
- Set up MongoDB to store user accounts and session data.
- ✅ Design and implement a user-friendly journal entry text editor.
- ✅ Create API routes to save and retrieve journal entries from MongoDB.
- ✅ Display journal entries on a user dashboard with timestamps.
- ✅ Integrate the Hugging Face for sentiment analysis of journal entries.
- ✅ Send journal text to the API and retrieve mood sentiment (e.g., 😊 Positive, 😐 Neutral, 😔 Negative).
- ✅ Store sentiment results alongside journal entries in MongoDB.
- ✅ Fetch journal sentiment data from MongoDB.
- ✅ Use
rechartsto create a graph visualizing mood trends. - ✅ Add filters like "Past Week," "Month," or "Year" for better analysis.
- ✅ Predefine activity suggestions based on sentiment categories.
- ✅ Dynamically display suggestions based on recent user mood trends.
- ✅ Provide options to export journal entries and mood data as PDF or CSV.
- ✅ Use jsPDF and PapaParse libraries for generating downloadable files.
- ✅ Create a profile page where users can update their details.
- Completed: Steps 1 and 2 ✅
- Next Step: Start working on the Journal Entry System.
Stay tuned for updates as the project progresses! ✨
- Node.js (v16 or above)
- MongoDB (local or cloud instance)
- Hugging Face Key
- Clone the repository:
git clone https://github.com/your-username/mental-wellbeing-platform.git
cd sooth-mind- Install Dependencies:
npm install- Configure environment variables: Create a .env.local file in the root directory and add the following:
NEXTAUTH_SECRET=<your-nextauth-secret>
NEXTAUTH_URL=http://localhost:3000
MONGODB_URI=<your-mongodb-connection-string>
HUGGING_FACE_API_KEY=<your-openai-api-key>- Run the development server:
npm run dev- Open your browser and navigate to:
http://localhost:3000- All user data is securely stored in MongoDB with proper authentication and authorization.
- Sensitive information, such as passwords, is hashed using bcrypt.
- Journals are analyzed anonymously through OpenAI.
Contributions are welcome! Please fork the repository and submit a pull request for any changes or improvements.
