-
Analyzing your requirements and generating your app…
-
-
Loading…
+
+
+
+
+
+
Creative Story Writer
+
Harness the power of AI to bring your stories to life. Overcome writer's block, generate new ideas, and craft compelling narratives with ease.
+
Get Started
-
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" }}
-
-
-
-
+
{% endblock %}
\ No newline at end of file
diff --git a/core/urls.py b/core/urls.py
index 6299e3d..622ef9d 100644
--- a/core/urls.py
+++ b/core/urls.py
@@ -2,6 +2,8 @@ from django.urls import path
from .views import home
+app_name = "core"
+
urlpatterns = [
path("", home, name="home"),
]
diff --git a/static/css/custom.css b/static/css/custom.css
index 925f6ed..49b8737 100644
--- a/static/css/custom.css
+++ b/static/css/custom.css
@@ -1,4 +1,145 @@
/* Custom styles for the application */
+@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Inter:wght@400;600;700&display=swap');
+
body {
- font-family: system-ui, -apple-system, sans-serif;
+ font-family: 'Inter', sans-serif;
+ background-color: #f8f9fa;
+ color: #343a40;
+ overflow-x: hidden;
+}
+
+.hero-shapes {
+ position: relative;
+ background: linear-gradient(135deg, #f8f9fa, #e0e7ff);
+ overflow: hidden;
+ padding: 100px 0;
+ animation: gradient-animation 10s ease infinite;
+}
+
+@keyframes gradient-animation {
+ 0% { background: linear-gradient(135deg, #f8f9fa, #e0e7ff); }
+ 50% { background: linear-gradient(135deg, #e0e7ff, #f8f9fa); }
+ 100% { background: linear-gradient(135deg, #f8f9fa, #e0e7ff); }
+}
+
+.shape {
+ position: absolute;
+ border-radius: 50%;
+ background-color: rgba(0, 123, 255, 0.1);
+ animation: shape-animation 20s infinite linear;
+}
+
+.shape-1 {
+ width: 200px;
+ height: 200px;
+ top: 10%;
+ left: 10%;
+}
+
+.shape-2 {
+ width: 100px;
+ height: 100px;
+ top: 60%;
+ right: 20%;
+ animation-delay: 5s;
+}
+
+.shape-3 {
+ width: 150px;
+ height: 150px;
+ bottom: 10%;
+ left: 30%;
+ animation-delay: 10s;
+}
+
+@keyframes shape-animation {
+ 0% { transform: translateY(0) rotate(0deg); }
+ 100% { transform: translateY(-100px) rotate(360deg); }
+}
+
+.container {
+ max-width: 1200px;
+ position: relative;
+ z-index: 1;
+ animation: fade-in 1.5s ease;
+}
+
+@keyframes fade-in {
+ from { opacity: 0; transform: translateY(20px); }
+ to { opacity: 1; transform: translateY(0); }
+}
+
+h1.display-4.fw-bold {
+ font-family: 'Playfair Display', serif;
+ font-weight: 700;
+ color: #212529;
+}
+
+.lead {
+ color: #6c757d;
+}
+
+.btn-primary {
+ background-color: #007bff;
+ border-color: #007bff;
+ border-radius: 50px;
+ font-weight: 600;
+ padding: 15px 30px;
+ font-size: 1.2rem;
+ transition: background-color 0.2s, transform 0.2s;
+}
+
+.btn-primary:hover {
+ background-color: #0056b3;
+ transform: translateY(-2px);
+}
+
+/* Story writer specific styles */
+
+.card {
+ border: none;
+ border-radius: 15px;
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
+ transition: transform 0.2s;
+}
+
+.card:hover {
+ transform: translateY(-5px);
+}
+
+.card-body {
+ padding: 2rem;
+}
+
+.card-title {
+ font-weight: 600;
+ margin-bottom: 1.5rem;
+}
+
+#editor, #suggestion {
+ border-radius: 10px;
+ border: 1px solid #dee2e6;
+ padding: 15px;
+ font-size: 1rem;
+ line-height: 1.6;
+ background-color: #fff;
+}
+
+#editor:focus, #suggestion:focus {
+ outline: none;
+ border-color: #80bdff;
+ box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
+}
+
+.spinner-border {
+ width: 3rem;
+ height: 3rem;
+ color: #007bff;
+}
+
+.center-spinner {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100%;
}
diff --git a/staticfiles/css/custom.css b/staticfiles/css/custom.css
index 108056f..49b8737 100644
--- a/staticfiles/css/custom.css
+++ b/staticfiles/css/custom.css
@@ -1,21 +1,145 @@
+/* Custom styles for the application */
+@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Inter:wght@400;600;700&display=swap');
-:root {
- --bg-color-start: #6a11cb;
- --bg-color-end: #2575fc;
- --text-color: #ffffff;
- --card-bg-color: rgba(255, 255, 255, 0.01);
- --card-border-color: rgba(255, 255, 255, 0.1);
-}
body {
- margin: 0;
font-family: 'Inter', sans-serif;
- background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
- color: var(--text-color);
+ background-color: #f8f9fa;
+ color: #343a40;
+ overflow-x: hidden;
+}
+
+.hero-shapes {
+ position: relative;
+ background: linear-gradient(135deg, #f8f9fa, #e0e7ff);
+ overflow: hidden;
+ padding: 100px 0;
+ animation: gradient-animation 10s ease infinite;
+}
+
+@keyframes gradient-animation {
+ 0% { background: linear-gradient(135deg, #f8f9fa, #e0e7ff); }
+ 50% { background: linear-gradient(135deg, #e0e7ff, #f8f9fa); }
+ 100% { background: linear-gradient(135deg, #f8f9fa, #e0e7ff); }
+}
+
+.shape {
+ position: absolute;
+ border-radius: 50%;
+ background-color: rgba(0, 123, 255, 0.1);
+ animation: shape-animation 20s infinite linear;
+}
+
+.shape-1 {
+ width: 200px;
+ height: 200px;
+ top: 10%;
+ left: 10%;
+}
+
+.shape-2 {
+ width: 100px;
+ height: 100px;
+ top: 60%;
+ right: 20%;
+ animation-delay: 5s;
+}
+
+.shape-3 {
+ width: 150px;
+ height: 150px;
+ bottom: 10%;
+ left: 30%;
+ animation-delay: 10s;
+}
+
+@keyframes shape-animation {
+ 0% { transform: translateY(0) rotate(0deg); }
+ 100% { transform: translateY(-100px) rotate(360deg); }
+}
+
+.container {
+ max-width: 1200px;
+ position: relative;
+ z-index: 1;
+ animation: fade-in 1.5s ease;
+}
+
+@keyframes fade-in {
+ from { opacity: 0; transform: translateY(20px); }
+ to { opacity: 1; transform: translateY(0); }
+}
+
+h1.display-4.fw-bold {
+ font-family: 'Playfair Display', serif;
+ font-weight: 700;
+ color: #212529;
+}
+
+.lead {
+ color: #6c757d;
+}
+
+.btn-primary {
+ background-color: #007bff;
+ border-color: #007bff;
+ border-radius: 50px;
+ font-weight: 600;
+ padding: 15px 30px;
+ font-size: 1.2rem;
+ transition: background-color 0.2s, transform 0.2s;
+}
+
+.btn-primary:hover {
+ background-color: #0056b3;
+ transform: translateY(-2px);
+}
+
+/* Story writer specific styles */
+
+.card {
+ border: none;
+ border-radius: 15px;
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
+ transition: transform 0.2s;
+}
+
+.card:hover {
+ transform: translateY(-5px);
+}
+
+.card-body {
+ padding: 2rem;
+}
+
+.card-title {
+ font-weight: 600;
+ margin-bottom: 1.5rem;
+}
+
+#editor, #suggestion {
+ border-radius: 10px;
+ border: 1px solid #dee2e6;
+ padding: 15px;
+ font-size: 1rem;
+ line-height: 1.6;
+ background-color: #fff;
+}
+
+#editor:focus, #suggestion:focus {
+ outline: none;
+ border-color: #80bdff;
+ box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
+}
+
+.spinner-border {
+ width: 3rem;
+ height: 3rem;
+ color: #007bff;
+}
+
+.center-spinner {
display: flex;
justify-content: center;
align-items: center;
- min-height: 100vh;
- text-align: center;
- overflow: hidden;
- position: relative;
+ height: 100%;
}
diff --git a/story_writer/__init__.py b/story_writer/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/story_writer/__pycache__/__init__.cpython-311.pyc b/story_writer/__pycache__/__init__.cpython-311.pyc
new file mode 100644
index 0000000..a073f04
Binary files /dev/null and b/story_writer/__pycache__/__init__.cpython-311.pyc differ
diff --git a/story_writer/__pycache__/admin.cpython-311.pyc b/story_writer/__pycache__/admin.cpython-311.pyc
new file mode 100644
index 0000000..f970a16
Binary files /dev/null and b/story_writer/__pycache__/admin.cpython-311.pyc differ
diff --git a/story_writer/__pycache__/apps.cpython-311.pyc b/story_writer/__pycache__/apps.cpython-311.pyc
new file mode 100644
index 0000000..d240c82
Binary files /dev/null and b/story_writer/__pycache__/apps.cpython-311.pyc differ
diff --git a/story_writer/__pycache__/models.cpython-311.pyc b/story_writer/__pycache__/models.cpython-311.pyc
new file mode 100644
index 0000000..c8efd7a
Binary files /dev/null and b/story_writer/__pycache__/models.cpython-311.pyc differ
diff --git a/story_writer/__pycache__/urls.cpython-311.pyc b/story_writer/__pycache__/urls.cpython-311.pyc
new file mode 100644
index 0000000..87a6eb9
Binary files /dev/null and b/story_writer/__pycache__/urls.cpython-311.pyc differ
diff --git a/story_writer/__pycache__/views.cpython-311.pyc b/story_writer/__pycache__/views.cpython-311.pyc
new file mode 100644
index 0000000..e7d82eb
Binary files /dev/null and b/story_writer/__pycache__/views.cpython-311.pyc differ
diff --git a/story_writer/admin.py b/story_writer/admin.py
new file mode 100644
index 0000000..8c38f3f
--- /dev/null
+++ b/story_writer/admin.py
@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.
diff --git a/story_writer/apps.py b/story_writer/apps.py
new file mode 100644
index 0000000..b24e15f
--- /dev/null
+++ b/story_writer/apps.py
@@ -0,0 +1,6 @@
+from django.apps import AppConfig
+
+
+class StoryWriterConfig(AppConfig):
+ default_auto_field = 'django.db.models.BigAutoField'
+ name = 'story_writer'
diff --git a/story_writer/migrations/__init__.py b/story_writer/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/story_writer/migrations/__pycache__/__init__.cpython-311.pyc b/story_writer/migrations/__pycache__/__init__.cpython-311.pyc
new file mode 100644
index 0000000..e401749
Binary files /dev/null and b/story_writer/migrations/__pycache__/__init__.cpython-311.pyc differ
diff --git a/story_writer/models.py b/story_writer/models.py
new file mode 100644
index 0000000..71a8362
--- /dev/null
+++ b/story_writer/models.py
@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.
diff --git a/story_writer/templates/story_writer/index.html b/story_writer/templates/story_writer/index.html
new file mode 100644
index 0000000..cde521e
--- /dev/null
+++ b/story_writer/templates/story_writer/index.html
@@ -0,0 +1,93 @@
+{% extends "base.html" %}
+{% block content %}
+
+
Creative Story Writer
+
+
+
+
+
+
AI Assistant
+
Let the AI help you write your story.
+
+
+
+
+
+
+
AI Suggestion
+
+
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/story_writer/tests.py b/story_writer/tests.py
new file mode 100644
index 0000000..7ce503c
--- /dev/null
+++ b/story_writer/tests.py
@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.
diff --git a/story_writer/urls.py b/story_writer/urls.py
new file mode 100644
index 0000000..17c759f
--- /dev/null
+++ b/story_writer/urls.py
@@ -0,0 +1,9 @@
+from django.urls import path
+from . import views
+
+app_name = 'story_writer'
+
+urlpatterns = [
+ path('', views.story_writer, name='index'),
+ path('ai-assistant/', views.ai_assistant, name='ai_assistant'),
+]
diff --git a/story_writer/views.py b/story_writer/views.py
new file mode 100644
index 0000000..9fa74a2
--- /dev/null
+++ b/story_writer/views.py
@@ -0,0 +1,30 @@
+from django.shortcuts import render
+from django.http import JsonResponse
+from ai.local_ai_api import LocalAIApi
+import json
+
+def story_writer(request):
+ return render(request, 'story_writer/index.html')
+
+def ai_assistant(request):
+ if request.method == 'POST':
+ data = json.loads(request.body)
+ story = data.get('story', '')
+ prompt = data.get('prompt', '')
+
+ response = LocalAIApi.create_response(
+ {
+ "input": [
+ {"role": "system", "content": "You are a creative writing assistant."},
+ {"role": "user", "content": f'Here is the story so far:\n\n{story}\n\nNow, please continue the story with a {prompt}.'}
+ ],
+ },
+ )
+
+ if response.get("success"):
+ text = LocalAIApi.extract_text(response)
+ return JsonResponse({'suggestion': text})
+ else:
+ return JsonResponse({'error': 'Failed to get a response from the AI.'}, status=500)
+
+ return JsonResponse({'error': 'Invalid request method.'}, status=405)
\ No newline at end of file