nslh commited on
Commit
efb14ad
·
verified ·
1 Parent(s): 7dd878e

Project Generation Prompt: Sally - Intelligent Customer Support Platform

Browse files

1. Role and Objective:
You are an expert full-stack software architect and senior developer. Your task is to generate the complete, well-structured, and production-ready source code for a project named "Sally", an advanced AI-powered customer support platform, based on the comprehensive documentation and specific technical requirements provided below.
2. Core Project Documentation:
First, thoroughly analyze the following project description to understand the vision, entities, features, and core logic.
Comprehensive Project Document: Sally Smart Assistant
1. Overview and Vision
Sally is an advanced AI-based customer support platform designed to provide instant, accurate, and personalized responses to users. By intelligently differentiating between "Guest" and "Customer" users, it provides a unique experience for each group and significantly reduces the workload on the human support team. Sally is not just a simple Q&A bot but a complete ecosystem for knowledge management, customer interaction, and support ticket handling.
2. Architecture and Key Concepts
The provided diagrams depict a modular, layered, and service-oriented architecture that forms the basis of the system's robustness and scalability. The core technical concepts are as follows:
Simple RAG (Retrieval-Augmented Generation) for Guest Users: This approach allows guest users to ask questions through a chat interface. The Sally system searches the public knowledge base (articles visible to everyone), finds relevant documents, and uses a language model to generate an accurate and relevant response.
Agentic RAG for Customers: For customers logged in with their accounts, Sally uses a more sophisticated and powerful approach. This system not all has access to the private knowledge base (including detailed guides for purchased products, troubleshooting methods, technical documentation, etc.) but can also better understand the context of the question by examining customer information (like the License and Product classes) to provide fully personalized answers. This "Agentic" nature allows Sally to follow multi-step processes to solve customer problems.
3. Key System Entities (Based on Class Diagram)
User Entities: User, CustomerUser, AdminUser, GuestSession, Role, Permission.
Interaction Entities: Ticket, TicketReply, Conversation, Message, Feedback.
Knowledge Entities: KnowledgeBaseArticle, ArticleVersion, Category, Tag, UnansweredQuestion.
4. Main System Features (Based on Use Case & Activity Diagrams)
Features for Guests: Live chat with the smart assistant (based on the public KB), search the knowledge base, and provide feedback.
Features for Customers: All guest features, plus advanced smart chat (Agentic RAG with private KB), a full ticketing system, and secure authentication.
Features for Admin Panel: Comprehensive knowledge base management (including uploading documents like PDF, TXT, Excel to auto-create articles), user and access management, monitoring interactions (live chats and tickets), reporting and analytics, and reviewing unanswered questions.
3. Critical Technical & Architectural Requirements:
You must adhere strictly to the following specifications. These requirements build upon and refine the core documentation.
A. Technology Stack:
Backend: FastAPI (Python)
Database: MongoDB
Frontend: React (JavaScript/TypeScript)
B. Backend Architecture (Clean Architecture):
Implement a strict Clean Architecture for the FastAPI backend with the following layers:
Presentation/API Layer: Contains FastAPI routers and API endpoint definitions. Handles HTTP requests and responses.
Application/Use Case Layer: Contains the core business logic and orchestrates the flow of data between the domain and infrastructure layers.
Domain Layer: Contains the core data structures and business entities (e.g., Pydantic models for User, Ticket, KnowledgeBaseArticle).
Infrastructure Layer: Contains all external-facing components, including database connectors (e.g., using motor or beanie for async MongoDB access), and interfaces for external services.
C. Frontend Architecture (Layered Architecture):
Structure the React frontend with a clear separation of concerns:
Components/UI Layer: Reusable and presentational components.
State Management Layer: Use React Context API or a library like Redux/Zustand to manage global state (e.g., user authentication, conversation history).
Services/API Layer: A dedicated layer for making API calls to the FastAPI backend (e.g., using Axios).
D. Role-Based Access Control (RBAC) - VERY IMPORTANT:
The system must implement a precise, multi-level access control system for administrators. This is a critical new requirement.
Two Admin Roles: Admin and Super Admin.
Admin Permissions:
Can perform all daily support tasks: view and reply to tickets, monitor live chats.
Can create new knowledge base articles and edit existing ones, but they are saved as drafts.
CANNOT publish articles, delete core data, or manage other users.
Super Admin Permissions:
Has all permissions of an Admin.
Exclusive Power:
Publishing: Can review draft articles created by Admins and approve/publish them to the knowledge base.
Hard Deletes: Is the only role that can permanently delete items from the database, such as KnowledgeBaseArticles or CustomerUsers.
User Management: Is the only role that can add, edit, or remove other Admin or Super Admin users.
Activity Log: Has exclusive access to a (to-be-coded) ActivityLog module that tracks all major actions within the system (e.g., "Admin X published article Y").
E. UI/UX & Static Assets:
The overall UI design must be minimalist, modern, and user-friendly.
For specific components like the Login Form, you must use images that will be located in the frontend directory at sally-frontend/src/assets/images/. Generate the code to reference these images accordingly.
F. Comprehensive API Endpoint Design:
Implement a complete and correct set of RESTful API endpoints for all functionalities. The structure should be logical and resource-oriented. This includes, but is not limited to:
Authentication: Endpoints for user registration (/auth/register), login (/auth/login), and retrieving the current user's data (/auth/me).
Chat Interaction: WebSocket or HTTP endpoints for handling conversations for both guests and authenticated customers.
Ticketing System (Customer-facing): Endpoints for creating, listing, viewing details of, and replying to tickets (e.g., POST /tickets, GET /tickets, GET /tickets/{ticket_id}, POST /tickets/{ticket_id}/replies).
Knowledge Base Management (Admin-facing): CRUD endpoints for articles, categories, and tags (e.g., GET /admin/kb/articles, POST /admin/kb/articles, PUT /admin/kb/articles/{article_id}). Include a special endpoint for publishing (POST /admin/kb/articles/{article_id}/publish accessible only by Super Admins) and another for document uploads (POST /admin/kb/upload).
User Management (Super Admin-facing): CRUD endpoints for managing admin users (e.g., GET /admin/users, POST /admin/users, DELETE /admin/users/{user_id}).
4. Final Deliverables & Instructions:
Generate the complete and runnable source code for the Sally project, ensuring all the above requirements are met. Your final output must include:
Full Directory Structure: A logical folder structure for both the FastAPI backend (sally-backend/) and the React frontend (saly-frontend/).
Complete Source Code: All necessary Python (.py) and React (.js/.jsx or .ts/.tsx) files.
Dependency Files: A requirements.txt file for the backend and a package.json file for the frontend.
Configuration and Setup: A root-level README.md file that provides clear, step-by-step instructions on how to set up the project, including:
Environment variables needed. Crucially, the database connection string must be: DATABASE_URL="mongodb://localhost:27017/SallyChatBot".
Commands to install dependencies for both backend and frontend.
Commands to run the development servers (uvicorn for the backend, npm start for the frontend).
Apply All Changes: Ensure the code reflects the detailed RBAC system and the comprehensive API endpoint design as described.
Now, based on all the information provided, generate the project code. - Initial Deployment

