How pos-cmd/clevercms works
Main Components
A. Frontend Layer:
• Admin Panel (Vue.js Application)
• Components structure (/admin/src/components)
• Views structure (/admin/src/views)
• State management (Pinia stores)
• Internationalization system
• Theme system
B. Backend Layer:
• Web Application (AdonisJS Framework)
• API Controllers
• Authentication system
• Content Management modules
• Database models
• Middleware layer
C. Database Layer:
• Content Management tables
• User management tables
• Authorization tables
• SEO and metadata tables
D. Shared Libraries:
• Axios wrapper
• Hooks
• Materials
• Utils
Component Relationships
• Admin Panel → Backend API (REST/HTTP)
• Backend → Database (ORM layer)
• Shared Libraries ↔ Both Frontend and Backend
• Authentication flow between components
• Content management flow
Architectural Patterns to Highlight
• MVC Pattern in the backend
• Component-based architecture in the frontend
• Module-based organization
• Middleware pipeline
• Service layer pattern
┌─────────────────────────────────────────────────────────────┐
• Admin Panel (Vue.js) │
• ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌────────┐ │
• Views │ │ Store │ │ i18n │ │ Themes │ │ Router │ │
• ┘ └─────────┘ └─────────┘ └─────────┘ └────────┘ │
• ┬───────────────────────────────┘
┌─────────────────────────────▼───────────────────────────────┐
• Shared Libraries Layer │
• ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────────────────┐│
• Axios │ │ Hooks │ │ Utils │ │ UI Materials ││
• ┘ └─────────┘ └─────────┘ └─────────────────────┘│
• ┬───────────────────────────────┘
┌─────────────────────────────▼───────────────────────────────┐
• Backend (AdonisJS) │
• ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
• Auth │ │ API │ │Services │ │ ACL │ │
• ┘ └─────────┘ └─────────┘ └─────────┘ │
• ┌─────────────────────┐ ┌───────────────────────┐ │
• Content Management │ │ User Management │ │
• ┘ └───────────────────────┘ │
• ┬───────────────────────────────┘
┌─────────────────────────────▼───────────────────────────────┐
• Database │
• ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
• Users │ │ Content │ │ SEO │ │ Blocks │ │
• ┘ └─────────┘ └─────────┘ └─────────┘ │
• ┘
Additional Elements
• Authentication flow
• Relationship between blocks, sections, and pages
• Internationalization system
• Theme system architecture
Important Notes
• Keep the focus on the content management aspects
• Clear separation between admin and public interfaces
• Modular nature of the system
• Role-based access control system
• Relationship between different content types (pages, blocks, sections)