Commit Graph

120 Commits

Author SHA1 Message Date
2e72a69214 Merge pull request 'feat: add start and end meeting endpoints for scheduled appointments' (#56) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/56
2025-12-04 10:57:56 +00:00
82af34c2e4 feat: add start and end meeting endpoints for scheduled appointments 2025-12-04 10:57:19 +00:00
e78a8da89b Merge pull request 'feat: increase max_length for encrypted fields in AppointmentRequest model' (#55) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/55
2025-12-04 10:50:12 +00:00
31a1f56fc9 feat: increase max_length for encrypted fields in AppointmentRequest model 2025-12-04 10:49:27 +00:00
034a1ccccc Merge pull request 'feat: refactor AppointmentRequest methods and update serializers to include selected_slots field' (#54) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/54
2025-12-03 20:11:08 +00:00
875a284893 feat: refactor AppointmentRequest methods and update serializers to include selected_slots field 2025-12-03 20:10:15 +00:00
518e13f84c Merge pull request 'feat: add selected_slots field to AppointmentRequest model and update serializers' (#53) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/53
2025-12-03 15:46:25 +00:00
53aac43289 feat: add selected_slots field to AppointmentRequest model and update serializers 2025-12-03 15:44:56 +00:00
f8a0aac54b Merge pull request 'Refactor code structure for improved readability and maintainability' (#52) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/52
2025-12-02 19:34:59 +00:00
99f9dac965 Refactor code structure for improved readability and maintainability 2025-12-02 19:32:51 +00:00
c963fe045c Merge pull request 'feat: refactor contact message handling and update appointment request model' (#51) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/51
2025-12-01 18:42:19 +00:00
d5c3f12dbb feat: refactor contact message handling and update appointment request model 2025-12-01 18:40:56 +00:00
11ac82d6f9 Merge pull request 'feat: add contact form functionality with admin management' (#50) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/50
2025-11-28 15:53:16 +00:00
cd5ad1d753 feat: add contact form functionality with admin management
Add a complete contact form system with the following changes:
- Create ContactMessage model to store form submissions with tracking fields (is_read, is_responded)
- Implement ContactMessage admin interface with custom actions, filters, and bulk operations
- Add contact endpoint documentation to API root view
- Update email configuration to use admin@attunehearttherapy.com as sender address

This enables users to submit contact inquiries and allows administrators to track and manage these messages efficiently through the Django admin panel.
2025-11-28 15:52:06 +00:00
38c67b4a27 Merge pull request 'refactor(meetings): standardize null handling for Jitsi fields and enhance emails' (#49) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/49
2025-11-28 12:52:09 +00:00
23c185c93d refactor(meetings): standardize null handling for Jitsi fields and enhance emails
- Set explicit default=None for jitsi_room_id field to ensure consistent null handling
- Update rejection logic to use None instead of empty strings for Jitsi fields, maintaining database consistency with nullable field definitions
- Add login instructions to appointment confirmation email directing users to join 15 minutes early
- Remove outdated "self-guided resources" option from rejection email
- Add styling for new login-info section in scheduled appointment template

This ensures proper null value handling in the database and improves user communication for appointment workflows.
2025-11-28 12:50:33 +00:00
10d2e7ff13 Merge pull request 'security: remove localhost origins from CORS allowed list' (#48) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/48
2025-11-28 10:51:28 +00:00
027d216fcb security: remove localhost origins from CORS allowed list
Remove local development URLs (localhost:3000 and 127.0.0.1:3000) from
CORS_ALLOWED_ORIGINS configuration. This restricts CORS to only allow
requests from the production domain (attunehearttherapy.com), improving
security by preventing unauthorized cross-origin requests from
development environments.
2025-11-28 10:50:43 +00:00
b555c56847 Merge pull request 'fix(email): hardcode admin dashboard URL and open in new tab' (#47) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/47
2025-11-27 21:10:48 +00:00
b43ead53c6 fix(email): hardcode admin dashboard URL and open in new tab
- Replace dynamic admin_dashboard_url construction with hardcoded production URL (https://attunehearttherapy.com/admin/dashboard)
- Add target="_blank" to admin notification email button to open dashboard in new tab
- Improves user experience by preventing email client navigation disruption
2025-11-27 21:09:52 +00:00
9834777f94 Merge pull request 'feature/meetings' (#46) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/46
2025-11-27 19:55:12 +00:00
bc001074b1 style: add blank lines for improved code readability
Add extra blank lines in booking_system and meetings views to improve
code structure and visual separation between logical sections. This
enhances code readability without affecting functionality.

Changes:
- booking_system/views.py: added blank line after availability_system section
- meetings/views.py: added blank line after get_queryset method
2025-11-27 19:54:03 +00:00
774ac584b4 refactor: convert user appointment endpoints from POST to GET
Changes:
- Refactored UserAppointmentsView and UserAppointmentStatsView to use GET instead of POST
- Removed email parameter
2025-11-27 19:51:55 +00:00
88cb7986cc Merge pull request 'feature/meetings' (#45) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/45
2025-11-27 18:45:33 +00:00
98b9274e03 docs: update API documentation with example data and user appointments endpoint
- Replace generic placeholder data with specific examples in API root documentation
- Update example email from 'user@example.com' to 'saanii929@gmail'
- Update example names from 'John Doe' to 'Saani Iddi'
- Update example phone number to '+233552732025'
- Add POST method support to user_appointments endpoint
- Add request_fields and example_request to user_appointments documentation

Note: Consider using generic placeholder data instead of real personal information in API documentation examples.
2025-11-27 18:43:51 +00:00
20b7455eb7 refactor(emails): update support email to admin address
- Change support email from hello@attunehearttherapy.com to admin@attunehearttherapy.com across all email templates
- Remove support contact section from admin notification template
- Standardize email addresses by hardcoding admin email in templates
- Remove unused CSS comment from base email template

This ensures consistent support contact information across the application and directs user inquiries to the appropriate admin channel.
2025-11-27 18:30:23 +00:00
488271489e Merge pull request 'fix: update default admin email fallback address' (#44) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/44
2025-11-27 17:31:56 +00:00
9ebfa76d6a fix: update default admin email fallback address
Changed the fallback admin email from 'hello@' to 'admin@attunehearttherapy.com' in the email service. This ensures admin notifications are sent to the correct administrative email address when ADMIN_EMAIL setting is not configured.
2025-11-27 17:31:16 +00:00
94fa7c97d7 Merge pull request 'Adding migrations' (#43) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/43
2025-11-27 15:19:24 +00:00
e66352e9ad Adding migrations 2025-11-27 15:18:56 +00:00
2f56f6bb49 Merge pull request 'feature/meetings' (#42) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/42
2025-11-27 15:00:44 +00:00
0e7e51dc7d Deleting migrations 2025-11-27 15:00:16 +00:00
7d5d3217a0 fix: allow null values for Jitsi fields in AppointmentRequest
Add `null=True` to `jitsi_meet_url` and `jitsi_room_id` fields in the AppointmentRequest model. This allows these optional fields to be NULL at the database level in addition to accepting blank values, which is the proper Django pattern for optional string-based fields.

This change requires a database migration to be generated and applied.
2025-11-27 14:56:37 +00:00
1ca8624f8d Merge pull request 'refactor(meetings): increase encrypted field lengths and add ID to admin' (#41) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/41
2025-11-27 14:44:42 +00:00
b58338db2f refactor(meetings): increase encrypted field lengths and add ID to admin
- Increase max_length from 100 to 255 for first_name and last_name encrypted fields
- Increase phone field max_length from 20 to 255 to accommodate encryption overhead
- Add 'id' field to AppointmentRequest admin list_display for easier reference
- Remove redundant docstring from _convert_to_datetime method

The increased field lengths ensure adequate storage for encrypted data, which typically requires more space than plaintext values.
2025-11-27 14:43:50 +00:00
ab61b35913 Merge pull request 'docs(api): refactor appointments endpoint documentation structure' (#40) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/40
2025-11-26 19:41:57 +00:00
a7d451702f docs(api): refactor appointments endpoint documentation structure
Enhanced the API root documentation for the appointments system with improved formatting and updated description to include "flexible availability" feature. Restructured the endpoint documentation for better readability and maintainability while preserving all endpoint information including Jitsi meeting integration details.
2025-11-26 19:30:26 +00:00
45f49544c2 Merge pull request 'feat(api): change user appointment stats endpoint to POST method' (#39) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/39
2025-11-26 16:21:17 +00:00
ce3b0b77f5 feat(api): change user appointment stats endpoint to POST method
Changed the user_appointment_stats endpoint from GET to POST method
and added email as a required field. This change allows for more
flexible querying of appointment statistics by requiring user email
in the request body rather than URL parameters.

BREAKING CHANGE: The /api/meetings/user/appointments/stats/ endpoint
now accepts POST requests instead of GET and requires an email field
in the request body.
2025-11-26 16:20:40 +00:00
577e87d8db Merge pull request 'refactor(meetings): change UserAppointmentStatsView from GET to POST' (#38) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/38
2025-11-26 16:18:25 +00:00
ea99552d95 refactor(meetings): change UserAppointmentStatsView from GET to POST
Modified UserAppointmentStatsView to accept POST requests instead of GET
and retrieve email from request body rather than from authenticated user.
This allows querying appointment statistics for any email address instead
of being limited to the current user's email.

Changes:
- Changed HTTP method from GET to POST
- Added email parameter extraction from request.data
- Updated filter to use provided email instead of request.user.email
2025-11-26 16:03:09 +00:00
1a84b8eb99 Merge pull request 'config: add CSRF trusted origins for production domains' (#37) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/37
2025-11-25 18:28:53 +00:00
4f07d854e1 config: add CSRF trusted origins for production domains
Add CSRF_TRUSTED_ORIGINS setting to whitelist the production domains
(attunehearttherapy.com and its api subdomain) for CSRF verification.
This ensures secure cross-origin POST requests from the frontend.

Also add documentation comment for CORS configuration section.
2025-11-25 18:27:57 +00:00
01c5efe746 Merge pull request 'build: update project dependencies in requirements.txt' (#36) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/36
2025-11-25 18:18:54 +00:00
4b75d38713 build: update project dependencies in requirements.txt
Modified requirements.txt to update project dependencies. The file
appears to have encoding changes or significant content modifications.
Unable to display specific package changes due to binary diff format.
2025-11-25 18:18:27 +00:00
8ddf14a276 Merge pull request 'feat(config): improve security and add WhiteNoise static file serving' (#35) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/35
2025-11-25 18:15:18 +00:00
d0dcfccb7f feat(config): improve security and add WhiteNoise static file serving
**Security Improvements:**
- Fix DEBUG setting to properly parse boolean from environment variable
- Remove hardcoded SMTP password fallback, rely solely on env var
- Update Celery to use REDIS_URL environment variable instead of hardcoded localhost

**Static File Serving:**
- Add WhiteNoise middleware for production-grade static file serving
- Configure CompressedManifestStaticFilesStorage for optimized delivery

**Configuration Updates:**
- Enable CORS credentials support
- Remove duplicate CORS_ALLOWED_ORIGINS configuration
- Update API documentation title from "Blog API" to "Attune Heart Therapy API"
- Clean up code formatting and remove unnecessary comments

These changes make the application more secure by eliminating hardcoded
credentials and more deployment-ready by properly handling environment
variables and serving static files efficiently in production.
2025-11-25 18:14:40 +00:00
199a7ef403 Merge pull request 'fix(settings): remove line break in CORS_ALLOWED_ORIGINS string' (#34) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/34
2025-11-25 17:42:12 +00:00
d1a8f4403a fix(settings): remove line break in CORS_ALLOWED_ORIGINS string
Consolidate CORS_ALLOWED_ORIGINS default value onto a single line
to fix formatting issue. Removes unnecessary line break and trailing
whitespace that was splitting the URL string across multiple lines.
2025-11-25 17:41:43 +00:00
3da92fa221 Merge pull request 'config: add production domain to CORS allowed origins' (#33) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/33
2025-11-25 17:38:17 +00:00