Files changed (5) hide show
  1. README.md +7 -5
  2. index.html +417 -18
  3. login.html +124 -0
  4. prompts.txt +72 -0
  5. register.html +137 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Sally
3
- emoji: 🦀
4
- colorFrom: gray
5
- colorTo: red
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: sally
3
+ emoji: 🐳
4
+ colorFrom: red
5
+ colorTo: blue
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,418 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </html>
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Sally - AI Customer Support</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://unpkg.com/feather-icons"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
11
+ <script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
12
+ <script src="https://cdn.jsdelivr.net/npm/animejs/lib/anime.iife.min.js"></script>
13
+ <style>
14
+ .gradient-bg {
15
+ background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
16
+ }
17
+ .chat-bubble {
18
+ border-radius: 20px 20px 20px 0;
19
+ }
20
+ .chat-bubble.user {
21
+ border-radius: 20px 20px 0 20px;
22
+ }
23
+ .feature-card:hover {
24
+ transform: translateY(-5px);
25
+ box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
26
+ }
27
+ </style>
28
+ </head>
29
+ <body class="font-sans antialiased text-gray-800">
30
+ <!-- Navigation -->
31
+ <nav class="bg-white shadow-sm fixed w-full z-10">
32
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
33
+ <div class="flex justify-between h-16">
34
+ <div class="flex items-center">
35
+ <div class="flex-shrink-0 flex items-center">
36
+ <i data-feather="message-circle" class="text-purple-600 h-8 w-8"></i>
37
+ <span class="ml-2 text-xl font-bold text-gray-900">Sally</span>
38
+ </div>
39
+ </div>
40
+ <div class="hidden sm:ml-6 sm:flex sm:items-center space-x-8">
41
+ <a href="#" class="text-gray-900 inline-flex items-center px-1 pt-1 border-b-2 border-purple-500 text-sm font-medium">Home</a>
42
+ <a href="#features" class="text-gray-500 hover:text-gray-700 inline-flex items-center px-1 pt-1 text-sm font-medium">Features</a>
43
+ <a href="#how-it-works" class="text-gray-500 hover:text-gray-700 inline-flex items-center px-1 pt-1 text-sm font-medium">How it works</a>
44
+ <a href="/login.html" class="text-gray-500 hover:text-gray-700 inline-flex items-center px-1 pt-1 text-sm font-medium">Login</a>
45
+ </div>
46
+ <div class="-mr-2 flex items-center sm:hidden">
47
+ <button type="button" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-purple-500" aria-controls="mobile-menu" aria-expanded="false">
48
+ <i data-feather="menu"></i>
49
+ </button>
50
+ </div>
51
+ </div>
52
+ </div>
53
+
54
+ <!-- Mobile menu -->
55
+ <div class="sm:hidden hidden" id="mobile-menu">
56
+ <div class="pt-2 pb-3 space-y-1">
57
+ <a href="#" class="bg-purple-50 border-purple-500 text-purple-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Home</a>
58
+ <a href="#features" class="border-transparent text-gray-600 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-800 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Features</a>
59
+ <a href="#how-it-works" class="border-transparent text-gray-600 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-800 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">How it works</a>
60
+ <a href="/login.html" class="border-transparent text-gray-600 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-800 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Login</a>
61
+ </div>
62
+ </div>
63
+ </nav>
64
+
65
+ <!-- Hero Section -->
66
+ <div class="gradient-bg pt-24 pb-32">
67
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
68
+ <div class="lg:grid lg:grid-cols-12 lg:gap-8">
69
+ <div class="sm:text-center md:max-w-2xl md:mx-auto lg:col-span-6 lg:text-left">
70
+ <h1 class="text-4xl tracking-tight font-extrabold text-white sm:text-5xl md:text-6xl">
71
+ <span class="block">AI-Powered</span>
72
+ <span class="block text-purple-200">Customer Support</span>
73
+ </h1>
74
+ <p class="mt-3 text-base text-purple-100 sm:mt-5 sm:text-lg sm:max-w-xl sm:mx-auto md:mt-5 md:text-xl lg:mx-0">
75
+ Sally provides instant, accurate, and personalized responses to your customers 24/7, reducing support workload while improving customer satisfaction.
76
+ </p>
77
+ <div class="mt-8 sm:max-w-lg sm:mx-auto sm:text-center lg:text-left lg:mx-0">
78
+ <div class="mt-5 sm:mt-8 sm:flex sm:justify-center lg:justify-start">
79
+ <div class="rounded-md shadow">
80
+ <a href="/login.html" class="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-purple-600 bg-white hover:bg-gray-50 md:py-4 md:text-lg md:px-10">
81
+ Get Started
82
+ </a>
83
+ </div>
84
+ <div class="mt-3 sm:mt-0 sm:ml-3">
85
+ <a href="#demo" class="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-purple-500 bg-opacity-60 hover:bg-opacity-70 md:py-4 md:text-lg md:px-10">
86
+ Live Demo
87
+ </a>
88
+ </div>
89
+ </div>
90
+ </div>
91
+ </div>
92
+ <div class="mt-12 relative sm:max-w-lg sm:mx-auto lg:mt-0 lg:max-w-none lg:mx-0 lg:col-span-6 lg:flex lg:items-center">
93
+ <div class="relative mx-auto w-full rounded-lg shadow-lg lg:max-w-md">
94
+ <div class="bg-white rounded-lg shadow-xl overflow-hidden">
95
+ <div class="bg-gray-800 px-4 py-3 flex items-center">
96
+ <div class="flex space-x-2">
97
+ <div class="w-3 h-3 rounded-full bg-red-500"></div>
98
+ <div class="w-3 h-3 rounded-full bg-yellow-500"></div>
99
+ <div class="w-3 h-3 rounded-full bg-green-500"></div>
100
+ </div>
101
+ <div class="ml-4 text-sm text-white font-medium">Chat with Sally</div>
102
+ </div>
103
+ <div class="p-4 h-64 overflow-y-auto">
104
+ <div class="flex mb-4">
105
+ <div class="bg-gray-100 chat-bubble p-3 max-w-xs">
106
+ <p class="text-sm">Hi there! I'm Sally, your AI support assistant. How can I help you today?</p>
107
+ </div>
108
+ </div>
109
+ <div class="flex mb-4 justify-end">
110
+ <div class="bg-purple-500 text-white chat-bubble user p-3 max-w-xs">
111
+ <p class="text-sm">How do I reset my password?</p>
112
+ </div>
113
+ </div>
114
+ <div class="flex mb-4">
115
+ <div class="bg-gray-100 chat-bubble p-3 max-w-xs">
116
+ <p class="text-sm">You can reset your password by going to the login page and clicking "Forgot Password". I can send you a direct link if you'd like?</p>
117
+ </div>
118
+ </div>
119
+ </div>
120
+ <div class="border-t border-gray-200 p-4">
121
+ <div class="flex">
122
+ <input type="text" placeholder="Type your message..." class="flex-1 border border-gray-300 rounded-l-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent">
123
+ <button class="bg-purple-500 text-white px-4 py-2 rounded-r-lg hover:bg-purple-600 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-offset-2">
124
+ <i data-feather="send" class="h-5 w-5"></i>
125
+ </button>
126
+ </div>
127
+ </div>
128
+ </div>
129
+ </div>
130
+ </div>
131
+ </div>
132
+ </div>
133
+ </div>
134
+
135
+ <!-- Features Section -->
136
+ <div id="features" class="py-16 bg-white">
137
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
138
+ <div class="lg:text-center">
139
+ <h2 class="text-base text-purple-600 font-semibold tracking-wide uppercase">Features</h2>
140
+ <p class="mt-2 text-3xl leading-8 font-extrabold tracking-tight text-gray-900 sm:text-4xl">
141
+ A better way to handle customer support
142
+ </p>
143
+ <p class="mt-4 max-w-2xl text-xl text-gray-500 lg:mx-auto">
144
+ Sally combines AI intelligence with human expertise to deliver exceptional customer experiences.
145
+ </p>
146
+ </div>
147
+
148
+ <div class="mt-20">
149
+ <div class="space-y-10 md:space-y-0 md:grid md:grid-cols-2 md:gap-x-8 md:gap-y-10">
150
+ <!-- Feature 1 -->
151
+ <div class="feature-card relative bg-white p-6 rounded-lg shadow-md transition-all duration-300 ease-in-out">
152
+ <div class="absolute -top-6 left-6 bg-purple-500 rounded-lg p-3 text-white">
153
+ <i data-feather="message-square"></i>
154
+ </div>
155
+ <h3 class="mt-8 text-lg leading-6 font-medium text-gray-900">Intelligent Chat</h3>
156
+ <p class="mt-2 text-base text-gray-500">
157
+ Sally understands context and provides accurate responses from your knowledge base, reducing repetitive questions.
158
+ </p>
159
+ </div>
160
+
161
+ <!-- Feature 2 -->
162
+ <div class="feature-card relative bg-white p-6 rounded-lg shadow-md transition-all duration-300 ease-in-out">
163
+ <div class="absolute -top-6 left-6 bg-purple-500 rounded-lg p-3 text-white">
164
+ <i data-feather="users"></i>
165
+ </div>
166
+ <h3 class="mt-8 text-lg leading-6 font-medium text-gray-900">Role-Based Access</h3>
167
+ <p class="mt-2 text-base text-gray-500">
168
+ Granular permissions ensure the right people have the right access, from guests to super admins.
169
+ </p>
170
+ </div>
171
+
172
+ <!-- Feature 3 -->
173
+ <div class="feature-card relative bg-white p-6 rounded-lg shadow-md transition-all duration-300 ease-in-out">
174
+ <div class="absolute -top-6 left-6 bg-purple-500 rounded-lg p-3 text-white">
175
+ <i data-feather="book"></i>
176
+ </div>
177
+ <h3 class="mt-8 text-lg leading-6 font-medium text-gray-900">Knowledge Management</h3>
178
+ <p class="mt-2 text-base text-gray-500">
179
+ Comprehensive knowledge base with versioning, categories, and easy content updates.
180
+ </p>
181
+ </div>
182
+
183
+ <!-- Feature 4 -->
184
+ <div class="feature-card relative bg-white p-6 rounded-lg shadow-md transition-all duration-300 ease-in-out">
185
+ <div class="absolute -top-6 left-6 bg-purple-500 rounded-lg p-3 text-white">
186
+ <i data-feather="bar-chart-2"></i>
187
+ </div>
188
+ <h3 class="mt-8 text-lg leading-6 font-medium text-gray-900">Analytics & Reporting</h3>
189
+ <p class="mt-2 text-base text-gray-500">
190
+ Track unanswered questions, response times, and customer satisfaction to continuously improve.
191
+ </p>
192
+ </div>
193
+ </div>
194
+ </div>
195
+ </div>
196
+ </div>
197
+
198
+ <!-- How It Works Section -->
199
+ <div id="how-it-works" class="py-16 bg-gray-50">
200
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
201
+ <div class="lg:text-center">
202
+ <h2 class="text-base text-purple-600 font-semibold tracking-wide uppercase">How It Works</h2>
203
+ <p class="mt-2 text-3xl leading-8 font-extrabold tracking-tight text-gray-900 sm:text-4xl">
204
+ Simple yet powerful workflow
205
+ </p>
206
+ </div>
207
+
208
+ <div class="mt-16">
209
+ <div class="lg:grid lg:grid-cols-3 lg:gap-8">
210
+ <!-- Step 1 -->
211
+ <div class="mb-10 lg:mb-0" data-aos="fade-up">
212
+ <div class="flex items-center justify-center h-12 w-12 rounded-md bg-purple-500 text-white">
213
+ <span class="text-xl font-bold">1</span>
214
+ </div>
215
+ <div class="mt-5">
216
+ <h3 class="text-lg leading-6 font-medium text-gray-900">Customer Asks Question</h3>
217
+ <p class="mt-2 text-base text-gray-500">
218
+ Guests and customers interact with Sally through a simple chat interface, asking questions in natural language.
219
+ </p>
220
+ </div>
221
+ </div>
222
+
223
+ <!-- Step 2 -->
224
+ <div class="mb-10 lg:mb-0" data-aos="fade-up" data-aos-delay="100">
225
+ <div class="flex items-center justify-center h-12 w-12 rounded-md bg-purple-500 text-white">
226
+ <span class="text-xl font-bold">2</span>
227
+ </div>
228
+ <div class="mt-5">
229
+ <h3 class="text-lg leading-6 font-medium text-gray-900">Sally Analyzes Request</h3>
230
+ <p class="mt-2 text-base text-gray-500">
231
+ Our AI determines if the user is a guest or customer, checks permissions, and searches the appropriate knowledge base.
232
+ </p>
233
+ </div>
234
+ </div>
235
+
236
+ <!-- Step 3 -->
237
+ <div data-aos="fade-up" data-aos-delay="200">
238
+ <div class="flex items-center justify-center h-12 w-12 rounded-md bg-purple-500 text-white">
239
+ <span class="text-xl font-bold">3</span>
240
+ </div>
241
+ <div class="mt-5">
242
+ <h3 class="text-lg leading-6 font-medium text-gray-900">Personalized Response</h3>
243
+ <p class="mt-2 text-base text-gray-500">
244
+ Sally provides an accurate, context-aware response or escalates to human support if needed.
245
+ </p>
246
+ </div>
247
+ </div>
248
+ </div>
249
+ </div>
250
+ </div>
251
+ </div>
252
+
253
+ <!-- CTA Section -->
254
+ <div class="bg-white">
255
+ <div class="max-w-7xl mx-auto py-12 px-4 sm:px-6 lg:py-16 lg:px-8 lg:flex lg:items-center lg:justify-between">
256
+ <h2 class="text-3xl font-extrabold tracking-tight text-gray-900 sm:text-4xl">
257
+ <span class="block">Ready to transform your customer support?</span>
258
+ <span class="block text-purple-600">Start using Sally today.</span>
259
+ </h2>
260
+ <div class="mt-8 flex lg:mt-0 lg:flex-shrink-0">
261
+ <div class="inline-flex rounded-md shadow">
262
+ <a href="/register.html" class="inline-flex items-center justify-center px-5 py-3 border border-transparent text-base font-medium rounded-md text-white bg-purple-600 hover:bg-purple-700">
263
+ Get started
264
+ </a>
265
+ </div>
266
+ <div class="ml-3 inline-flex rounded-md shadow">
267
+ <a href="#demo" class="inline-flex items-center justify-center px-5 py-3 border border-transparent text-base font-medium rounded-md text-purple-600 bg-white hover:bg-gray-50">
268
+ Live demo
269
+ </a>
270
+ </div>
271
+ </div>
272
+ </div>
273
+ </div>
274
+
275
+ <!-- Footer -->
276
+ <footer class="bg-gray-800">
277
+ <div class="max-w-7xl mx-auto py-12 px-4 sm:px-6 lg:py-16 lg:px-8">
278
+ <div class="xl:grid xl:grid-cols-3 xl:gap-8">
279
+ <div class="space-y-8 xl:col-span-1">
280
+ <div class="flex items-center">
281
+ <i data-feather="message-circle" class="text-purple-400 h-8 w-8"></i>
282
+ <span class="ml-2 text-xl font-bold text-white">Sally</span>
283
+ </div>
284
+ <p class="text-gray-300 text-base">
285
+ The intelligent customer support platform that combines AI with human expertise to deliver exceptional customer experiences.
286
+ </p>
287
+ <div class="flex space-x-6">
288
+ <a href="#" class="text-gray-400 hover:text-gray-300">
289
+ <i data-feather="twitter"></i>
290
+ </a>
291
+ <a href="#" class="text-gray-400 hover:text-gray-300">
292
+ <i data-feather="facebook"></i>
293
+ </a>
294
+ <a href="#" class="text-gray-400 hover:text-gray-300">
295
+ <i data-feather="linkedin"></i>
296
+ </a>
297
+ <a href="#" class="text-gray-400 hover:text-gray-300">
298
+ <i data-feather="github"></i>
299
+ </a>
300
+ </div>
301
+ </div>
302
+ <div class="mt-12 grid grid-cols-2 gap-8 xl:mt-0 xl:col-span-2">
303
+ <div class="md:grid md:grid-cols-2 md:gap-8">
304
+ <div>
305
+ <h3 class="text-sm font-semibold text-gray-300 tracking-wider uppercase">
306
+ Solutions
307
+ </h3>
308
+ <ul class="mt-4 space-y-4">
309
+ <li>
310
+ <a href="#" class="text-base text-gray-400 hover:text-white">
311
+ Customer Support
312
+ </a>
313
+ </li>
314
+ <li>
315
+ <a href="#" class="text-base text-gray-400 hover:text-white">
316
+ Knowledge Management
317
+ </a>
318
+ </li>
319
+ <li>
320
+ <a href="#" class="text-base text-gray-400 hover:text-white">
321
+ Ticketing System
322
+ </a>
323
+ </li>
324
+ </ul>
325
+ </div>
326
+ <div class="mt-12 md:mt-0">
327
+ <h3 class="text-sm font-semibold text-gray-300 tracking-wider uppercase">
328
+ Support
329
+ </h3>
330
+ <ul class="mt-4 space-y-4">
331
+ <li>
332
+ <a href="#" class="text-base text-gray-400 hover:text-white">
333
+ Documentation
334
+ </a>
335
+ </li>
336
+ <li>
337
+ <a href="#" class="text-base text-gray-400 hover:text-white">
338
+ Guides
339
+ </a>
340
+ </li>
341
+ <li>
342
+ <a href="#" class="text-base text-gray-400 hover:text-white">
343
+ API Status
344
+ </a>
345
+ </li>
346
+ </ul>
347
+ </div>
348
+ </div>
349
+ <div class="md:grid md:grid-cols-2 md:gap-8">
350
+ <div>
351
+ <h3 class="text-sm font-semibold text-gray-300 tracking-wider uppercase">
352
+ Company
353
+ </h3>
354
+ <ul class="mt-4 space-y-4">
355
+ <li>
356
+ <a href="#" class="text-base text-gray-400 hover:text-white">
357
+ About
358
+ </a>
359
+ </li>
360
+ <li>
361
+ <a href="#" class="text-base text-gray-400 hover:text-white">
362
+ Blog
363
+ </a>
364
+ </li>
365
+ <li>
366
+ <a href="#" class="text-base text-gray-400 hover:text-white">
367
+ Careers
368
+ </a>
369
+ </li>
370
+ </ul>
371
+ </div>
372
+ <div class="mt-12 md:mt-0">
373
+ <h3 class="text-sm font-semibold text-gray-300 tracking-wider uppercase">
374
+ Legal
375
+ </h3>
376
+ <ul class="mt-4 space-y-4">
377
+ <li>
378
+ <a href="#" class="text-base text-gray-400 hover:text-white">
379
+ Privacy
380
+ </a>
381
+ </li>
382
+ <li>
383
+ <a href="#" class="text-base text-gray-400 hover:text-white">
384
+ Terms
385
+ </a>
386
+ </li>
387
+ </ul>
388
+ </div>
389
+ </div>
390
+ </div>
391
+ </div>
392
+ <div class="mt-12 border-t border-gray-700 pt-8">
393
+ <p class="text-base text-gray-400 text-center">
394
+ &copy; 2023 Sally AI. All rights reserved.
395
+ </p>
396
+ </div>
397
+ </div>
398
+ </footer>
399
+
400
+ <script>
401
+ // Mobile menu toggle
402
+ document.querySelector('button[aria-controls="mobile-menu"]').addEventListener('click', function() {
403
+ const menu = document.getElementById('mobile-menu');
404
+ menu.classList.toggle('hidden');
405
+ });
406
+
407
+ // Initialize animations
408
+ AOS.init({
409
+ duration: 800,
410
+ easing: 'ease-in-out',
411
+ once: true
412
+ });
413
+
414
+ // Feather icons
415
+ feather.replace();
416
+ </script>
417
+ </body>
418
  </html>
