-
Analyzing your requirements and generating your app…
-
-
Loading…
+
+
+
Your Shield Against Digital Scams
+
Analyze suspicious messages, emails, and websites to protect yourself from digital threats.
+
Check for Scams
-
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
+
+
+
+{% endblock %}
diff --git a/core/templates/registration/login.html b/core/templates/registration/login.html
new file mode 100644
index 0000000..3c201a0
--- /dev/null
+++ b/core/templates/registration/login.html
@@ -0,0 +1,18 @@
+{% extends "base.html" %}
+
+{% block title %}Login{% endblock title %}
+
+{% block content %}
+
+{% endblock content %}
diff --git a/core/templates/registration/signup.html b/core/templates/registration/signup.html
new file mode 100644
index 0000000..e55db0c
--- /dev/null
+++ b/core/templates/registration/signup.html
@@ -0,0 +1,18 @@
+{% extends "base.html" %}
+
+{% block title %}Sign Up{% endblock title %}
+
+{% block content %}
+
+
+
+
Create an Account
+
+
+
+
+{% endblock content %}
diff --git a/core/urls.py b/core/urls.py
index 6299e3d..bfc1a4d 100644
--- a/core/urls.py
+++ b/core/urls.py
@@ -1,7 +1,11 @@
from django.urls import path
-
-from .views import home
+from .views import index, analyze_report, SignupView, CustomLoginView, CustomLogoutView, api_analyze
urlpatterns = [
- path("", home, name="home"),
+ path('', index, name='index'),
+ path('analyze/', analyze_report, name='analyze'),
+ path('api/analyze/', api_analyze, name='api_analyze'),
+ path('signup/', SignupView.as_view(), name='signup'),
+ path('login/', CustomLoginView.as_view(), name='login'),
+ path('logout/', CustomLogoutView.as_view(), name='logout'),
]
diff --git a/core/views.py b/core/views.py
index c9aed12..2148ef2 100644
--- a/core/views.py
+++ b/core/views.py
@@ -2,24 +2,70 @@ import os
import platform
from django import get_version as django_version
-from django.shortcuts import render
-from django.utils import timezone
+from django.contrib.auth.forms import UserCreationForm
+from django.contrib.auth.views import LoginView, LogoutView
+from django.shortcuts import render, redirect
+from django.urls import reverse_lazy
+from django.views.generic import CreateView
+from .forms import ScamReportForm, SignUpForm
+from .models import ScamReport
-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()
+def index(request):
+ """Render the homepage with a scam submission form."""
+ form = ScamReportForm()
+ return render(request, 'core/index.html', {'form': form})
- 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)
+
+def analyze_report(request):
+ """Process the scam report submission and display an analysis page."""
+ if request.method == 'POST':
+ form = ScamReportForm(request.POST)
+ if form.is_valid():
+ report = form.save()
+ return render(request, 'core/analysis_result.html', {'report': report})
+ # Redirect to home if not a POST request or form is invalid
+ return redirect('index')
+
+
+
+class SignupView(CreateView):
+ form_class = SignUpForm
+ success_url = reverse_lazy('login')
+ template_name = 'registration/signup.html'
+
+
+class CustomLoginView(LoginView):
+ template_name = 'registration/login.html'
+ redirect_authenticated_user = True
+
+ def get_success_url(self):
+ return reverse_lazy('index')
+
+
+class CustomLogoutView(LogoutView):
+ next_page = reverse_lazy('index')
+
+
+from django.http import JsonResponse
+from django.views.decorators.csrf import csrf_exempt
+import json
+
+@csrf_exempt
+def api_analyze(request):
+ """API endpoint to analyze content for scams."""
+ if request.method == 'POST':
+ try:
+ data = json.loads(request.body)
+ content_to_analyze = data.get('content')
+
+ if content_to_analyze:
+ # In the future, we will add real analysis logic here.
+ # For now, we'll return a placeholder response.
+ return JsonResponse({'status': 'ok', 'message': 'Analysis complete.'})
+ else:
+ return JsonResponse({'status': 'error', 'message': 'No content provided.'}, status=400)
+ except json.JSONDecodeError:
+ return JsonResponse({'status': 'error', 'message': 'Invalid JSON.'}, status=400)
+
+ return JsonResponse({'status': 'error', 'message': 'Invalid request method.'}, status=405)
diff --git a/static/css/custom.css b/static/css/custom.css
new file mode 100644
index 0000000..265ec02
--- /dev/null
+++ b/static/css/custom.css
@@ -0,0 +1,152 @@
+/*
+ ScamGuard Custom Stylesheet
+*/
+
+:root {
+ --primary-dark-blue: #0A192F;
+ --secondary-slate: #8892B0;
+ --accent-green: #64FFDA;
+ --background-light-navy: #0E1F3A;
+ --text-light-slate: #CCD6F6;
+ --text-dark-slate: #495670;
+ --card-background: #112240;
+ --font-family-headings: 'Poppins', sans-serif;
+ --font-family-body: 'Inter', sans-serif;
+}
+
+body {
+ background-color: var(--primary-dark-blue);
+ color: var(--text-light-slate);
+ font-family: var(--font-family-body);
+}
+
+h1, h2, h3, h4, h5, h6 {
+ font-family: var(--font-family-headings);
+ color: var(--text-light-slate);
+ font-weight: 600;
+}
+
+/* Hero Section */
+.hero-section {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ min-height: 60vh;
+ padding: 4rem 0;
+ background: linear-gradient(180deg, var(--background-light-navy) 0%, var(--primary-dark-blue) 100%);
+}
+
+.hero-title {
+ font-size: 3.5rem;
+ font-weight: 700;
+ color: #fff;
+}
+
+.hero-subtitle {
+ font-size: 1.25rem;
+ color: var(--secondary-slate);
+ max-width: 600px;
+ margin: 1rem auto 2rem;
+}
+
+.btn-accent {
+ background-color: var(--accent-green);
+ color: var(--primary-dark-blue);
+ border: none;
+ padding: 12px 30px;
+ font-weight: 700;
+ font-family: var(--font-family-headings);
+ transition: all 0.3s ease;
+}
+
+.btn-accent:hover {
+ background-color: #fff;
+ color: var(--primary-dark-blue);
+ transform: translateY(-3px);
+ box-shadow: 0 10px 20px rgba(0,0,0,0.1);
+}
+
+/* Content Section */
+.content-section {
+ padding: 4rem 0;
+}
+
+.form-container, .reports-container {
+ background-color: var(--card-background);
+ padding: 2.5rem;
+ border-radius: 8px;
+ height: 100%;
+}
+
+.form-container h2, .reports-container h2 {
+ margin-bottom: 0.5rem;
+ color: #fff;
+}
+
+.form-container p {
+ color: var(--secondary-slate);
+ margin-bottom: 1.5rem;
+}
+
+.form-control {
+ background-color: var(--primary-dark-blue);
+ border: 1px solid var(--text-dark-slate);
+ color: var(--text-light-slate);
+ padding: 0.75rem 1rem;
+}
+
+.form-control:focus {
+ background-color: var(--primary-dark-blue);
+ border-color: var(--accent-green);
+ color: #fff;
+ box-shadow: 0 0 0 0.25rem rgba(100, 255, 218, 0.25);
+}
+
+.form-control::placeholder {
+ color: var(--secondary-slate);
+}
+
+.btn-primary {
+ background-color: var(--accent-green);
+ border-color: var(--accent-green);
+ color: var(--primary-dark-blue);
+ padding: 10px 20px;
+ font-weight: 700;
+ transition: background-color 0.3s;
+}
+
+.btn-primary:hover {
+ background-color: #52d9b8;
+ border-color: #52d9b8;
+}
+
+/* Reports List */
+.reports-container .list-group {
+ max-height: 400px;
+ overflow-y: auto;
+}
+.report-item {
+ background-color: var(--primary-dark-blue);
+ border: 1px solid var(--text-dark-slate);
+ margin-bottom: 1rem;
+ border-radius: 5px;
+}
+
+.report-description {
+ color: var(--text-light-slate);
+ margin-bottom: 0.5rem;
+}
+
+.report-source {
+ color: var(--accent-green);
+ font-family: monospace;
+ font-size: 0.9rem;
+}
+
+.report-meta {
+ display: block;
+ font-size: 0.8rem;
+ color: var(--secondary-slate);
+ margin-top: 0.5rem;
+ text-align: right;
+}