Commit Graph

16 Commits

Author SHA1 Message Date
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
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
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
e66352e9ad Adding migrations 2025-11-27 15:18:56 +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
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
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
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
aa0ac8c1c8 #$ 2025-11-24 18:30:43 +00:00
1ffbfa5692 feat: add API documentation with drf-spectacular and refactor views
- Install and configure drf-spectacular for OpenAPI/Swagger documentation
- Add Swagger UI endpoints at /api/schema/ and /api/docs/
- Configure SPECTACULAR_SETTINGS with API metadata
- Refactor meetings views from function-based to class-based views
  (ScheduleAppointmentView, RejectAppointmentView, AvailableDatesView,
  UserAppointmentsView, AppointmentStatsView, UserAppointmentStatsView)
- Update URL patterns to use new class-based views
- Simplify ALLOWED_HOSTS configuration to accept all hosts

This improves API discoverability through interactive documentation
and modernizes the codebase by using class-based views for better
code organization and reusability.
2025-11-24 13:29:07 +00:00
d736c1681c # Commit Message
```
refactor: update settings and Docker config for production

- Configure ALLOWED_HOSTS and CORS from environment variables for better security
- Switch default database from PostgreSQL to SQLite3 (PostgreSQL config commented)
- Simplify DEBUG environment variable handling
- Update Dockerfile to use Python 3.11 and gunicorn for production
- Add static file collection in Docker build process
- Add user appointment statistics endpoint (user_apointment_stats)
- Add .dockerignore to exclude unnecessary files from build

These changes improve production readiness by making critical settings
configurable via environment variables and using production-grade WSGI
server (gunicorn) instead of Django development server.
2025-11-23 23:06:17 +00:00
4fdc7c35ee feat: add user management endpoints and update appointment model
Add comprehensive API documentation for user management endpoints including profile updates, user listing, and admin user management features. Update appointment model to include additional status options (completed, cancelled) and add max_length constraint to email field. Change appointment creation endpoint to require user authentication instead of being public.

Changes:
- Add API docs for update_profile, get_profile, all-users endpoints
- Add API docs for activate-deactivate-user and delete-user admin endpoints
- Update appointment creation to require authentication
- Add 'completed' and 'cancelled' status options to Appointment model
- Add max_length constraint to EncryptedEmailField
- Regenerate initial migration with updated model definitions
2025-11-23 13:55:04 +00:00
d670baf594 refactor(email): improve email service implementation and templates
- Remove strip_tags usage and use explicit fallback text for HTML emails
- Use named parameters in EmailMultiAlternatives for better clarity
- Add fail_silently=False to email.send() for explicit error handling
- Rename variables (html_content -> html_message, email_msg -> email)
- Remove action buttons from appointment email templates

These changes improve code readability and provide a clearer fallback
message for non-HTML email clients instead of relying on stripped HTML.
2025-11-23 00:27:44 +00:00
1fc91d5949 feat: enable meetings app and simplify development configuration
- Enable meetings app in INSTALLED_APPS and add URL routing
- Switch from PostgreSQL to SQLite for default database configuration
- Remove meetings directory from .gitignore
- Move API root endpoint from users app to main URL configuration
- Remove HIPAA-specific email and compliance settings (EMAIL_ENCRYPTION_KEY, HIPAA_EMAIL_CONFIG, BAA_VERIFICATION)
- Add SITE_NAME and ENCRYPTION_KEY environment variables
- Regenerate initial user migrations

These changes simplify the development setup by using SQLite as the default database and removing complex compliance configurations while enabling the core meetings functionality.
2025-11-23 00:19:26 +00:00