diff --git a/assets/pasted-20260312-075015-5bfcde5a.png b/assets/pasted-20260312-075015-5bfcde5a.png new file mode 100644 index 0000000..1486bd3 Binary files /dev/null and b/assets/pasted-20260312-075015-5bfcde5a.png differ diff --git a/assets/pasted-20260312-075439-a7d6936f.png b/assets/pasted-20260312-075439-a7d6936f.png new file mode 100644 index 0000000..1486bd3 Binary files /dev/null and b/assets/pasted-20260312-075439-a7d6936f.png differ diff --git a/assets/pasted-20260312-080648-eac18161.png b/assets/pasted-20260312-080648-eac18161.png new file mode 100644 index 0000000..a23385d Binary files /dev/null and b/assets/pasted-20260312-080648-eac18161.png differ diff --git a/assets/vm-shot-2026-03-12T07-54-30-697Z.jpg b/assets/vm-shot-2026-03-12T07-54-30-697Z.jpg new file mode 100644 index 0000000..05f9e95 Binary files /dev/null and b/assets/vm-shot-2026-03-12T07-54-30-697Z.jpg differ diff --git a/config/__pycache__/__init__.cpython-311.pyc b/config/__pycache__/__init__.cpython-311.pyc index 896bb4f..28c5a12 100644 Binary files a/config/__pycache__/__init__.cpython-311.pyc and b/config/__pycache__/__init__.cpython-311.pyc differ diff --git a/config/__pycache__/settings.cpython-311.pyc b/config/__pycache__/settings.cpython-311.pyc index d79d6a7..37e387a 100644 Binary files a/config/__pycache__/settings.cpython-311.pyc and b/config/__pycache__/settings.cpython-311.pyc differ diff --git a/config/__pycache__/urls.cpython-311.pyc b/config/__pycache__/urls.cpython-311.pyc index 8cf22af..689cb42 100644 Binary files a/config/__pycache__/urls.cpython-311.pyc and b/config/__pycache__/urls.cpython-311.pyc differ diff --git a/config/__pycache__/wsgi.cpython-311.pyc b/config/__pycache__/wsgi.cpython-311.pyc index a1b4aa7..bb52b0a 100644 Binary files a/config/__pycache__/wsgi.cpython-311.pyc and b/config/__pycache__/wsgi.cpython-311.pyc differ diff --git a/config/settings.py b/config/settings.py index 291d043..8169561 100644 --- a/config/settings.py +++ b/config/settings.py @@ -180,3 +180,6 @@ if EMAIL_USE_SSL: # https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' + +LOGIN_REDIRECT_URL = '/projects/' +LOGOUT_REDIRECT_URL = '/' \ No newline at end of file diff --git a/config/urls.py b/config/urls.py index bcfc074..fecf250 100644 --- a/config/urls.py +++ b/config/urls.py @@ -21,9 +21,10 @@ from django.conf.urls.static import static urlpatterns = [ path("admin/", admin.site.urls), + path("accounts/", include("django.contrib.auth.urls")), path("", include("core.urls")), ] if settings.DEBUG: urlpatterns += static("/assets/", document_root=settings.BASE_DIR / "assets") - urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) \ No newline at end of file diff --git a/core/__pycache__/__init__.cpython-311.pyc b/core/__pycache__/__init__.cpython-311.pyc index 3f553f6..2a2e558 100644 Binary files a/core/__pycache__/__init__.cpython-311.pyc and b/core/__pycache__/__init__.cpython-311.pyc differ diff --git a/core/__pycache__/admin.cpython-311.pyc b/core/__pycache__/admin.cpython-311.pyc index 5e8987a..7f94591 100644 Binary files a/core/__pycache__/admin.cpython-311.pyc and b/core/__pycache__/admin.cpython-311.pyc differ diff --git a/core/__pycache__/ai_views.cpython-311.pyc b/core/__pycache__/ai_views.cpython-311.pyc new file mode 100644 index 0000000..f43e924 Binary files /dev/null and b/core/__pycache__/ai_views.cpython-311.pyc differ diff --git a/core/__pycache__/apps.cpython-311.pyc b/core/__pycache__/apps.cpython-311.pyc index 2fa4a49..f18be8f 100644 Binary files a/core/__pycache__/apps.cpython-311.pyc and b/core/__pycache__/apps.cpython-311.pyc differ diff --git a/core/__pycache__/context_processors.cpython-311.pyc b/core/__pycache__/context_processors.cpython-311.pyc index 75bf223..b91a99b 100644 Binary files a/core/__pycache__/context_processors.cpython-311.pyc and b/core/__pycache__/context_processors.cpython-311.pyc differ diff --git a/core/__pycache__/models.cpython-311.pyc b/core/__pycache__/models.cpython-311.pyc index a251b5f..19cdb46 100644 Binary files a/core/__pycache__/models.cpython-311.pyc and b/core/__pycache__/models.cpython-311.pyc differ diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index f705988..3a131a7 100644 Binary files a/core/__pycache__/urls.cpython-311.pyc and b/core/__pycache__/urls.cpython-311.pyc differ diff --git a/core/__pycache__/views.cpython-311.pyc b/core/__pycache__/views.cpython-311.pyc index 2f0989c..3046e6b 100644 Binary files a/core/__pycache__/views.cpython-311.pyc and b/core/__pycache__/views.cpython-311.pyc differ diff --git a/core/ai_views.py b/core/ai_views.py new file mode 100644 index 0000000..a7ae611 --- /dev/null +++ b/core/ai_views.py @@ -0,0 +1,18 @@ +from django.http import JsonResponse +from django.views.decorators.csrf import csrf_exempt +from django.contrib.auth.decorators import login_required +import json + +@csrf_exempt +@login_required +def ai_chat(request, pk): + if request.method == 'POST': + data = json.loads(request.body) + user_message = data.get('message') + + # In a real app, this would call your AI service (e.g., GPT, Gemini) + # Here we mock the AI response + ai_response = f"AI thinking about: {user_message}. Based on my analysis, you should consider..." + + return JsonResponse({'response': ai_response}) + return JsonResponse({'error': 'Invalid request'}, status=400) \ No newline at end of file diff --git a/core/migrations/0001_initial.py b/core/migrations/0001_initial.py new file mode 100644 index 0000000..357f98d --- /dev/null +++ b/core/migrations/0001_initial.py @@ -0,0 +1,52 @@ +# Generated by Django 5.2.7 on 2026-03-12 07:49 + +import django.db.models.deletion +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Project', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=200)), + ('industry', models.CharField(max_length=100)), + ('goal', models.TextField()), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('updated_at', models.DateTimeField(auto_now=True)), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='MindMapNode', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=200)), + ('summary', models.TextField()), + ('category', models.CharField(max_length=100)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='nodes', to='core.project')), + ], + ), + migrations.CreateModel( + name='MindMapConnection', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('how', models.TextField(help_text='How they connect')), + ('why', models.TextField(help_text='Why they connect')), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('source', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='outgoing_connections', to='core.mindmapnode')), + ('target', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='incoming_connections', to='core.mindmapnode')), + ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='connections', to='core.project')), + ], + ), + ] diff --git a/core/migrations/__pycache__/0001_initial.cpython-311.pyc b/core/migrations/__pycache__/0001_initial.cpython-311.pyc new file mode 100644 index 0000000..d2ab985 Binary files /dev/null and b/core/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/__init__.cpython-311.pyc b/core/migrations/__pycache__/__init__.cpython-311.pyc index 7995815..2d0bab5 100644 Binary files a/core/migrations/__pycache__/__init__.cpython-311.pyc and b/core/migrations/__pycache__/__init__.cpython-311.pyc differ diff --git a/core/models.py b/core/models.py index 71a8362..7e90843 100644 --- a/core/models.py +++ b/core/models.py @@ -1,3 +1,34 @@ from django.db import models +from django.conf import settings -# Create your models here. +class Project(models.Model): + user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) + title = models.CharField(max_length=200) + industry = models.CharField(max_length=100) + goal = models.TextField() + created_at = models.DateTimeField(auto_now_add=True) + updated_at = models.DateTimeField(auto_now=True) + + def __str__(self): + return self.title + +class MindMapNode(models.Model): + project = models.ForeignKey(Project, on_delete=models.CASCADE, related_name='nodes') + title = models.CharField(max_length=200) + summary = models.TextField() + category = models.CharField(max_length=100) + created_at = models.DateTimeField(auto_now_add=True) + + def __str__(self): + return self.title + +class MindMapConnection(models.Model): + project = models.ForeignKey(Project, on_delete=models.CASCADE, related_name='connections') + source = models.ForeignKey(MindMapNode, on_delete=models.CASCADE, related_name='outgoing_connections') + target = models.ForeignKey(MindMapNode, on_delete=models.CASCADE, related_name='incoming_connections') + how = models.TextField(help_text="How they connect") + why = models.TextField(help_text="Why they connect") + created_at = models.DateTimeField(auto_now_add=True) + + def __str__(self): + return f"{self.source.title} -> {self.target.title}" \ No newline at end of file diff --git a/core/templates/base.html b/core/templates/base.html index 1e7e5fb..d636f86 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -3,6 +3,7 @@
+