Commit Graph

21 Commits

Author SHA1 Message Date
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
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
7ee3663ffa config: add production domain to CORS allowed origins
Add attunehearttherapy.com to the CORS_ALLOWED_ORIGINS setting to enable cross-origin requests from the production domain. This allows the frontend application hosted at the production URL to communicate with the backend API.
2025-11-25 17:37:06 +00:00
16c4afdce5 config: make ALLOWED_HOSTS configurable via environment variable
Change ALLOWED_HOSTS from a hardcoded list to be read from environment
variable with comma-separated values support. Maintains '*' as default
fallback for backward compatibility. This allows more restrictive host
configuration in production environments while improving security posture.
2025-11-24 13:36:11 +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
b7a4e73d93 refactor(config): use dj-database-url for flexible database configuration
- Add dj-database-url package for parsing DATABASE_URL
- Replace hardcoded PostgreSQL config with DATABASE_URL environment variable
- Add connection pooling with conn_max_age and health checks
- Fallback to SQLite for local development when DATABASE_URL is not set
- Remove obsolete production config comments
- Update requirements.txt with new dependency

This change improves deployment flexibility by supporting standard DATABASE_URL format commonly used in cloud platforms (Heroku, Railway, etc.) while maintaining backward compatibility with local development using SQLite.
2025-11-24 00:01:30 +00:00
0a5a5fa800 chore: switch database backend from SQLite to PostgreSQL
Replace SQLite database configuration with PostgreSQL to improve
scalability and production readiness. PostgreSQL configuration uses
environment variables (POSTGRES_DB, POSTGRES_USER, POSTGRES_PASSWORD,
POSTGRES_HOST, POSTGRES_PORT) for flexible deployment across different
environments.
2025-11-23 23:47:53 +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
0a02f1db14 feat: migrate to UV package manager and enhance production config
- Replace pip with UV for faster dependency installation
- Switch base image from python:3.11-slim to debian:bookworm-slim
- Add SECURE_PROXY_SSL_HEADER for production SSL proxy support
- Optimize Docker layer caching by copying dependency files first
- Move database migration to build time for faster container startup
- Enhance Gunicorn logging with access and error log streams
- Update dependency management from requirements.txt to pyproject.toml

These changes improve build performance, production security, and
container startup time while modernizing the dependency management
workflow.
2025-11-23 18:36:23 +00:00
98962caafb chore: configure for local development environment
- Set ALLOWED_HOSTS to accept all hosts for easier local testing
- Update Docker port from 8080 to 8000 (Django default)
- Adjust Gunicorn binding to match new port configuration

This simplifies local development setup by using standard Django
conventions and removing host restrictions. The previous specific
host configuration can be restored for production deployment.
2025-11-23 18:26:44 +00:00
9a84e253f1 chore(config): update ALLOWED_HOSTS with new sslip.io domain
- Replace old sslip.io subdomain with new one (r0g84wkoc4cwoo0gckss88ow)
- Remove redundant IP address entries (72.61.138.80, 127.0.0.1)
- Keep localhost for local development

This updates the Django allowed hosts configuration to use the new
SSL.io subdomain while simplifying the host list by removing
redundant entries already covered by localhost.
2025-11-23 17:11:35 +00:00
265dd9b57a chore(database): switch from SQLite to PostgreSQL
Replace SQLite database configuration with PostgreSQL configuration
that uses environment variables for connection settings. This enables
production-ready database deployment with proper credentials management
through environment variables (POSTGRES_DB, POSTGRES_USER,
POSTGRES_PASSWORD, POSTGRES_HOST, POSTGRES_PORT).
2025-11-23 15:41:52 +00:00
22ecb9a611 config: switch to SQLite database and change application port to 8080
- Replace PostgreSQL with SQLite as default database backend
- Comment out PostgreSQL configuration for potential future use
- Update Docker exposed port from 8000 to 8080
- Update Gunicorn bind address to match new port

This simplifies the deployment setup by removing the PostgreSQL
dependency and aligns the application port with common alternatives
to port 8000.
2025-11-23 15:40:46 +00:00
a6ae78644d config: switch database backend from SQLite to PostgreSQL
Replace SQLite with PostgreSQL as the default database backend.
Database connection settings are now configured via environment
variables (POSTGRES_DB, POSTGRES_USER, POSTGRES_PASSWORD,
POSTGRES_HOST, POSTGRES_PORT) for better scalability and
production readiness.
2025-11-23 00:36:34 +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
6ea70ee669 $$# 2025-11-22 17:26:52 +00:00
7d22911646 #$$ 2025-11-22 16:44:53 +00:00
bc881c84f9 $ 2025-11-22 16:07:11 +00:00
f06b5120e9 feat: add HIPAA-compliant email and OTP authentication system
Add comprehensive HIPAA compliance features and OTP-based authentication:

- Configure HIPAA email settings with AES-256 encryption standard
- Add secure portal URL and BAA verification configuration
- Implement OTP verification for user registration and password reset
- Add user model fields for email verification and password reset OTPs
- Configure templates directory in Django settings
- Add authentication flow endpoints with detailed documentation
- Update dependencies to support new security features
- Reorganize .gitignore for better structure

These changes ensure HIPAA compliance for healthcare data handling
with 6-year audit retention, secure email communications, and
multi-factor authentication capabilities.
2025-11-22 02:19:44 +00:00
c2015d5ad0 Implement user model with custom user manager and update admin serializers 2025-11-13 00:52:34 +00:00
b966bfd190 Add initial Django project structure with user authentication and profile management 2025-11-12 11:51:27 +00:00