Stress Management App is a modern platform that empowers users to track their stress levels, plan relaxation activities, and monitor progress over time. Users will be able to create detailed records of stressful events, receive personalized recommendations, and view insightful statistics about their wellbeing.
Stress Management App aims to deliver an intuitive and supportive environment to help users understand their stress patterns and take actionable steps toward improved wellbeing. Through structured tracking, personalized recommendations, and clear insights, users can gain confidence in managing their stress effectively.
Read about contributors here
- Creation and Viewing of Stress Sessions
- Users can create entries documenting stressful experiences, including description, stress level, and date.
///// (for screens/gifs)
- Relaxation Recommendations
- The app provides relaxation suggestions, such as breathing exercises or mindfulness practices. These may be displayed as a feed on the main screen.
///// (for screens/gifs)
- Stress History and Statistics
- Users can access historical data and visualize trends, such as average stress levels over time and improvements.
///// (for screens/gifs)
-
Go (Golang):
-
High-performance language powering all backend APIs and business logic.
-
GORM:
-
ORM library for database migrations and data access.
-
Flutter:
-
Cross-platform framework for building a responsive and smooth mobile and web user interface.
-
Authentication:
-
JWT (JSON Web Tokens)
-
Real-Time Communication:
-
WebSockets: enables live updates and notifications to clients.
Follow these steps to set up the project locally for development and testing.
Before you begin, make sure you have the following installed:
-
Go (>=1.20)
Download Go -
Flutter (>=3.0)
Get Started with Flutter -
PostgreSQL
Clone the project and navigate into the folder:
git clone https://github.com/slickip/Stress-management-app.git
cd Stress-management-appcd backend
go mod tidydocker compose up --buildcd frontend
flutter pub get
flutter runAll application features will be built around a single core service:
-
User Registration and Authentication
-
Account creation and login functionality
-
JWT-based authentication for secure access
-
User Data Storage
-
Persistent storage of user profiles
-
Stress Session Management
-
Full CRUD operations for stress session entries
-
Recommendation Engine
-
Delivery of relevant relaxation and wellness recommendations
-
Real-Time Updates
-
WebSocket channels to broadcast updates (e.g., new recommendations or session changes)
-
History and Statistics
-
Aggregation and retrieval of user stress history and analytics
- Registration & Login
- User account creation and authentication
- Add Stress Session
- Form for creating new stress session records
- Stress History
- List and timeline view of past stress entries
- Recommendations
- Feed of relaxation activities and wellness tips
- User Profile
- Display and management of personal account settings
This diagram shows internal components and how they interact:
-
Frontend Modules:
-
Authentication Module: Registration and login forms
-
Stress Sessions UI: Creating and viewing stress entries
-
Statistics & History UI: Visualizing past stress levels
-
Recommendations Feed: Displaying relaxation suggestions
-
WebSocket Client: Receiving live updates
-
Backend Components:
-
Auth Controller: Handles registration and login
-
JWT Middleware: Validates tokens for secured endpoints
-
Stress Sessions Controller: CRUD operations for stress entries
-
Statistics Service: Computes aggregates over stress data
-
Recommendation Engine: Generates relaxation recommendations
-
WebSocket Server: Pushes notifications to clients
-
GORM ORM: Data access layer to the database
This diagram shows the runtime deployment:
- The User Device runs the Flutter app (web or mobile).
- The API Server hosts:
- The REST API
- The WebSocket server
- The PostgreSQL Database stores all persistent data.
- The API Server communicates securely with clients and the database.
This diagram shows the high-level context of the system:
- User interacts with the application through a Flutter-based mobile or web client.
- The Flutter Frontend communicates with the Go API Server over secure HTTPS for REST API calls and WebSocket connections for real-time updates.
- The Go API Server uses a relational Database (e.g., PostgreSQL) for storing user accounts, stress sessions, and statistics.
The Stress Management App provides a RESTful API secured with JWT authentication.
Below you’ll find an overview of the available endpoints.
For complete details and request/response examples, see the Swagger UI.
| Method | Endpoint | Description |
|---|---|---|
| POST | /login |
Log in an existing user |
| POST | /register |
Register a new user |
| Method | Endpoint | Description |
|---|---|---|
| GET | /recommendations |
Get all recommendations |
| POST | /recommendations |
Create a new recommendation |
| GET | /recommendations/{id} |
Get a recommendation by ID |
| PUT | /recommendations/{id} |
Update a recommendation by ID |
| Method | Endpoint | Description |
|---|---|---|
| GET | /sessions |
Get all stress sessions for the authenticated user |
| POST | /sessions |
Create a new stress session and broadcast via WebSocket |
| GET | /sessions/{id} |
Get a stress session by ID |
| DELETE | /sessions/{id} |
Delete a stress session |
| Method | Endpoint | Description |
|---|---|---|
| GET | /stats |
Get aggregated user statistics |
| Method | Endpoint | Description |
|---|---|---|
| GET | /ws |
WebSocket endpoint for real-time session updates |
CreateSessionInput
{
"date": "2025-07-12",
"description": "Felt stressed due to workload",
"stress_level": 7
}LoginInput
{
"email": "user@example.com",
"password": "password123"
}RegisterInput
{
"email": "user@example.com",
"nickname": "JohnDoe",
"password": "password123"
}Recommendation input
{
"title": "Deep Breathing Exercise",
"description": "A guided breathing session to help you relax."
}All endpoints (except /login and /register) require a valid JWT token in the Authorization header:
Authorization: Bearer <your_token_here>Tokens are issued upon successful login and must be included in every authenticated reques
The complete interactive API documentation is available here