login.html ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Login - Sally</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://unpkg.com/feather-icons"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <style>
11
+ .gradient-bg {
12
+ background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
13
+ }
14
+ .login-card {
15
+ box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
16
+ }
17
+ </style>
18
+ </head>
19
+ <body class="font-sans antialiased gradient-bg min-h-screen flex items-center justify-center">
20
+ <div class="max-w-md w-full space-y-8 p-10 bg-white rounded-xl login-card">
21
+ <div class="text-center">
22
+ <div class="flex justify-center">
23
+ <i data-feather="message-circle" class="text-purple-600 h-10 w-10"></i>
24
+ </div>
25
+ <h2 class="mt-6 text-3xl font-extrabold text-gray-900">
26
+ Sign in to your account
27
+ </h2>
28
+ <p class="mt-2 text-sm text-gray-600">
29
+ Or <a href="/register.html" class="font-medium text-purple-600 hover:text-purple-500">create a new account</a>
30
+ </p>
31
+ </div>
32
+ <form class="mt-8 space-y-6" action="#" method="POST">
33
+ <input type="hidden" name="remember" value="true">
34
+ <div class="rounded-md shadow-sm space-y-4">
35
+ <div>
36
+ <label for="email-address" class="sr-only">Email address</label>
37
+ <div class="relative">
38
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
39
+ <i data-feather="mail" class="h-5 w-5 text-gray-400"></i>
40
+ </div>
41
+ <input id="email-address" name="email" type="email" autocomplete="email" required class="appearance-none block w-full pl-10 pr-3 py-3 border border-gray-300 rounded-md placeholder-gray-500 focus:outline-none focus:ring-purple-500 focus:border-purple-500 focus:z-10 sm:text-sm" placeholder="Email address">
42
+ </div>
43
+ </div>
44
+ <div>
45
+ <label for="password" class="sr-only">Password</label>
46
+ <div class="relative">
47
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
48
+ <i data-feather="lock" class="h-5 w-5 text-gray-400"></i>
49
+ </div>
50
+ <input id="password" name="password" type="password" autocomplete="current-password" required class="appearance-none block w-full pl-10 pr-3 py-3 border border-gray-300 rounded-md placeholder-gray-500 focus:outline-none focus:ring-purple-500 focus:border-purple-500 focus:z-10 sm:text-sm" placeholder="Password">
51
+ <div class="absolute inset-y-0 right-0 pr-3 flex items-center cursor-pointer" onclick="togglePassword()">
52
+ <i data-feather="eye" class="h-5 w-5 text-gray-400" id="toggle-icon"></i>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ </div>
57
+
58
+ <div class="flex items-center justify-between">
59
+ <div class="flex items-center">
60
+ <input id="remember-me" name="remember-me" type="checkbox" class="h-4 w-4 text-purple-600 focus:ring-purple-500 border-gray-300 rounded">
61
+ <label for="remember-me" class="ml-2 block text-sm text-gray-900">
62
+ Remember me
63
+ </label>
64
+ </div>
65
+
66
+ <div class="text-sm">
67
+ <a href="/forgot-password.html" class="font-medium text-purple-600 hover:text-purple-500">
68
+ Forgot your password?
69
+ </a>
70
+ </div>
71
+ </div>
72
+
73
+ <div>
74
+ <button type="submit" class="group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-purple-600 hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500">
75
+ <span class="absolute left-0 inset-y-0 flex items-center pl-3">
76
+ <i data-feather="log-in" class="h-5 w-5 text-purple-300 group-hover:text-purple-200"></i>
77
+ </span>
78
+ Sign in
79
+ </button>
80
+ </div>
81
+
82
+ <div class="relative mt-6">
83
+ <div class="absolute inset-0 flex items-center">
84
+ <div class="w-full border-t border-gray-300"></div>
85
+ </div>
86
+ <div class="relative flex justify-center text-sm">
87
+ <span class="px-2 bg-white text-gray-500">
88
+ Or continue with
89
+ </span>
90
+ </div>
91
+ </div>
92
+
93
+ <div class="grid grid-cols-2 gap-3 mt-6">
94
+ <button type="button" class="w-full inline-flex justify-center py-2 px-4 border border-gray-300 rounded-md shadow-sm bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
95
+ <i data-feather="github" class="h-5 w-5"></i>
96
+ <span class="ml-2">GitHub</span>
97
+ </button>
98
+ <button type="button" class="w-full inline-flex justify-center py-2 px-4 border border-gray-300 rounded-md shadow-sm bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
99
+ <i data-feather="google" class="h-5 w-5"></i>
100
+ <span class="ml-2">Google</span>
101
+ </button>
102
+ </div>
103
+ </form>
104
+ </div>
105
+
106
+ <script>
107
+ function togglePassword() {
108
+ const passwordInput = document.getElementById('password');
109
+ const toggleIcon = document.getElementById('toggle-icon');
110
+
111
+ if (passwordInput.type === 'password') {
112
+ passwordInput.type = 'text';
113
+ toggleIcon.setAttribute('data-feather', 'eye-off');
114
+ } else {
115
+ passwordInput.type = 'password';
116
+ toggleIcon.setAttribute('data-feather', 'eye');
117
+ }
118
+ feather.replace();
119
+ }
120
+
121
+ feather.replace();
122
+ </script>
123
+ </body>
124
+ </html>
prompts.txt ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Project Generation Prompt: Sally - Intelligent Customer Support Platform
2
+ 1. Role and Objective:
3
+ You are an expert full-stack software architect and senior developer. Your task is to generate the complete, well-structured, and production-ready source code for a project named "Sally", an advanced AI-powered customer support platform, based on the comprehensive documentation and specific technical requirements provided below.
4
+ 2. Core Project Documentation:
5
+ First, thoroughly analyze the following project description to understand the vision, entities, features, and core logic.
6
+ Comprehensive Project Document: Sally Smart Assistant
7
+ 1. Overview and Vision
8
+ Sally is an advanced AI-based customer support platform designed to provide instant, accurate, and personalized responses to users. By intelligently differentiating between "Guest" and "Customer" users, it provides a unique experience for each group and significantly reduces the workload on the human support team. Sally is not just a simple Q&A bot but a complete ecosystem for knowledge management, customer interaction, and support ticket handling.
9
+ 2. Architecture and Key Concepts
10
+ The provided diagrams depict a modular, layered, and service-oriented architecture that forms the basis of the system's robustness and scalability. The core technical concepts are as follows:
11
+ Simple RAG (Retrieval-Augmented Generation) for Guest Users: This approach allows guest users to ask questions through a chat interface. The Sally system searches the public knowledge base (articles visible to everyone), finds relevant documents, and uses a language model to generate an accurate and relevant response.
12
+ Agentic RAG for Customers: For customers logged in with their accounts, Sally uses a more sophisticated and powerful approach. This system not all has access to the private knowledge base (including detailed guides for purchased products, troubleshooting methods, technical documentation, etc.) but can also better understand the context of the question by examining customer information (like the License and Product classes) to provide fully personalized answers. This "Agentic" nature allows Sally to follow multi-step processes to solve customer problems.
13
+ 3. Key System Entities (Based on Class Diagram)
14
+ User Entities: User, CustomerUser, AdminUser, GuestSession, Role, Permission.
15
+ Interaction Entities: Ticket, TicketReply, Conversation, Message, Feedback.
16
+ Knowledge Entities: KnowledgeBaseArticle, ArticleVersion, Category, Tag, UnansweredQuestion.
17
+ 4. Main System Features (Based on Use Case & Activity Diagrams)
18
+ Features for Guests: Live chat with the smart assistant (based on the public KB), search the knowledge base, and provide feedback.
19
+ Features for Customers: All guest features, plus advanced smart chat (Agentic RAG with private KB), a full ticketing system, and secure authentication.
20
+ Features for Admin Panel: Comprehensive knowledge base management (including uploading documents like PDF, TXT, Excel to auto-create articles), user and access management, monitoring interactions (live chats and tickets), reporting and analytics, and reviewing unanswered questions.
21
+ 3. Critical Technical & Architectural Requirements:
22
+ You must adhere strictly to the following specifications. These requirements build upon and refine the core documentation.
23
+ A. Technology Stack:
24
+ Backend: FastAPI (Python)
25
+ Database: MongoDB
26
+ Frontend: React (JavaScript/TypeScript)
27
+ B. Backend Architecture (Clean Architecture):
28
+ Implement a strict Clean Architecture for the FastAPI backend with the following layers:
29
+ Presentation/API Layer: Contains FastAPI routers and API endpoint definitions. Handles HTTP requests and responses.
30
+ Application/Use Case Layer: Contains the core business logic and orchestrates the flow of data between the domain and infrastructure layers.
31
+ Domain Layer: Contains the core data structures and business entities (e.g., Pydantic models for User, Ticket, KnowledgeBaseArticle).
32
+ Infrastructure Layer: Contains all external-facing components, including database connectors (e.g., using motor or beanie for async MongoDB access), and interfaces for external services.
33
+ C. Frontend Architecture (Layered Architecture):
34
+ Structure the React frontend with a clear separation of concerns:
35
+ Components/UI Layer: Reusable and presentational components.
36
+ State Management Layer: Use React Context API or a library like Redux/Zustand to manage global state (e.g., user authentication, conversation history).
37
+ Services/API Layer: A dedicated layer for making API calls to the FastAPI backend (e.g., using Axios).
38
+ D. Role-Based Access Control (RBAC) - VERY IMPORTANT:
39
+ The system must implement a precise, multi-level access control system for administrators. This is a critical new requirement.
40
+ Two Admin Roles: Admin and Super Admin.
41
+ Admin Permissions:
42
+ Can perform all daily support tasks: view and reply to tickets, monitor live chats.
43
+ Can create new knowledge base articles and edit existing ones, but they are saved as drafts.
44
+ CANNOT publish articles, delete core data, or manage other users.
45
+ Super Admin Permissions:
46
+ Has all permissions of an Admin.
47
+ Exclusive Power:
48
+ Publishing: Can review draft articles created by Admins and approve/publish them to the knowledge base.
49
+ Hard Deletes: Is the only role that can permanently delete items from the database, such as KnowledgeBaseArticles or CustomerUsers.
50
+ User Management: Is the only role that can add, edit, or remove other Admin or Super Admin users.
51
+ Activity Log: Has exclusive access to a (to-be-coded) ActivityLog module that tracks all major actions within the system (e.g., "Admin X published article Y").
52
+ E. UI/UX & Static Assets:
53
+ The overall UI design must be minimalist, modern, and user-friendly.
54
+ For specific components like the Login Form, you must use images that will be located in the frontend directory at sally-frontend/src/assets/images/. Generate the code to reference these images accordingly.
55
+ F. Comprehensive API Endpoint Design:
56
+ Implement a complete and correct set of RESTful API endpoints for all functionalities. The structure should be logical and resource-oriented. This includes, but is not limited to:
57
+ Authentication: Endpoints for user registration (/auth/register), login (/auth/login), and retrieving the current user's data (/auth/me).
58
+ Chat Interaction: WebSocket or HTTP endpoints for handling conversations for both guests and authenticated customers.
59
+ Ticketing System (Customer-facing): Endpoints for creating, listing, viewing details of, and replying to tickets (e.g., POST /tickets, GET /tickets, GET /tickets/{ticket_id}, POST /tickets/{ticket_id}/replies).
60
+ Knowledge Base Management (Admin-facing): CRUD endpoints for articles, categories, and tags (e.g., GET /admin/kb/articles, POST /admin/kb/articles, PUT /admin/kb/articles/{article_id}). Include a special endpoint for publishing (POST /admin/kb/articles/{article_id}/publish accessible only by Super Admins) and another for document uploads (POST /admin/kb/upload).
61
+ User Management (Super Admin-facing): CRUD endpoints for managing admin users (e.g., GET /admin/users, POST /admin/users, DELETE /admin/users/{user_id}).
62
+ 4. Final Deliverables & Instructions:
63
+ Generate the complete and runnable source code for the Sally project, ensuring all the above requirements are met. Your final output must include:
64
+ Full Directory Structure: A logical folder structure for both the FastAPI backend (sally-backend/) and the React frontend (saly-frontend/).
65
+ Complete Source Code: All necessary Python (.py) and React (.js/.jsx or .ts/.tsx) files.
66
+ Dependency Files: A requirements.txt file for the backend and a package.json file for the frontend.
67
+ Configuration and Setup: A root-level README.md file that provides clear, step-by-step instructions on how to set up the project, including:
68
+ Environment variables needed. Crucially, the database connection string must be: DATABASE_URL="mongodb://localhost:27017/SallyChatBot".
69
+ Commands to install dependencies for both backend and frontend.
70
+ Commands to run the development servers (uvicorn for the backend, npm start for the frontend).
71
+ Apply All Changes: Ensure the code reflects the detailed RBAC system and the comprehensive API endpoint design as described.
72
+ Now, based on all the information provided, generate the project code.
register.html ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Register - Sally</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://unpkg.com/feather-icons"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <style>
11
+ .gradient-bg {
12
+ background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
13
+ }
14
+ .register-card {
15
+ box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
16
+ }
17
+ </style>
18
+ </head>
19
+ <body class="font-sans antialiased gradient-bg min-h-screen flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8">
20
+ <div class="max-w-md w-full space-y-8 p-10 bg-white rounded-xl register-card">
21
+ <div class="text-center">
22
+ <div class="flex justify-center">
23
+ <i data-feather="message-circle" class="text-purple-600 h-10 w-10"></i>
24
+ </div>
25
+ <h2 class="mt-6 text-3xl font-extrabold text-gray-900">
26
+ Create a new account
27
+ </h2>
28
+ <p class="mt-2 text-sm text-gray-600">
29
+ Or <a href="/login.html" class="font-medium text-purple-600 hover:text-purple-500">sign in to your existing account</a>
30
+ </p>
31
+ </div>
32
+ <form class="mt-8 space-y-6" action="#" method="POST">
33
+ <div class="rounded-md shadow-sm space-y-4">
34
+ <div>
35
+ <label for="full-name" class="sr-only">Full name</label>
36
+ <div class="relative">
37
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
38
+ <i data-feather="user" class="h-5 w-5 text-gray-400"></i>
39
+ </div>
40
+ <input id="full-name" name="name" type="text" autocomplete="name" required class="appearance-none block w-full pl-10 pr-3 py-3 border border-gray-300 rounded-md placeholder-gray-500 focus:outline-none focus:ring-purple-500 focus:border-purple-500 focus:z-10 sm:text-sm" placeholder="Full name">
41
+ </div>
42
+ </div>
43
+ <div>
44
+ <label for="email-address" class="sr-only">Email address</label>
45
+ <div class="relative">
46
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
47
+ <i data-feather="mail" class="h-5 w-5 text-gray-400"></i>
48
+ </div>
49
+ <input id="email-address" name="email" type="email" autocomplete="email" required class="appearance-none block w-full pl-10 pr-3 py-3 border border-gray-300 rounded-md placeholder-gray-500 focus:outline-none focus:ring-purple-500 focus:border-purple-500 focus:z-10 sm:text-sm" placeholder="Email address">
50
+ </div>
51
+ </div>
52
+ <div>
53
+ <label for="password" class="sr-only">Password</label>
54
+ <div class="relative">
55
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
56
+ <i data-feather="lock" class="h-5 w-5 text-gray-400"></i>
57
+ </div>
58
+ <input id="password" name="password" type="password" autocomplete="new-password" required class="appearance-none block w-full pl-10 pr-3 py-3 border border-gray-300 rounded-md placeholder-gray-500 focus:outline-none focus:ring-purple-500 focus:border-purple-500 focus:z-10 sm:text-sm" placeholder="Password">
59
+ <div class="absolute inset-y-0 right-0 pr-3 flex items-center cursor-pointer" onclick="togglePassword('password')">
60
+ <i data-feather="eye" class="h-5 w-5 text-gray-400" id="toggle-icon-password"></i>
61
+ </div>
62
+ </div>
63
+ <p class="mt-1 text-xs text-gray-500">Must be at least 8 characters long</p>
64
+ </div>
65
+ <div>
66
+ <label for="confirm-password" class="sr-only">Confirm Password</label>
67
+ <div class="relative">
68
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
69
+ <i data-feather="lock" class="h-5 w-5 text-gray-400"></i>
70
+ </div>
71
+ <input id="confirm-password" name="confirm-password" type="password" autocomplete="new-password" required class="appearance-none block w-full pl-10 pr-3 py-3 border border-gray-300 rounded-md placeholder-gray-500 focus:outline-none focus:ring-purple-500 focus:border-purple-500 focus:z-10 sm:text-sm" placeholder="Confirm Password">
72
+ <div class="absolute inset-y-0 right-0 pr-3 flex items-center cursor-pointer" onclick="togglePassword('confirm-password')">
73
+ <i data-feather="eye" class="h-5 w-5 text-gray-400" id="toggle-icon-confirm"></i>
74
+ </div>
75
+ </div>
76
+ </div>
77
+ </div>
78
+
79
+ <div class="flex items-center">
80
+ <input id="terms" name="terms" type="checkbox" class="h-4 w-4 text-purple-600 focus:ring-purple-500 border-gray-300 rounded" required>
81
+ <label for="terms" class="ml-2 block text-sm text-gray-900">
82
+ I agree to the <a href="#" class="font-medium text-purple-600 hover:text-purple-500">Terms of Service</a> and <a href="#" class="font-medium text-purple-600 hover:text-purple-500">Privacy Policy</a>
83
+ </label>
84
+ </div>
85
+
86
+ <div>
87
+ <button type="submit" class="group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-purple-600 hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500">
88
+ <span class="absolute left-0 inset-y-0 flex items-center pl-3">
89
+ <i data-feather="user-plus" class="h-5 w-5 text-purple-300 group-hover:text-purple-200"></i>
90
+ </span>
91
+ Create account
92
+ </button>
93
+ </div>
94
+
95
+ <div class="relative mt-6">
96
+ <div class="absolute inset-0 flex items-center">
97
+ <div class="w-full border-t border-gray-300"></div>
98
+ </div>
99
+ <div class="relative flex justify-center text-sm">
100
+ <span class="px-2 bg-white text-gray-500">
101
+ Or sign up with
102
+ </span>
103
+ </div>
104
+ </div>
105
+
106
+ <div class="grid grid-cols-2 gap-3 mt-6">
107
+ <button type="button" class="w-full inline-flex justify-center py-2 px-4 border border-gray-300 rounded-md shadow-sm bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
108
+ <i data-feather="github" class="h-5 w-5"></i>
109
+ <span class="ml-2">GitHub</span>
110
+ </button>
111
+ <button type="button" class="w-full inline-flex justify-center py-2 px-4 border border-gray-300 rounded-md shadow-sm bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
112
+ <i data-feather="google" class="h-5 w-5"></i>
113
+ <span class="ml-2">Google</span>
114
+ </button>
115
+ </div>
116
+ </form>
117
+ </div>
118
+
119
+ <script>
120
+ function togglePassword(id) {
121
+ const input = document.getElementById(id);
122
+ const toggleIcon = document.getElementById(`toggle-icon-${id}`);
123
+
124
+ if (input.type === 'password') {
125
+ input.type = 'text';
126
+ toggleIcon.setAttribute('data-feather', 'eye-off');
127
+ } else {
128
+ input.type = 'password';
129
+ toggleIcon.setAttribute('data-feather', 'eye');
130
+ }
131
+ feather.replace();
132
+ }
133
+
134
+ feather.replace();
135
+ </script>
136
+ </body>
137
+ </html>