Files
insertr/demo-site/mock-api/content.json
Joakim af88e57272 Add working frontend prototype with edit-in-place functionality
 Features implemented:
- Complete demo website (Acme Consulting Services)
- Core insertr.js library with edit-in-place functionality
- Support for simple text and rich markdown content
- Mock authentication system (login/logout simulation)
- Edit mode toggle for client interface
- Local storage persistence
- Visual feedback for saving content
- Multi-page support (index.html, about.html)
- Responsive design with clean UI

🎯 Three user experiences:
- Customer: Clean website with no edit interface
- Client: Same website + edit buttons when authenticated
- Developer: Simple class-based integration

🏗️ Architecture:
- Vanilla JavaScript (no framework dependencies)
- Alpine.js ready for enhanced interactivity
- CSS-only styling for edit indicators
- Mock API structure for backend planning

Next: Connect to Go backend with real persistence
2025-08-29 22:41:15 +02:00

88 lines
3.5 KiB
JSON

{
"site": {
"id": "acme-consulting",
"domain": "acmeconsulting.example.com",
"owner": "client@acmeconsulting.com",
"created": "2024-01-15T10:30:00Z",
"updated": "2024-01-29T14:22:00Z"
},
"content": {
"nav-logo": {
"type": "simple",
"value": "Acme Consulting",
"updated": "2024-01-15T10:30:00Z",
"updatedBy": "client@acmeconsulting.com"
},
"hero-content": {
"type": "rich",
"value": "# Transform Your Business with Expert Consulting\n\nWe help small businesses grow through strategic planning, process optimization, and digital transformation. Our team brings 15+ years of experience to drive your success.\n\n[Get Started Today](contact.html)",
"updated": "2024-01-20T09:15:00Z",
"updatedBy": "client@acmeconsulting.com"
},
"services-title": {
"type": "rich",
"value": "## Our Services\n\nComprehensive solutions tailored to your business needs",
"updated": "2024-01-15T10:30:00Z",
"updatedBy": "client@acmeconsulting.com"
},
"service-strategy": {
"type": "rich",
"value": "### Strategic Planning\n\nDevelop clear roadmaps and actionable strategies that align with your business goals and drive sustainable growth.",
"updated": "2024-01-15T10:30:00Z",
"updatedBy": "client@acmeconsulting.com"
},
"service-operations": {
"type": "rich",
"value": "### Operations Optimization\n\nStreamline processes, reduce costs, and improve efficiency through proven methodologies and best practices.",
"updated": "2024-01-15T10:30:00Z",
"updatedBy": "client@acmeconsulting.com"
},
"service-digital": {
"type": "rich",
"value": "### Digital Transformation\n\nModernize your technology stack and digital presence to compete effectively in today's marketplace.",
"updated": "2024-01-15T10:30:00Z",
"updatedBy": "client@acmeconsulting.com"
},
"testimonial-content": {
"type": "rich",
"value": "> \"Acme Consulting transformed our operations completely. We saw a 40% increase in efficiency within 6 months of implementing their recommendations.\"\n> \n> — Sarah Johnson, CEO of TechStart Inc.",
"updated": "2024-01-25T16:45:00Z",
"updatedBy": "client@acmeconsulting.com"
},
"cta-content": {
"type": "rich",
"value": "## Ready to Transform Your Business?\n\nContact us today for a free consultation and discover how we can help you achieve your goals.\n\n[Schedule Consultation](contact.html)",
"updated": "2024-01-15T10:30:00Z",
"updatedBy": "client@acmeconsulting.com"
},
"footer-info": {
"type": "simple",
"value": "© 2024 Acme Consulting Services. All rights reserved.\n📧 info@acmeconsulting.com | 📞 (555) 123-4567",
"updated": "2024-01-15T10:30:00Z",
"updatedBy": "client@acmeconsulting.com"
}
},
"permissions": {
"client@acmeconsulting.com": {
"role": "editor",
"canEdit": ["*"],
"canDelete": false,
"canCreatePages": false
},
"developer@example.com": {
"role": "admin",
"canEdit": ["*"],
"canDelete": true,
"canCreatePages": true
}
},
"history": [
{
"contentId": "testimonial-content",
"timestamp": "2024-01-25T16:45:00Z",
"user": "client@acmeconsulting.com",
"action": "update",
"previousValue": "> \"Working with Acme Consulting was a game-changer for our business.\"\n> \n> — Sarah Johnson, CEO of TechStart Inc."
}
]
}