A secure, user-focused journaling web application built using Node.js, Express.js, and MongoDB. The platform encourages emotional self-reflection, mood tracking, and self-care, particularly for youth and young adults. This system prioritizes privacy, security, and accessibility.
user.interface.mp4
admin.interface.mp4
This platform serves as a mental health and journaling system allowing users to log their thoughts, track moods, and reflect on their emotional well-being. It is developed with a focus on data protection, ethical design, and accessibility.
- π Secure personal journaling with date and mood tagging
- π Role-based dashboard protection (Admin/User)
- β Consent-based onboarding with Terms & Conditions checkbox
- πͺ Visualization of journal history and emotional trends (planned)
- π¨ββοΈ Admin control panel to monitor system usage
- π§Ή Modular backend architecture using MVC
- π MongoDB Atlas cloud-based database
- Frontend: HTML, CSS, JavaScript
- Backend: Node.js, Express.js
- Database: MongoDB (MongoDB Atlas)
- Authentication: JWT (JSON Web Tokens), bcrypt
- Testing: Manual and security checks (Protected routes, Password strength)
- Dev Tools: MongoDB Compass, Postman, VS Code
Frontend (Journaling UI) --> Express API Server --> MongoDB Atlas
|
Middleware (JWT, Auth Checks)
|
Controllers (Logic Handling)
mental-health-reflection-platform/
βββ client/ # Frontend UI files
βββ server/ # Backend logic
β βββ controllers/
β βββ models/
β βββ middleware/
β βββ routes/
β βββ config/
β βββ server.js
βββ .env
βββ .gitignore
βββ README.md
βββ package.json
βββ LICENSE
-
Clone the repository:
git clone https://github.com/AllanOtieno254/mental-health-reflection-platform.git cd mental-health-reflection-platform -
Install backend dependencies:
cd server npm install -
Add environment variables in
.env:PORT=5000 MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_secret_key
-
Start the server:
npm start
-
Access MongoDB Atlas or Compass to monitor your database
- Uses MongoDB as a NoSQL database, which is resilient to SQL injection.
- Passwords are hashed before storage using
bcrypt. - Protected routes: You cannot access the dashboard without logging in.
- Strong password policies implemented during signup.
- Uses Express.js to create API endpoints that communicate securely with MongoDB using the connection URI. Data is visualized via Atlas or Compass.
- Routes folder: Defines route access (e.g.,
/adminfor admin panel). - Controllers folder: Contains the logic for user authentication, data manipulation, and journaling.
- Middleware folder: Protects routes using JWT tokens and role-based logic.
- Role restriction: If not an admin, you cannot access protected dashboard areas.
- All data is stored in a secure cloud-based environment.
- Only authenticated users can access their journals.
- JWT tokens ensure secure session validation.
- Consent required: Users must check a box agreeing to the platformβs terms before proceeding.
- Clear ethical boundary: Data is not shared with third parties.
- The system is managed by an admin role.
- Admins can oversee the journaling environment and ensure healthy practices.
- Though it is not a clinical tool, it is built with care and privacy in mind, aligning with general mental health tech standards.
- Secure user authentication
- RESTful API design with Express.js
- MongoDB schema modeling
- Middleware and route protection
- Role-based access control
- Environment configuration (.env)
- Cloud-based NoSQL database (MongoDB Atlas)
- Frontend and backend integration
- Journaling and emotional intelligence
- Data ethics in mental health platforms
- Sentiment analysis using Natural Language Processing (NLP)
- Mood graphs and emotional trends using Chart.js or D3.js
- Counseling chatbot integration
- Push notifications for journaling reminders
- Mobile-friendly PWA version
- More granular role privileges (e.g., Moderators)
This project is licensed under the MIT License. Feel free to fork, adapt, and use with attribution.
Allan Otieno Akumu
Student of Computer Science, Zetech University
GitHub: AllanOtieno254
mental-health
journaling
nodejs
expressjs
mongodb
emotion-tracking
self-care
data-privacy
jwt-auth
secure-app







