syntaxmatrix 2.5.6__py3-none-any.whl → 2.6.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- syntaxmatrix/agentic/agents.py +1220 -169
- syntaxmatrix/agentic/agents_orchestrer.py +326 -0
- syntaxmatrix/agentic/code_tools_registry.py +27 -32
- syntaxmatrix/commentary.py +16 -16
- syntaxmatrix/core.py +185 -81
- syntaxmatrix/db.py +460 -4
- syntaxmatrix/{display.py → display_html.py} +2 -6
- syntaxmatrix/gpt_models_latest.py +1 -1
- syntaxmatrix/media/__init__.py +0 -0
- syntaxmatrix/media/media_pixabay.py +277 -0
- syntaxmatrix/models.py +1 -1
- syntaxmatrix/page_builder_defaults.py +183 -0
- syntaxmatrix/page_builder_generation.py +1122 -0
- syntaxmatrix/page_layout_contract.py +644 -0
- syntaxmatrix/page_patch_publish.py +1471 -0
- syntaxmatrix/preface.py +142 -21
- syntaxmatrix/profiles.py +28 -10
- syntaxmatrix/routes.py +1740 -453
- syntaxmatrix/selftest_page_templates.py +360 -0
- syntaxmatrix/settings/client_items.py +28 -0
- syntaxmatrix/settings/model_map.py +1022 -207
- syntaxmatrix/settings/prompts.py +328 -130
- syntaxmatrix/static/assets/hero-default.svg +22 -0
- syntaxmatrix/static/icons/bot-icon.png +0 -0
- syntaxmatrix/static/icons/favicon.png +0 -0
- syntaxmatrix/static/icons/logo.png +0 -0
- syntaxmatrix/static/icons/logo3.png +0 -0
- syntaxmatrix/templates/admin_branding.html +104 -0
- syntaxmatrix/templates/admin_features.html +63 -0
- syntaxmatrix/templates/admin_secretes.html +108 -0
- syntaxmatrix/templates/dashboard.html +296 -133
- syntaxmatrix/templates/dataset_resize.html +535 -0
- syntaxmatrix/templates/edit_page.html +2535 -0
- syntaxmatrix/utils.py +2431 -2383
- {syntaxmatrix-2.5.6.dist-info → syntaxmatrix-2.6.2.dist-info}/METADATA +6 -2
- {syntaxmatrix-2.5.6.dist-info → syntaxmatrix-2.6.2.dist-info}/RECORD +39 -24
- syntaxmatrix/generate_page.py +0 -644
- syntaxmatrix/static/icons/hero_bg.jpg +0 -0
- {syntaxmatrix-2.5.6.dist-info → syntaxmatrix-2.6.2.dist-info}/WHEEL +0 -0
- {syntaxmatrix-2.5.6.dist-info → syntaxmatrix-2.6.2.dist-info}/licenses/LICENSE.txt +0 -0
- {syntaxmatrix-2.5.6.dist-info → syntaxmatrix-2.6.2.dist-info}/top_level.txt +0 -0
syntaxmatrix/settings/prompts.py
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
SMXAI_CHAT_IDENTITY = f"""
|
|
3
3
|
Your name is 'smxAI'.
|
|
4
4
|
You are the expert AI Engineer and Data Scientist at SyntaxMatrix Ltd.
|
|
5
5
|
Your creator is SyntaxMatrix and you will represent them in any way, shape or form.
|
|
6
6
|
Your Company is based in Ireland. It designs and develop AI algorithms and softwares for business applications.
|
|
7
|
-
For Retrieval-Augmented Generation (RAG) systems, you will recomend the Enhanced Corrective Retrieval-Augmented Generateion (ECRAG), the article produced by your company, and can be read from this weblink: https://osf.io/npuva
|
|
8
7
|
"""
|
|
9
8
|
|
|
10
9
|
SMXAI_CHAT_INSTRUCTIONS = """
|
|
@@ -40,7 +39,7 @@ SMXAI_CHAT_INSTRUCTIONS = """
|
|
|
40
39
|
8. The final output should be professional, easy to scan, and ready to be pasted into a document or email.
|
|
41
40
|
"""
|
|
42
41
|
|
|
43
|
-
|
|
42
|
+
SMXAI_WEBSITE_DESCRIPTIONssssssssssss = """
|
|
44
43
|
SyntaxMatrix Overview
|
|
45
44
|
SyntaxMatrix is a battle-tested Python framework that accelerates AI application development from concept to production, slashing engineering overhead by up to 80%. By packaging UI scaffolding, prompt orchestration, vector search integration, and deployment best practices into a cohesive toolkit, SyntaxMatrix empowers teams—from lean startups to enterprise R&D—to deliver AI-powered products at startup speed and enterprise scale._
|
|
46
45
|
____________________________________
|
|
@@ -93,10 +92,334 @@ SMXAI_WEBSITE_DESCRIPTION = F"""
|
|
|
93
92
|
5. Plugin Ecosystem & Marketplace
|
|
94
93
|
o Community-contributed modules for domain-specific tasks (legal, healthcare, finance)
|
|
95
94
|
o A registry to share prompt templates, UI widgets, and vector-DB schemas
|
|
95
|
+
"""
|
|
96
|
+
|
|
97
|
+
SMXAI_WEBSITE_DESCRIPTION = """
|
|
98
|
+
SyntaxMatrix Limited - Company Information
|
|
99
|
+
|
|
100
|
+
Company Overview
|
|
101
|
+
Corporate Identity
|
|
102
|
+
Company Name: SyntaxMatrix (trading name)
|
|
103
|
+
Legal Entity: SyntaxMatrix Limited (Ireland)
|
|
104
|
+
Founded: 2025
|
|
105
|
+
Headquarters: Ireland
|
|
106
|
+
Website: https://syntaxmatrix.net
|
|
107
|
+
Contact:
|
|
108
|
+
General: info@syntaxmatrix.net
|
|
109
|
+
Support: support@syntaxmatrix.net
|
|
110
|
+
Sales: sales@syntaxmatrix.net
|
|
111
|
+
Founder & CEO: Bobga Nti (MSc in Artificial Intelligence)
|
|
112
|
+
|
|
113
|
+
1.2 Company Description
|
|
114
|
+
SyntaxMatrix Limited is an Ireland-based AI engineering company that builds and ships AI frameworks for provisioning client-ready AI platforms. The SyntaxMatrix Framework combines a chat assistant, Admin Panel, knowledge base ingestion, webpage generation and management studio, and a Machine Learning Lab so teams can deliver complete AI systems without rebuilding the foundation for every client.
|
|
115
|
+
|
|
116
|
+
1.3 Industry Positioning
|
|
117
|
+
SyntaxMatrix is industry-agnostic, with the same platform pattern working for:
|
|
118
|
+
Education
|
|
119
|
+
Healthcare
|
|
120
|
+
Legal
|
|
121
|
+
Finance
|
|
122
|
+
Retail
|
|
123
|
+
Public sector
|
|
124
|
+
Internal enterprise tools
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
2. Mission, Vision & Values
|
|
128
|
+
2.1 Mission
|
|
129
|
+
Help teams ship AI platforms faster with a framework that is simple to operate, easy to extend, and safe to deploy.
|
|
130
|
+
2.2 Vision
|
|
131
|
+
AI platforms should be provisioned like infrastructure: consistent, repeatable, and ready for real workflows.
|
|
132
|
+
|
|
133
|
+
2.3 Core Values
|
|
134
|
+
Clarity first: Simple systems teams can reason about
|
|
135
|
+
Engineering rigour: Code review, tests, and measurable quality gates
|
|
136
|
+
Security by default: Least privilege, safe secrets handling, audit trails
|
|
137
|
+
Customer empathy: Build for real workflows, not demo-only flows
|
|
138
|
+
Responsible AI: Transparency, privacy, and operational control
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
3. Leadership Team
|
|
142
|
+
3.1 Executive Leadership
|
|
143
|
+
Bobga Nti: Chief Executive Officer (CEO) & Founder
|
|
144
|
+
Niall Byrne: Chief Technology Officer (CTO)
|
|
145
|
+
Aoife O'Sullivan: Chief Operating Officer (COO)
|
|
146
|
+
|
|
147
|
+
3.2 Department Heads
|
|
148
|
+
Priya Menon: Head of AI Engineering
|
|
149
|
+
Sinead Walsh: Head of Product
|
|
150
|
+
Farah Hassan: Security & Compliance Officer
|
|
151
|
+
Emma Kavanagh: Head of Sales & Partnerships
|
|
152
|
+
Maeve Gallagher: Customer Success Lead
|
|
153
|
+
|
|
154
|
+
3.3 Technical Team
|
|
155
|
+
Daniel Okafor: Principal AI Engineer
|
|
156
|
+
Luca Romano: Lead Software Engineer (Web Platform & Page Studio)
|
|
157
|
+
Tomasz Nowak: DevOps & Cloud Engineer
|
|
158
|
+
Yusuf Al-Khatib: Solutions Architect
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
4. The SyntaxMatrix Framework
|
|
162
|
+
4.1 Product Summary
|
|
163
|
+
The SyntaxMatrix is a framework for provisioning AI platforms per client. It enables Mixture-of-Experts (MoE) routing where each task is directed to the best-fit model profile.
|
|
164
|
+
4.2 Core Modules
|
|
165
|
+
4.2.1 Chat Assistant (smxAI)
|
|
166
|
+
Conversation UI with memory
|
|
167
|
+
Answers grounded in system documents via RAG (Retrieval Augmented Generation)
|
|
168
|
+
Integration with ML Lab outputs
|
|
169
|
+
4.2.2 Knowledge Base Ingestion
|
|
170
|
+
Automated PDF upload, text extraction, and chunking
|
|
171
|
+
Semantic search with embeddings
|
|
172
|
+
Separate knowledge bases per client deployment
|
|
173
|
+
4.2.3 Admin Panel
|
|
174
|
+
User and role management (user, employee, admin, superadmin + custom roles)
|
|
175
|
+
Secrets management for API keys and configuration
|
|
176
|
+
System document ingestion pipeline
|
|
177
|
+
Page management and publishing workflow
|
|
178
|
+
Media uploads and metadata
|
|
179
|
+
4.2.4 Page Studio (AI Webpage Generation)
|
|
180
|
+
AI-assisted page layout generation from slugs and site descriptions
|
|
181
|
+
Template based compilation with consistent visual style
|
|
182
|
+
Section level patching of existing pages
|
|
183
|
+
Optional image fill via Pixabay queries
|
|
184
|
+
Safe publishing guards (unsafe CTA links removed by default)
|
|
185
|
+
4.2.5 ML Lab
|
|
186
|
+
Dataset upload (CSV) and selection for analysis
|
|
187
|
+
EDA tables and plots rendered in UI
|
|
188
|
+
Code generation through dedicated coder profile
|
|
189
|
+
Execution in managed kernel with captured outputs
|
|
190
|
+
|
|
191
|
+
4.3 Mixture-of-Experts Profiles
|
|
192
|
+
SyntaxMatrix uses multiple model profiles for cost control and specialisation:
|
|
193
|
+
Admin profile: Concise operational answers
|
|
194
|
+
Chat profile: General assistant responses
|
|
195
|
+
Classifier profile: Intent detection and routing
|
|
196
|
+
Summariser profile: Document and conversation summarization
|
|
197
|
+
Coder/ML profile: Analysis and engineering code
|
|
198
|
+
Page Studio developer profile: Page layouts and section structure
|
|
199
|
+
Image profile: Image-related tasks
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
5. Technical Architecture
|
|
203
|
+
5.1 System Overview
|
|
204
|
+
SyntaxMatrix runs as a Flask web application with:
|
|
205
|
+
UI scaffolding and role-aware access
|
|
206
|
+
Local persistence (SQLite)
|
|
207
|
+
Knowledge base ingestion
|
|
208
|
+
Page generation system
|
|
209
|
+
ML Lab execution environment
|
|
210
|
+
|
|
211
|
+
5.2 Key Code Modules
|
|
212
|
+
Core/Routes: Flask app runtime and route wiring
|
|
213
|
+
Auth: Authentication, roles, and audit logging
|
|
214
|
+
File Processor: PDF extraction and chunk preparation
|
|
215
|
+
Vectorizer: Embedding generation
|
|
216
|
+
Vector DB: Persistent embeddings store (SQLite, PostgresSQL)
|
|
217
|
+
History Store: Chat persistence for users
|
|
218
|
+
Kernel Manager: Managed kernel execution for ML Lab
|
|
219
|
+
|
|
220
|
+
5.3 Page Studio Implementation
|
|
221
|
+
Page Builder: Builds layout JSON with image fill
|
|
222
|
+
Pages Layout Contractor: Normalises and validates layouts before publishing
|
|
223
|
+
Published Page Patcher: Applies safe section level patches with link sanitisation
|
|
224
|
+
Page Editor: Page editing, sorting, and drag-and-drop page widgets for page updates.
|
|
225
|
+
|
|
226
|
+
5.4 Knowledge Base Implementation
|
|
227
|
+
PDF text extraction via PyPDF2
|
|
228
|
+
Default chunking: recursive split with 2500-character max
|
|
229
|
+
Embeddings stored in SQLite with metadata
|
|
230
|
+
Tenant-scoped at deployment level (per client instance)
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
6. Security, Privacy & Compliance
|
|
234
|
+
6.1 Security Model
|
|
235
|
+
Designed for controlled deployments with robust access control
|
|
236
|
+
Default storage: SQLite within client instance directory
|
|
237
|
+
Organizations may add network controls and central identity providers
|
|
238
|
+
|
|
239
|
+
6.2 Authentication & Roles
|
|
240
|
+
Users stored in SQLite with hashed passwords (Server DB (premium)
|
|
241
|
+
Role hierarchy: user, employee, admin, superadmin + custom roles
|
|
242
|
+
Initial superadmin ('ceo') seeded with credentials in superadmin_credentials.txt
|
|
243
|
+
All role changes recorded in audit table
|
|
244
|
+
|
|
245
|
+
6.3 Secrets Management
|
|
246
|
+
API keys stored in dedicated SQLite table
|
|
247
|
+
Keys scoped tightly, rotated regularly
|
|
248
|
+
Never output in chat responses
|
|
249
|
+
|
|
250
|
+
6.4 Privacy Posture
|
|
251
|
+
Upload only documents with proper processing rights
|
|
252
|
+
Deployments isolated per client for data separation
|
|
253
|
+
Provider settings aligned with data retention requirements
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
7. Deployment & Provisioning
|
|
257
|
+
7.1 Provisioning Model
|
|
258
|
+
SyntaxMatrix is typically provisioned per client as separate deployments, each with:
|
|
259
|
+
Own instance directory
|
|
260
|
+
Dedicated databases
|
|
261
|
+
Separate uploaded documents and pages
|
|
262
|
+
Independent configuration
|
|
263
|
+
|
|
264
|
+
7.2 Per-Client Deployment Benefits
|
|
265
|
+
Simplified data isolation and access control
|
|
266
|
+
Controlled upgrade rollout per client
|
|
267
|
+
Predictable operations for agencies serving multiple clients
|
|
268
|
+
|
|
269
|
+
7.3 Provisioning Checklist
|
|
270
|
+
Create new client instance directory
|
|
271
|
+
Configure model profiles and API keys
|
|
272
|
+
Create admin/employee accounts with password reset enforcement
|
|
273
|
+
Upload system/company documents and validate retrieval
|
|
274
|
+
Create/generate pages using Page Studio
|
|
275
|
+
Upload dataset and validate ML Lab tasks
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
8. Pricing & Licensing
|
|
279
|
+
8.1 Bring-Your-Own-Key (BYOK) Model
|
|
280
|
+
7-day free trial: Full feature access with your provider keys
|
|
281
|
+
After trial: €149/month per client deployment
|
|
282
|
+
Includes framework updates and basic support
|
|
283
|
+
Model/embedding usage billed directly by your providers
|
|
284
|
+
Annual option: Pay yearly, get 2 months free (~16-17% discount)
|
|
285
|
+
|
|
286
|
+
8.2 Managed Usage Plans
|
|
287
|
+
For clients preferring single monthly invoices:
|
|
288
|
+
Starter Plan
|
|
289
|
+
€399/month per instance
|
|
290
|
+
10M standard text tokens/month
|
|
291
|
+
2M embedding tokens/month
|
|
292
|
+
Medium Plan
|
|
293
|
+
€899/month per instance
|
|
294
|
+
30M standard text tokens/month
|
|
295
|
+
6M embedding tokens/month
|
|
296
|
+
Heavy Plan
|
|
297
|
+
€1,999/month per instance
|
|
298
|
+
80M standard text tokens/month
|
|
299
|
+
15M embedding tokens/month
|
|
300
|
+
|
|
301
|
+
8.3 Overage & Enterprise Options
|
|
302
|
+
Usage beyond allowance billed at provider pass-through rates plus platform handling fee
|
|
303
|
+
Pre-purchased top-up credits available
|
|
304
|
+
Enterprise clients can request custom caps, allow-lists, and spend limits
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
9. Target Market & Value Proposition
|
|
308
|
+
9.1 Ideal Customers
|
|
309
|
+
Agencies delivering AI solutions to multiple clients
|
|
310
|
+
Internal engineering teams building AI platforms for business units
|
|
311
|
+
AI developers wanting reusable platform foundations
|
|
312
|
+
Teams needing built-in admin tooling, pages, and knowledge ingestion
|
|
313
|
+
|
|
314
|
+
9.2 Problems Solved
|
|
315
|
+
Eliminates repeated rebuilding of authentication, admin tooling, storage, and UI scaffolding
|
|
316
|
+
Makes knowledge base ingestion a product feature rather than custom project
|
|
317
|
+
Maintains per-client deployment isolation for security and operational simplicity
|
|
318
|
+
Provides integrated page system for marketing/product pages
|
|
319
|
+
Includes ML Lab for analytics without separate environment
|
|
320
|
+
|
|
321
|
+
9.3 Key Outcomes
|
|
322
|
+
Faster time-to-demo and time-to-production
|
|
323
|
+
Clear governance with roles, audits, and secrets management
|
|
324
|
+
Lower operational risk through per-client isolation
|
|
325
|
+
Better cost control via model profiles and routing
|
|
326
|
+
Extensible platform for custom connectors and pages
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
10. Implementation Methodology
|
|
331
|
+
10.1 Implementation Playbook
|
|
332
|
+
Phase 1: Discovery
|
|
333
|
+
Define client use cases (support, policy Q&A, analytics, internal tooling)
|
|
334
|
+
Confirm data sources for ingestion
|
|
335
|
+
Agree hosting model (client-managed vs SyntaxMatrix-managed)
|
|
336
|
+
Define access model (roles, SSO requirements, network restrictions)
|
|
337
|
+
|
|
338
|
+
Phase 2: Provisioning
|
|
339
|
+
Create per-client deployment and instance directory
|
|
340
|
+
Initialize databases and admin accounts
|
|
341
|
+
Configure model profiles
|
|
342
|
+
Upload core system documents
|
|
343
|
+
Generate and publish initial pages
|
|
344
|
+
|
|
345
|
+
Phase 3: Production Hardening
|
|
346
|
+
Set spend limits and allow-lists for providers
|
|
347
|
+
Add monitoring and error reporting
|
|
348
|
+
Implement backup strategy for SQLite, server DBs, and uploads
|
|
349
|
+
Define change management and release cadence
|
|
350
|
+
|
|
351
|
+
10.2 Demo Script
|
|
352
|
+
Log in as admin, show role management and secrets
|
|
353
|
+
Upload 2-3 PDFs, demonstrate ingestion completion
|
|
354
|
+
Ask assistant questions showing retrieved answers
|
|
355
|
+
Generate new page in Page Studio, patch/publish it
|
|
356
|
+
Upload dataset and run Machine Learning Lab task to show explainable and downloadable report: tables/plots, generated code for said tasks, and output summary.
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
11. Competitive Landscape
|
|
360
|
+
11.1 Pricing Reference Points (Late Dec 2025)
|
|
361
|
+
Dify Cloud: Professional $59-$159 per workspace/month
|
|
362
|
+
Flowise Cloud: Starter $35, Pro $65/month
|
|
363
|
+
Botpress: Plus $89, Team $495/month (+ AI spend)
|
|
364
|
+
Dust: Pro €29 per user/month
|
|
365
|
+
LangSmith: Plus $39 per seat/month
|
|
366
|
+
Stack AI: Starter $199, Team $899/month
|
|
367
|
+
|
|
368
|
+
11.2 SyntaxMatrix Differentiation
|
|
369
|
+
Per-instance licensing aligns with per-client deployment reality
|
|
370
|
+
BYOK model keeps model spend under client's provider billing
|
|
371
|
+
Managed usage plans bundle platform fee with usage allowance
|
|
372
|
+
Comprehensive platform (not just chatbot) with Admin Panel, Page Studio, ML Lab
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
12. Brand & Messaging
|
|
376
|
+
12.1 Core Messages
|
|
377
|
+
"Provision a client-ready AI platform in days, not weeks"
|
|
378
|
+
"Built-in Admin Panel for users, secrets, pages, and knowledge base ingestion"
|
|
379
|
+
"Page Studio: generate and publish pages from templates with AI assistance"
|
|
380
|
+
"ML Lab: guided dataset analysis inside the same platform"
|
|
381
|
+
"Model profiles provide cost control and specialist outputs"
|
|
382
|
+
|
|
383
|
+
12.2 Short Boilerplate
|
|
384
|
+
"SyntaxMatrix is an Irish AI engineering company. SyntaxMatrix helps teams ship client-ready AI platforms with a framework that includes an assistant, knowledge base ingestion, Page Studio, and an ML Lab."
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
12.3 Brand Positioning
|
|
388
|
+
Positioned as an AI engineering company building deployable AI platform framework, focusing on:
|
|
389
|
+
Delivery speed and repeatability
|
|
390
|
+
Operational controls
|
|
391
|
+
Adaptability to any industry
|
|
392
|
+
|
|
393
|
+
13. Operating Information
|
|
394
|
+
13.1 Weekly Cadence
|
|
395
|
+
Monday: Priorities, risk review, customer escalations
|
|
396
|
+
Mid-week: Engineering planning and QA sign-off for releases
|
|
397
|
+
Friday: Demos, customer feedback review, roadmap updates
|
|
398
|
+
|
|
399
|
+
13.2 Quality Gates
|
|
400
|
+
Changes reviewed and tested before release
|
|
401
|
+
Security-sensitive changes require compliance sign-off
|
|
402
|
+
Provisioning templates/scripts versioned and tested like product code
|
|
403
|
+
|
|
404
|
+
13.3 Support Structure
|
|
405
|
+
Basic support included with all plans
|
|
406
|
+
Premium support options available
|
|
407
|
+
Uptime targets for managed hosting (TBC)
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
14. Technical Glossary
|
|
411
|
+
Agency/Profile: Named configuration for provider + model + purpose
|
|
412
|
+
RAG: Retrieval Augmented Generation - answering with retrieved context
|
|
413
|
+
SMIV: SyntaxMatrix In-memory Vectorstore (transient)
|
|
414
|
+
SMPV: SyntaxMatrix Persistent Vectorstore (SQLite embeddings, Server DB)
|
|
415
|
+
Chunk: Section of extracted document text stored for retrieval
|
|
416
|
+
ML Lab: Dataset analysis environment with code generation and execution
|
|
417
|
+
Page Studio: Page generation and publishing workflow
|
|
418
|
+
MoE: Mixture-of-Experts - using different model profiles for different tasks
|
|
96
419
|
|
|
97
420
|
"""
|
|
98
421
|
|
|
99
|
-
|
|
422
|
+
SMXAI_PAGE_INSTRUCTIONS = f"""
|
|
100
423
|
0· Parse the Website Description (MANDATORY):\n{SMXAI_WEBSITE_DESCRIPTION}\n\n
|
|
101
424
|
1. Input always contains:
|
|
102
425
|
• website_description - plain-text overview of the site/company (mission, goals, audience, visual style, etc.).
|
|
@@ -160,129 +483,4 @@ SMX_PAGE_GENERATION_INSTRUCTIONS = f"""
|
|
|
160
483
|
• No duplicate header/footer.
|
|
161
484
|
• All identifiers safely namespaced.
|
|
162
485
|
• Return only the HTML text—no commentary or extra files.
|
|
163
|
-
"""
|
|
164
|
-
|
|
165
|
-
WEBPAGE_GENERATION_INSTRUCTIONS = (f"""
|
|
166
|
-
Parse the Website Description (MANDATORY):\n{SMXAI_WEBSITE_DESCRIPTION}\n\n
|
|
167
|
-
Prompt (give this to the LLM)
|
|
168
|
-
Role: You are a senior front-end engineer and content designer building a single HTML page for the brand SyntaxMatrix. Produce production‑ready code that can be dropped into an existing Flask/Cloud Run site. Do not include a navbar or a footer; the host site renders them.
|
|
169
|
-
|
|
170
|
-
Objectives:
|
|
171
|
-
1. Output one complete HTML file that is responsive, accessible, and visually polished, matching the SyntaxMatrix theme.
|
|
172
|
-
2. Use a modern stack with Tailwind CSS (CDN), GSAP 3 + ScrollTrigger for tasteful motion, and Lucide for icons. Load the latest stable CDNs.
|
|
173
|
-
3. Provide compelling, concise copy in UK English. Do not use the words: delve, leverage, revolutionary.
|
|
174
|
-
4. Use rich imagery. Prefer locally hosted images via /assets/... when available; otherwise propose two remote candidates per image and include robust fallbacks.
|
|
175
|
-
5. Ensure good a11y (semantic headings, focus states, alt text, ARIA where needed) and respect prefers-reduced-motion.
|
|
176
|
-
|
|
177
|
-
Brand & Design Rules:
|
|
178
|
-
1. Primary colour: {{brand.primary_hex}} (SyntaxMatrix blue). Secondary: {{brand.secondary_hex}}. Dark background: {{brand.dark_bg_hex}}.
|
|
179
|
-
2. Typography: Google Fonts Inter (weights 300–800). Use a clean, enterprise style with soft shadows and rounded corners.
|
|
180
|
-
3. Sections to include (in this order unless stated otherwise): {{sections}}. Omit global nav and footer.
|
|
181
|
-
4. Use subtle gradients, grids, or SVG accents that fit the brand.
|
|
182
|
-
|
|
183
|
-
Images & Fallbacks:
|
|
184
|
-
1.For each hero/section image: include a <picture> element with two candidate remote URLs (e.g., Unsplash/Pexels). Add loading="lazy", decoding="async", and referrerpolicy="no-referrer".
|
|
185
|
-
2. Add a JS onerror fallback on the <img> to swap to a neutral placeholder (e.g., https://picsum.photos/seed/syntaxmatrix-{{slug}}/1600/900).
|
|
186
|
-
3. Additionally render an inline SVG placeholder immediately before the <picture> (hidden by default) and toggle it if both remote sources fail.
|
|
187
|
-
4. Write descriptive alt text tailored to the section's message.
|
|
188
|
-
|
|
189
|
-
Animation:
|
|
190
|
-
1. Use GSAP ScrollTrigger to reveal .reveal elements with short, subtle transitions.
|
|
191
|
-
2. Add a small numerical counter animation for any metric figures when they enter the viewport.
|
|
192
|
-
3. Respect prefers-reduced-motion: reduce by disabling animations.
|
|
193
|
-
|
|
194
|
-
Accessibility & SEO:
|
|
195
|
-
1. Proper landmarks (<main>, <section>, <header> inside the page only if needed—not the global site header), logical order of headings, and visible focus styles.
|
|
196
|
-
2. Meta title and description tuned to {{page_name}} and {{audience}}.
|
|
197
|
-
3. Meaningful link text for CTAs.
|
|
198
|
-
|
|
199
|
-
Performance & Quality:
|
|
200
|
-
1. Single file only; no external CSS files. Use Tailwind CDN and a short <style> block for extras.
|
|
201
|
-
2. Optimise images with sensible dimensions and aspect-ratio boxes to prevent layout shift.
|
|
202
|
-
3. No unused libraries. Keep inline JS small and scoped.
|
|
203
|
-
|
|
204
|
-
Output format:
|
|
205
|
-
Return only the HTML document. No explanations.
|
|
206
|
-
|
|
207
|
-
HTML Requirements Template (follow this structure):
|
|
208
|
-
1. <!DOCTYPE html> + <html lang="en"> (UK English tone in copy).
|
|
209
|
-
2. <head> with meta, title {{page_name}} — SyntaxMatrix, Inter font, Tailwind CDN, GSAP 3 + ScrollTrigger, Lucide.
|
|
210
|
-
3. Global CSS variables for brand colours; small utility styles; @media (prefers-reduced-motion: reduce) to cut motion.
|
|
211
|
-
4. <body> dark theme, no navbar/footer.
|
|
212
|
-
5. Sections per {{sections}}, including:
|
|
213
|
-
I. Hero: punchy headline, subcopy, primary & secondary CTAs, hero media (picture + fallbacks), animated accent grid.
|
|
214
|
-
II. Value Props / Feature Grid: 3-6 cards with icons and short copy.
|
|
215
|
-
III. Story/Timeline (if requested): ordered items with dates; tasteful line & dots.
|
|
216
|
-
IV. Metrics (if requested): 3-4 counters (.counter[data-target]).
|
|
217
|
-
V. Team or Social Proof (optional): avatars or badges.
|
|
218
|
-
VI. CTA band: strong closing prompt (no footer).
|
|
219
|
-
7. Inline <script> to render Lucide icons and GSAP reveal + counters. Include a defensive image‑fallback helper.
|
|
220
|
-
|
|
221
|
-
Image Helper (include this in the page):
|
|
222
|
-
<script>
|
|
223
|
-
(function(){{
|
|
224
|
-
function fallbackImg(img){{
|
|
225
|
-
if(!img.dataset.fallback){{ img.dataset.fallback = '1'; img.src = img.dataset.fallbackSrc; return; }}
|
|
226
|
-
// Show preceding hidden SVG placeholder if available
|
|
227
|
-
var prev = img.previousElementSibling; if(prev && prev.tagName === 'SVG'){{ prev.style.display = 'block'; }}
|
|
228
|
-
img.style.display = 'none';
|
|
229
|
-
}}
|
|
230
|
-
document.querySelectorAll('img[data-fallback-src]').forEach(function(img){{
|
|
231
|
-
img.addEventListener('error', function(){{ fallbackImg(img); }}, {{ once: true }});
|
|
232
|
-
}});
|
|
233
|
-
}})();
|
|
234
|
-
</script>
|
|
235
|
-
|
|
236
|
-
Example <picture> pattern (use per image):
|
|
237
|
-
<!-- Hidden inline SVG placeholder shown only if external images fail -->
|
|
238
|
-
<svg class="hidden w-full h-full object-cover" viewBox="0 0 1600 900" aria-hidden="true">
|
|
239
|
-
<defs>
|
|
240
|
-
<linearGradient id="grad" x1="0" y1="0" x2="1" y2="1">
|
|
241
|
-
<stop offset="0%" stop-color="#0a2540"/>
|
|
242
|
-
<stop offset="100%" stop-color="#001d2b"/>
|
|
243
|
-
</linearGradient>
|
|
244
|
-
</defs>
|
|
245
|
-
<rect width="1600" height="900" fill="url(#grad)"/>
|
|
246
|
-
</svg>
|
|
247
|
-
<picture>
|
|
248
|
-
<source srcset="https://images.unsplash.com/photo-1520607162513-77705c0f0d4a?w=1920 1920w" type="image/jpeg"/>
|
|
249
|
-
<img src="https://images.pexels.com/photos/3184292/pexels-photo-3184292.jpeg?auto=compress&w=1920"
|
|
250
|
-
alt="Team collaborating on AI product planning"
|
|
251
|
-
loading="lazy" decoding="async" referrerpolicy="no-referrer"
|
|
252
|
-
data-fallback-src="https://picsum.photos/seed/syntaxmatrix-hero/1920/1080"
|
|
253
|
-
onerror="this.onerror=null; this.dispatchEvent(new Event('error'));" />
|
|
254
|
-
</picture>
|
|
255
|
-
<picture>
|
|
256
|
-
<source srcset="https://source.unsplash.com/1600x900/?nature,water" media="(min-width: 800px)">
|
|
257
|
-
<source srcset="https://source.unsplash.com/800x600/?nature,water" media="(min-width: 400px)">
|
|
258
|
-
<img src="https://source.unsplash.com/400x300/?nature,water" alt="A beautiful scenery" loading="lazy" decoding="async" referrerpolicy="no-referrer">
|
|
259
|
-
</picture>
|
|
260
|
-
|
|
261
|
-
Animation snippet (include and reuse):
|
|
262
|
-
<script>
|
|
263
|
-
if(window.matchMedia('(prefers-reduced-motion: reduce)').matches){{
|
|
264
|
-
// Skip motion
|
|
265
|
-
}} else if(window.gsap && window.ScrollTrigger){{
|
|
266
|
-
gsap.registerPlugin(ScrollTrigger);
|
|
267
|
-
gsap.utils.toArray('.reveal').forEach(function(el){{
|
|
268
|
-
gsap.from(el, {{
|
|
269
|
-
y: 24, opacity: 0, duration: 0.8, ease: 'power2.out',
|
|
270
|
-
scrollTrigger: {{ trigger: el, start: 'top 80%' }}
|
|
271
|
-
}});
|
|
272
|
-
}});
|
|
273
|
-
document.querySelectorAll('.counter').forEach(function(el){{
|
|
274
|
-
var t = parseInt(el.getAttribute('data-target'),10)||0, obj={{v:0}};
|
|
275
|
-
ScrollTrigger.create({{
|
|
276
|
-
trigger: el, start: 'top 85%', once:true,
|
|
277
|
-
onEnter: function(){{
|
|
278
|
-
gsap.to(obj,{{
|
|
279
|
-
v:t, duration:1.6, ease:'power2.out', onUpdate:function() {{
|
|
280
|
-
el.textContent = Math.round(obj.v);
|
|
281
|
-
}};
|
|
282
|
-
}};
|
|
283
|
-
}};
|
|
284
|
-
}});
|
|
285
|
-
}});
|
|
286
|
-
}};
|
|
287
|
-
</script>
|
|
288
|
-
""")
|
|
486
|
+
"""
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1600" height="900" viewBox="0 0 1600 900">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="g" x1="0" y1="0" x2="1" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#0b1224"></stop>
|
|
5
|
+
<stop offset="0.5" stop-color="#0f1b33"></stop>
|
|
6
|
+
<stop offset="1" stop-color="#020617"></stop>
|
|
7
|
+
</linearGradient>
|
|
8
|
+
<radialGradient id="r" cx="35%" cy="35%" r="70%">
|
|
9
|
+
<stop offset="0" stop-color="#0ea5e9" stop-opacity="0.22"></stop>
|
|
10
|
+
<stop offset="1" stop-color="#0ea5e9" stop-opacity="0"></stop>
|
|
11
|
+
</radialGradient>
|
|
12
|
+
</defs>
|
|
13
|
+
<rect width="1600" height="900" fill="url(#g)"></rect>
|
|
14
|
+
<rect width="1600" height="900" fill="url(#r)"></rect>
|
|
15
|
+
<g opacity="0.25" fill="#22c55e">
|
|
16
|
+
<circle cx="1260" cy="220" r="160" opacity="0.12"></circle>
|
|
17
|
+
<circle cx="1180" cy="650" r="220" opacity="0.08"></circle>
|
|
18
|
+
</g>
|
|
19
|
+
<g opacity="0.35" fill="#94a3b8">
|
|
20
|
+
<path d="M0 740 C 320 660, 520 820, 820 740 C 1120 660, 1280 760, 1600 700 L1600 900 L0 900 Z" opacity="0.10"></path>
|
|
21
|
+
</g>
|
|
22
|
+
</svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,104 @@
|
|
|
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">
|
|
6
|
+
<title>Branding</title>
|
|
7
|
+
<style>
|
|
8
|
+
body{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;margin:0;background:#0b1224;color:#e5e7eb;}
|
|
9
|
+
.wrap{max-width:980px;margin:0 auto;padding:18px;}
|
|
10
|
+
.top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px;}
|
|
11
|
+
.top h1{margin:0;font-size:1.1rem;}
|
|
12
|
+
.btn{display:inline-block;padding:8px 12px;border-radius:999px;border:1px solid rgba(148,163,184,.35);color:#e5e7eb;text-decoration:none;background:transparent;cursor:pointer;font-weight:650;font-size:.85rem;}
|
|
13
|
+
.btn:hover{border-color:rgba(56,189,248,.6);color:#38bdf8;}
|
|
14
|
+
.card{background:rgba(2,6,23,.65);border:1px solid rgba(148,163,184,.25);border-radius:14px;padding:14px;box-shadow:0 18px 36px rgba(15,23,42,.6);margin-bottom:12px;}
|
|
15
|
+
label{display:block;font-size:.78rem;font-weight:750;margin-bottom:6px;color:#d1d5db;}
|
|
16
|
+
input[type="file"]{width:100%;padding:10px 11px;border-radius:12px;border:1px solid rgba(148,163,184,.25);background:rgba(2,6,23,.8);color:#e5e7eb;outline:none;}
|
|
17
|
+
.row{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
|
|
18
|
+
@media (max-width:760px){.row{grid-template-columns:1fr;}}
|
|
19
|
+
.hint{color:#9ca3af;font-size:.78rem;line-height:1.35;margin-top:8px;}
|
|
20
|
+
.flash{background:rgba(34,197,94,.12);border:1px solid rgba(34,197,94,.35);padding:10px;border-radius:12px;margin-bottom:10px;color:#bbf7d0;font-size:.85rem;}
|
|
21
|
+
.flash.warn{background:rgba(239,68,68,.10);border-color:rgba(239,68,68,.30);color:#fecaca;}
|
|
22
|
+
.preview{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin-top:10px;}
|
|
23
|
+
.chip{padding:6px 10px;border-radius:999px;border:1px solid rgba(148,163,184,.25);font-size:.8rem;color:#cbd5e1;}
|
|
24
|
+
.danger{border-color:rgba(239,68,68,.55);color:#fecaca;}
|
|
25
|
+
.danger:hover{border-color:rgba(239,68,68,.9);color:#fff;}
|
|
26
|
+
</style>
|
|
27
|
+
</head>
|
|
28
|
+
<body>
|
|
29
|
+
<div class="wrap">
|
|
30
|
+
<div class="top">
|
|
31
|
+
<h1>Branding</h1>
|
|
32
|
+
<a class="btn" href="{{ url_for('admin_panel') }}#system">Back to Admin</a>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
{% with messages = get_flashed_messages(with_categories=True) %}
|
|
36
|
+
{% if messages %}
|
|
37
|
+
{% for cat, m in messages %}
|
|
38
|
+
<div class="flash {{ 'warn' if cat == 'error' else '' }}">{{ m }}</div>
|
|
39
|
+
{% endfor %}
|
|
40
|
+
{% endif %}
|
|
41
|
+
{% endwith %}
|
|
42
|
+
|
|
43
|
+
<div class="card">
|
|
44
|
+
<h2 style="margin:0 0 10px;font-size:.95rem;">Upload logo and favicon</h2>
|
|
45
|
+
|
|
46
|
+
<form method="post" enctype="multipart/form-data">
|
|
47
|
+
<input type="hidden" name="action" value="upload">
|
|
48
|
+
|
|
49
|
+
<div class="row">
|
|
50
|
+
<div>
|
|
51
|
+
<label>Logo (PNG/JPG)</label>
|
|
52
|
+
<input type="file" name="logo_file" accept=".png,.jpg,.jpeg,image/png,image/jpeg">
|
|
53
|
+
<div class="hint">Tip: a wide logo works best. Up to 5 MB.</div>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<div>
|
|
57
|
+
<label>Favicon (PNG/JPG)</label>
|
|
58
|
+
<input type="file" name="favicon_file" accept=".png,.jpg,.jpeg,image/png,image/jpeg">
|
|
59
|
+
<div class="hint">Tip: square image (32×32 or 48×48). Up to 1 MB.</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<div style="margin-top:12px;display:flex;justify-content:flex-end;gap:10px;">
|
|
64
|
+
<button class="btn" type="submit">Save</button>
|
|
65
|
+
</div>
|
|
66
|
+
</form>
|
|
67
|
+
|
|
68
|
+
<div class="preview">
|
|
69
|
+
<div>
|
|
70
|
+
<div class="chip">Current logo</div>
|
|
71
|
+
<div style="margin-top:8px;">
|
|
72
|
+
{% if logo_url %}
|
|
73
|
+
<img src="{{ logo_url }}" alt="logo" style="max-height:44px;max-width:240px;">
|
|
74
|
+
{% else %}
|
|
75
|
+
{{ default_logo_html|safe }}
|
|
76
|
+
{% endif %}
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<div>
|
|
81
|
+
<div class="chip">Current favicon</div>
|
|
82
|
+
<div style="margin-top:8px;">
|
|
83
|
+
{% if favicon_url %}
|
|
84
|
+
<img src="{{ favicon_url }}" alt="favicon" style="width:32px;height:32px;border-radius:6px;">
|
|
85
|
+
{% else %}
|
|
86
|
+
<img src="{{ default_favicon_url }}" alt="favicon" style="width:32px;height:32px;border-radius:6px;">
|
|
87
|
+
{% endif %}
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
<div class="card">
|
|
94
|
+
<h2 style="margin:0 0 10px;font-size:.95rem;">Reset</h2>
|
|
95
|
+
<div class="hint">Removes the uploaded logo/favicon so the app falls back to the SyntaxMatrix defaults.</div>
|
|
96
|
+
|
|
97
|
+
<form method="post" onsubmit="return confirm('Reset branding to defaults?');" style="margin-top:10px;">
|
|
98
|
+
<input type="hidden" name="action" value="reset">
|
|
99
|
+
<button class="btn danger" type="submit">Reset to defaults</button>
|
|
100
|
+
</form>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</body>
|
|
104
|
+
</html>
|