Harmoniq is a full-stack web application built to foster a supportive, anonymous community for individuals navigating mental health challenges. It offers a safe, digital space where users can share their thoughts, connect through shared experiences, and support one another, all while preserving their privacy.
βWe believe in the power of human connections and community harmony. Harmoniq is designed to make people feel heard, supported,Β andΒ safe.β
- πΏ Harmoniq
A video walkthrough and live demo will be added shortly. Stay tuned!
- Users can sign up and log in securely using their email and password.
- All users are anonymous across the platform. Real names are never stored or revealed publicly.
- Anonymous
Guestlogin is available, allowing users to browse threads without registration. - Guest accounts are automatically deleted after 2 weeks to reduce storage usage.
-
Role-based authentication hierarchy:
MODERATOR > MEMBER > GUEST -
Fine-grained permissions according to roles are provided:
MODERATOR: Can use the chatbot, manage threads, moderate content, and oversee platform safety.MEMBER: Can use the chatbot and can create threads, comment, and participate in them too.GUEST: Can view public threads page, but cannot create or comment on threads.
-
Implemented with Spring Security, including protected API endpoints and access control logic.
- Engage with a compassionate chatbot designed to offer empathetic, human-like conversations. Users can freely vent and reflect without judgment.
- Available exclusively to
ModeratorandMemberroles. - Chatbot messages are automatically deleted after 2 weeks to ensure privacy and minimize data retention.
- Powered by
Ollamaand the open-sourceMistral model.
- Members can create and participate in open discussions (
Threads) focused on mental health and well-being. - A supportive and anonymous space to share coping strategies and lived experiences.
Moderatorscan manage or remove inappropriate content.
- The entire application can be run using
Docker Compose. - Simplifies setup for local development, testing, and contributions.
- Backend and frontend
Dockerfilesare included for isolated builds.
- π Angular β Reactive front-end framework for building single-page applications (SPA).
- π¦ TypeScript β A statically typed superset of JavaScript for safer, scalable code.
- π¨ HTML5 & CSS β Standard markup and styling for responsive UI.
- βοΈ RxJS β For reactive programming and efficient state management.
- β Java 23+ β Modern backend development using the latest features.
- π§° Spring Boot β Framework for building robust, production-grade REST APIs.
- π’οΈ PostgreSQL β Powerful, open-source relational database for persistent storage.
- π³ Docker β Containerization for consistent development and deployment.
- π¦ Docker Compose β Simplifies multi-container setups.
- βοΈ Render β Cloud platform for hosting the backend.
- πΌ Vercel β Fast and reliable deployment for the frontend.
harmoniq/
βββ harmoniq_backend/ # Spring Boot backend
β βββ src/
β β βββ main/
β β β βββ java/
β β β β βββ dev/anirban/harmoniq_backend/
β β β β βββ config/
β β β β βββ constants/
β β β β βββ controllers/
β β β β βββ dto/
β β β β βββ entity/
β β β β βββ exception/
β β β β βββ repo/
β β β β βββ security/
β β β β βββ service/
β β β βββ resources/
β β β βββ application-dev.properties
β β β βββ application-docker.properties
β β β βββ application-prod.properties
β β β βββ application.properties
β β β βββ static/
β βββ Dockerfile # Docker config for backend
β
βββ harmoniq_frontend/ # Angular Framework Frontend
β βββ src/
β β βββ app/
β β β βββ auth/
β β β βββ chatbot/
β β β βββ dashboard/
β β β βββ helplines/
β β β βββ home/
β β β βββ profile/
β β β βββ shared/
β β β βββ threads/
β β βββ assets/
β βββ angular.json
β βββ Dockerfile # Docker config for frontend
β βββ package.json
β
βββ ollama/ # Ollama-specific folder
β βββ Dockerfile
β βββ entrypoint.sh
β
βββ docker-compose.yml # Docker compose file for the whole app
βββ README.mdFollow these steps to get the project up and running on your local machine.
Open a terminal (Git Bash for Windows or Terminal on macOS) and run:
git clone https://github.com/basakjeet08/Harmoniq.gitcd harmoniq
Build using Docker : Make sure your docker desktop is running.
docker-compose buildStart the ollama instance : On its initial run, it downloads the Mistral model ~4GB, which may take some time. Only run this the first time to pull and prepare the model.
docker-compose up -d ollama
docker logs -f --tail 100 ollamaNote : Keep in mind that after running this command the download would start and you should run the steps once the download is completed.
Now, stop and then restart the remaining containers in detached mode: - Run this after the Ollama Mistral model has finished downloading.
# Get out of the previous Process Using Ctrl + C first
docker-compose up -dThis will start four containers:
db- PostgreSQL container.ollama- Ollama container which downloads Ollama Mistral Model.backend- Spring Boot application container.frontend- Angular frontend application container.
The setup is configured for a local development environment, so all the necessary database URLs and Spring Boot connections are automatically handled, making it easy to get started without manual configuration (when using docker compose).
- Once the containers are up and running, navigate to the frontend at
http://127.0.0.1:5000to start using the application. - For the backend, you can access it through
http://localhost:8080. - The application will be running locally, and the database will be connected automatically.
Stop the Docker containers : Make sure you stop the docker container and docker desktop when you are done testing the project.
docker stop $(docker ps -q)Building things with π», coffee β, and a lot of β€οΈ for clean code.