Add local-first SPA architecture and containerized production deploy.

Move data access to use-cases and IndexedDB repositories with optional
remote fallback, changelog/sync ports, and encrypted local backup.
Add production Docker Compose (nginx frontend + optional backend) and
Apache host proxy configuration for deployment.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-29 16:08:02 +03:00
co-authored by Cursor
parent b668ee8507
commit 5e0af42fce
37 changed files with 1117 additions and 51 deletions
+10 -4
View File
@@ -1,10 +1,16 @@
import os
from pathlib import Path
BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = 'django-insecure-social-graph-dev-key-change-in-production'
DEBUG = True
ALLOWED_HOSTS = ['*']
SECRET_KEY = os.environ.get(
'SECRET_KEY',
'django-insecure-social-graph-dev-key-change-in-production',
)
DEBUG = os.environ.get('DEBUG', 'True').lower() in ('1', 'true', 'yes')
ALLOWED_HOSTS = [
h.strip() for h in os.environ.get('ALLOWED_HOSTS', '*').split(',') if h.strip()
]
INSTALLED_APPS = [
'django.contrib.contenttypes',
@@ -25,7 +31,7 @@ ROOT_URLCONF = 'config.urls'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
'NAME': os.environ.get('DATABASE_PATH', str(BASE_DIR / 'db.sqlite3')),
}
}
+7
View File
@@ -0,0 +1,7 @@
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
application = get_wsgi_application()