Welcome to the Mental Health App Backend repository! 🎯 This backend system is designed to support the frontend of a mental health application using a modular, scalable microservices architecture. Each service is built with Spring Boot and Spring Cloud, ensuring reliability and high performance.
- Overview
- Microservices
- Getting Started
- Technologies Used
- Project Structure
- Frontend Repository
- Contributing
- License
This project follows a Microservices Architecture, where each service is loosely coupled and independently deployable. The services communicate via REST APIs and service discovery, ensuring scalability, fault tolerance, and ease of maintenance.
✅ API Gateway - Centralized entry point for all requests.\
✅ Service Discovery - Dynamic service registration using Eureka.\
✅ Streaming Data - Implemented using Spring WebFlux.\
✅ User Management - Authentication, registration, and profiles.\
✅ Scalable & Resilient - Easily add new microservices without breaking the system.\
✅ Mental Health Chat Support - Handles AI-driven and human-assisted chat interactions.
| Service | Path | Description |
|---|---|---|
| API Gateway | apigateway |
Handles authentication, logging, and routes requests. |
| Chat Service | chat-service |
Manages mental health chat interactions using Spring WebFlux. |
| Eureka Server | eureka-server |
Service registry for dynamic service discovery. |
| User Service | user-service |
Manages authentication, registration, and user profiles. |
Ensure you have the following installed:
- Java 17 or higher
- Maven 3.8+
- Ollama with LLaMA 3
git clone https://github.com/thughari/Mental-Health-App-Backend.git
cd backend-microservicescd eureka-server
./mvnw spring-boot:runcd apigateway
./mvnw spring-boot:runcd user-service
./mvnw spring-boot:runcd chat-service
./mvnw spring-boot:run- API Gateway:
http://localhost:8081 - Eureka Dashboard:
http://localhost:8761
- Spring Boot - Microservices Framework
- Spring Cloud - Service Discovery & Configuration
- Eureka - Service Registry
- Maven - Build & Dependency Management
- JWT - Authentication & Authorization
- Spring WebFlux - Reactive Data Streaming
backend-microservices/
├── apigateway/ # API Gateway service
├── chat-service/ # Mental Health Chat microservice
├── eureka-server/ # Service registry
├── user-service/ # User management microserviceEach folder contains:
src/- Source codepom.xml- Maven configuration.mvn/- Maven wrapper files
The frontend for this mental health application can be found at: 👉 Frontend Repository - Mental Health App
We welcome contributions! 🚀 To contribute:
- Fork the repository.
- Create a feature branch:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add feature" - Push the branch:
git push origin feature-name
- Open a Pull Request.
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.