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 @@ + {% block title %}Knowledge Base{% endblock %} {% if project_description %} @@ -13,6 +14,10 @@ {% endif %} + + + + {% load static %} {% block head %}{% endblock %} @@ -22,4 +27,4 @@ {% block content %}{% endblock %} - + \ No newline at end of file diff --git a/core/templates/core/create_project.html b/core/templates/core/create_project.html new file mode 100644 index 0000000..fa5065e --- /dev/null +++ b/core/templates/core/create_project.html @@ -0,0 +1,22 @@ +{% extends 'base.html' %} +{% block content %} +
+

Create New Project

+
+ {% csrf_token %} +
+ + +
+
+ + +
+
+ + +
+ +
+
+{% endblock %} diff --git a/core/templates/core/index.html b/core/templates/core/index.html index faec813..ba08d3a 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -1,145 +1,235 @@ {% extends "base.html" %} -{% block title %}{{ project_name }}{% endblock %} +{% block title %}AI Business Planning & Mind Map{% endblock %} {% block head %} - + {% endblock %} {% block content %}
-
-

Analyzing your requirements and generating your app…

-
- Loading… +
+
+
+ +
+

Build Businesses from Scratch with AI

+

Your intelligent workspace for planning, validating, and pitching business ideas. Create dynamic mind maps that research, reason, and write for you.

+ +
+ {% if user.is_authenticated %} + Go to My Projects + {% else %} + Start a Project + {% endif %} +
-

AppWizzy AI is collecting your requirements and applying the first changes.

-

This page will refresh automatically as the plan is implemented.

-

- Runtime: Django {{ django_version }} · Python {{ python_version }} - — UTC {{ current_time|date:"Y-m-d H:i:s" }} -

-
+ + +
+
+
🧠
+

Living Mind Maps

+

Connect your ideas with AI-powered 'how' and 'why' reasoning. Watch your initial concepts grow into comprehensive business models.

+
+ +
+
📚
+

Expert Research Layer

+

Upload articles, URLs, and notes. The AI learns from your specific sources to become an expert in your precise field and niche.

+
+ +
+
💼
+

Investor-Ready Docs

+

Automatically generate polished business plans, VC pitch decks, and vendor-finance proposals directly from your expanded mind map.

+
+
- {% endblock %} \ No newline at end of file diff --git a/core/templates/core/project_detail.html b/core/templates/core/project_detail.html new file mode 100644 index 0000000..7cb049e --- /dev/null +++ b/core/templates/core/project_detail.html @@ -0,0 +1,49 @@ +{% extends 'base.html' %} +{% block content %} +
+

{{ project.title }}

+

Industry: {{ project.industry }}

+

Goal: {{ project.goal }}

+ +

Mind Map Nodes

+ + +

Connections

+ + +

Chat with AI

+
+ + +
+
+
Waiting for input...
+
+
+ + +{% endblock %} diff --git a/core/templates/core/project_list.html b/core/templates/core/project_list.html new file mode 100644 index 0000000..a2652d4 --- /dev/null +++ b/core/templates/core/project_list.html @@ -0,0 +1,20 @@ +{% extends 'base.html' %} +{% block content %} +
+

My Projects

+ New Project +
+ {% for project in projects %} +
+
+
+
{{ project.title }}
+

{{ project.industry }}

+ Open +
+
+
+ {% endfor %} +
+
+{% endblock %} diff --git a/core/templates/registration/login.html b/core/templates/registration/login.html new file mode 100644 index 0000000..10499b9 --- /dev/null +++ b/core/templates/registration/login.html @@ -0,0 +1,23 @@ +{% extends "base.html" %} + +{% block content %} +
+
+
+
+
+

Log In

+
+ {% csrf_token %} + {{ form.as_p }} + +
+
+

Don't have an account? Sign up here

+
+
+
+
+
+
+{% endblock %} diff --git a/core/templates/registration/signup.html b/core/templates/registration/signup.html new file mode 100644 index 0000000..cd814cc --- /dev/null +++ b/core/templates/registration/signup.html @@ -0,0 +1,23 @@ +{% extends "base.html" %} + +{% block content %} +
+
+
+
+
+

Sign Up

+
+ {% csrf_token %} + {{ form.as_p }} + +
+
+

Already have an account? Log in here

+
+
+
+
+
+
+{% endblock %} diff --git a/core/urls.py b/core/urls.py index 6299e3d..f1e9278 100644 --- a/core/urls.py +++ b/core/urls.py @@ -1,7 +1,12 @@ from django.urls import path - -from .views import home +from .views import home, project_list, project_detail, create_project, signup +from .ai_views import ai_chat urlpatterns = [ path("", home, name="home"), -] + path("projects/", project_list, name="project_list"), + path("projects/new/", create_project, name="create_project"), + path("projects//", project_detail, name="project_detail"), + path("projects//ai/", ai_chat, name="ai_chat"), + path("signup/", signup, name="signup"), +] \ No newline at end of file diff --git a/core/views.py b/core/views.py index c9aed12..9666f0c 100644 --- a/core/views.py +++ b/core/views.py @@ -1,25 +1,45 @@ -import os -import platform - -from django import get_version as django_version -from django.shortcuts import render -from django.utils import timezone +from django.shortcuts import render, redirect, get_object_or_404 +from django.contrib.auth.decorators import login_required +from django.contrib.auth.forms import UserCreationForm +from django.contrib.auth import login +from .models import Project, MindMapNode, MindMapConnection +def signup(request): + if request.method == 'POST': + form = UserCreationForm(request.POST) + if form.is_valid(): + user = form.save() + login(request, user) + return redirect('project_list') + else: + form = UserCreationForm() + return render(request, 'registration/signup.html', {'form': form}) def home(request): - """Render the landing screen with loader and environment details.""" - host_name = request.get_host().lower() - agent_brand = "AppWizzy" if host_name == "appwizzy.com" else "Flatlogic" - now = timezone.now() + return render(request, 'core/index.html') - context = { - "project_name": "New Style", - "agent_brand": agent_brand, - "django_version": django_version(), - "python_version": platform.python_version(), - "current_time": now, - "host_name": host_name, - "project_description": os.getenv("PROJECT_DESCRIPTION", ""), - "project_image_url": os.getenv("PROJECT_IMAGE_URL", ""), - } - return render(request, "core/index.html", context) +@login_required +def project_list(request): + projects = Project.objects.filter(user=request.user) + return render(request, 'core/project_list.html', {'projects': projects}) + +@login_required +def project_detail(request, pk): + project = get_object_or_404(Project, pk=pk, user=request.user) + nodes = project.nodes.all() + connections = project.connections.all() + return render(request, 'core/project_detail.html', { + 'project': project, + 'nodes': nodes, + 'connections': connections + }) + +@login_required +def create_project(request): + if request.method == 'POST': + title = request.POST.get('title') + industry = request.POST.get('industry') + goal = request.POST.get('goal') + project = Project.objects.create(user=request.user, title=title, industry=industry, goal=goal) + return redirect('project_detail', pk=project.pk) + return render(request, 'core/create_project.html') \ No newline at end of file