mirror of
https://github.com/SamyRai/turash.git
synced 2025-12-26 23:01:33 +00:00
- Update locales (ru, tt, en) to use 'Turash' and 'Turash AI' - Update metadata, index.html, and pixel-art README - Replace example credentials/emails from @tuganyak.dev -> @turash.dev - Update admin defaults and migration seed to use new admin@turash.dev - Update docs mentioning the old name
1135 lines
30 KiB
Markdown
1135 lines
30 KiB
Markdown
# Admin Panel Concept & Design Specification
|
|
|
|
## Table of Contents
|
|
|
|
1. [Overview](#overview)
|
|
2. [Architecture & Navigation](#architecture--navigation)
|
|
3. [Pages & Functionality](#pages--functionality)
|
|
4. [UX Design Principles](#ux-design-principles)
|
|
5. [Technical Implementation](#technical-implementation)
|
|
6. [API Requirements](#api-requirements)
|
|
|
|
---
|
|
|
|
## Overview
|
|
|
|
### Purpose
|
|
|
|
The Admin Panel is a comprehensive management interface for administrators to manage all aspects of the "Turash" ecosystem, including organizations, content, localizations, users, and system configuration.
|
|
|
|
### Target Users
|
|
|
|
- **Primary**: System Administrators
|
|
- **Secondary**: Content Managers (with limited permissions)
|
|
|
|
### Key Features
|
|
|
|
- **Unified Dashboard**: Real-time overview of system health and metrics
|
|
- **Organization Management**: Full CRUD operations with verification workflow
|
|
- **Localization Management**: Complete UI and data translation management
|
|
- **Content Management**: Manage static pages, announcements, and dynamic content
|
|
- **User Management**: User accounts, roles, and permissions
|
|
- **Analytics & Reporting**: System metrics, usage statistics, and insights
|
|
- **System Settings**: Configuration, integrations, and maintenance
|
|
|
|
---
|
|
|
|
## Architecture & Navigation
|
|
|
|
### Navigation Structure
|
|
|
|
```
|
|
Admin Panel
|
|
├── Dashboard (Home)
|
|
├── Organizations
|
|
│ ├── List & Search
|
|
│ ├── Create/Edit
|
|
│ ├── Verification Queue
|
|
│ └── Bulk Operations
|
|
├── Localization
|
|
│ ├── UI Translations
|
|
│ │ ├── By Locale (en, ru, tt)
|
|
│ │ ├── Search & Filter
|
|
│ │ ├── Bulk Edit
|
|
│ │ └── Import/Export
|
|
│ └── Data Translations
|
|
│ ├── Organizations
|
|
│ ├── Sites
|
|
│ ├── Heritage Buildings
|
|
│ └── Search & Manage
|
|
├── Content Management
|
|
│ ├── Static Pages
|
|
│ │ ├── About
|
|
│ │ ├── Contact
|
|
│ │ ├── Privacy
|
|
│ │ └── Custom Pages
|
|
│ ├── Announcements
|
|
│ └── Media Library
|
|
├── Users
|
|
│ ├── User List
|
|
│ ├── Create/Edit User
|
|
│ ├── Role Management
|
|
│ └── Activity Log
|
|
├── Analytics
|
|
│ ├── Overview
|
|
│ ├── Organizations
|
|
│ ├── User Activity
|
|
│ ├── Matching Statistics
|
|
│ └── Export Reports
|
|
├── Settings
|
|
│ ├── General
|
|
│ ├── Localization
|
|
│ ├── Integrations
|
|
│ ├── Email Templates
|
|
│ └── System Maintenance
|
|
└── Help & Documentation
|
|
```
|
|
|
|
### Layout Structure
|
|
|
|
```
|
|
┌─────────────────────────────────────────────────────────┐
|
|
│ Header: Logo | Navigation | User Menu | Notifications │
|
|
├─────────────────────────────────────────────────────────┤
|
|
│ │
|
|
│ ┌──────────┐ ┌─────────────────────────────────────┐ │
|
|
│ │ │ │ │ │
|
|
│ │ Sidebar │ │ Main Content Area │ │
|
|
│ │ │ │ │ │
|
|
│ │ - Nav │ │ - Page Header │ │
|
|
│ │ - Icons │ │ - Breadcrumbs │ │
|
|
│ │ │ │ - Content │ │
|
|
│ │ │ │ - Actions │ │
|
|
│ └──────────┘ └─────────────────────────────────────┘ │
|
|
│ │
|
|
└─────────────────────────────────────────────────────────┘
|
|
```
|
|
|
|
### Responsive Breakpoints
|
|
|
|
- **Desktop**: Full sidebar navigation, multi-column layouts
|
|
- **Tablet**: Collapsible sidebar, adapted grid layouts
|
|
- **Mobile**: Bottom navigation bar, single column, stacked cards
|
|
|
|
---
|
|
|
|
## Pages & Functionality
|
|
|
|
### 1. Dashboard (`/admin`)
|
|
|
|
**Purpose**: Central hub providing overview of system status and key metrics.
|
|
|
|
#### Layout
|
|
|
|
- **Top Row**: Key Metrics Cards (4 cards)
|
|
- **Middle Row**: Charts (2 columns)
|
|
- **Bottom Row**: Recent Activity & Quick Actions
|
|
|
|
#### Components
|
|
|
|
**Key Metrics Cards**:
|
|
|
|
1. **Total Organizations**
|
|
- Count with trend indicator (↑/↓ %)
|
|
- Click to navigate to Organizations list
|
|
- Color: Primary
|
|
|
|
2. **Verified Organizations**
|
|
- Count with percentage of total
|
|
- Click to filter verified organizations
|
|
- Color: Success
|
|
|
|
3. **Active Connections**
|
|
- Symbiotic links count
|
|
- Click to view connections graph
|
|
- Color: Info
|
|
|
|
4. **New This Month**
|
|
- Count with comparison to previous month
|
|
- Click to view recent organizations
|
|
- Color: Warning
|
|
|
|
**Charts Section**:
|
|
|
|
1. **Economic Connections Graph** (Left, 60% width)
|
|
- Interactive network visualization
|
|
- Sector-to-sector connections
|
|
- Filterable by sector, date range
|
|
- Export as PNG/SVG
|
|
|
|
2. **Supply & Demand Analysis** (Right, 40% width)
|
|
- Top 10 most requested resources
|
|
- Top 10 most offered resources
|
|
- Bar chart visualization
|
|
- Time period selector
|
|
|
|
**Recent Activity Feed**:
|
|
|
|
- Last 20 system events
|
|
- Organization verifications
|
|
- New user registrations
|
|
- Content updates
|
|
- Filterable by type, date
|
|
- Real-time updates via WebSocket
|
|
|
|
**Quick Actions**:
|
|
|
|
- Verify pending organizations (with count badge)
|
|
- Review translation requests
|
|
- View system alerts
|
|
- Access help documentation
|
|
|
|
#### UX Features
|
|
|
|
- **Real-time Updates**: WebSocket connection for live metrics
|
|
- **Refresh Indicator**: Manual refresh button with last update time
|
|
- **Export Options**: Download dashboard as PDF/PNG
|
|
- **Customizable Widgets**: Drag-and-drop to rearrange (future enhancement)
|
|
- **Time Range Selector**: View metrics for different periods
|
|
|
|
---
|
|
|
|
### 2. Organizations Management (`/admin/organizations`)
|
|
|
|
**Purpose**: Comprehensive organization management with CRUD operations and verification workflow.
|
|
|
|
#### Sub-pages
|
|
|
|
##### 2.1 Organization List (`/admin/organizations`)
|
|
|
|
**Features**:
|
|
|
|
- **Advanced Search**:
|
|
- Full-text search (name, description, sector)
|
|
- Filter by: Sector, Type, Verification Status, Date Range
|
|
- Saved filter presets
|
|
- URL-encoded filters for sharing
|
|
|
|
- **Data Table**:
|
|
- Columns: Logo, Name, Sector, Type, Needs/Offers, Status, Actions
|
|
- Sortable columns
|
|
- Pagination (10, 25, 50, 100 per page)
|
|
- Bulk selection checkbox
|
|
- Responsive: Cards view on mobile
|
|
|
|
- **Bulk Actions**:
|
|
- Verify/Unverify selected
|
|
- Export to CSV/JSON
|
|
- Delete (with confirmation)
|
|
- Tag assignment
|
|
|
|
- **Actions per Row**:
|
|
- View details (opens modal or navigates)
|
|
- Edit
|
|
- Verify/Unverify
|
|
- Delete (with confirmation)
|
|
- Duplicate
|
|
|
|
**UX Features**:
|
|
|
|
- **Inline Editing**: Quick edit for name, sector (with autocomplete)
|
|
- **Keyboard Shortcuts**:
|
|
- `Ctrl+F`: Focus search
|
|
- `Ctrl+N`: New organization
|
|
- `Esc`: Close modals
|
|
- **Undo/Redo**: For bulk operations
|
|
- **Export**: Current view with filters applied
|
|
|
|
##### 2.2 Organization Editor (`/admin/organizations/new`, `/admin/organizations/:id/edit`)
|
|
|
|
**Layout**: Multi-step wizard or single-page form (configurable)
|
|
|
|
**Sections**:
|
|
|
|
1. **Basic Information**
|
|
- Name (required, with translation fields)
|
|
- Sector (dropdown with search)
|
|
- Subtype
|
|
- Description (rich text editor with translations)
|
|
- Website URL
|
|
- Logo upload (drag & drop, preview, crop)
|
|
|
|
2. **Location & Contact**
|
|
- Address (with map picker)
|
|
- Coordinates (auto-filled from address)
|
|
- Phone, Email
|
|
- Contact person
|
|
|
|
3. **Resources**
|
|
- Needs (multi-select with autocomplete)
|
|
- Offers (multi-select with autocomplete)
|
|
- Resource flows management
|
|
|
|
4. **Media**
|
|
- Gallery images (upload, reorder, delete)
|
|
- Image optimization preview
|
|
- Alt text for accessibility
|
|
|
|
5. **Verification**
|
|
- Verification status toggle
|
|
- Verification notes (admin-only)
|
|
- Verification date
|
|
|
|
6. **Metadata**
|
|
- Created/Updated timestamps
|
|
- Created by user
|
|
- Tags
|
|
- Custom fields
|
|
|
|
**UX Features**:
|
|
|
|
- **Auto-save**: Draft saved every 30 seconds
|
|
- **Validation**: Real-time field validation
|
|
- **Translation Tabs**: Switch between locales (ru, en, tt)
|
|
- **Preview Mode**: See how organization appears to users
|
|
- **History**: View edit history and restore previous versions
|
|
- **Related Data**: Show connections, proposals, matches
|
|
|
|
##### 2.3 Verification Queue (`/admin/organizations/verification`)
|
|
|
|
**Purpose**: Dedicated interface for reviewing and verifying organizations.
|
|
|
|
**Features**:
|
|
|
|
- **Queue List**: Organizations pending verification
|
|
- **Priority Sorting**: By date, user requests, flags
|
|
- **Quick Actions**: Approve, Reject, Request More Info
|
|
- **Batch Processing**: Verify multiple at once
|
|
- **Verification Criteria Checklist**:
|
|
- Valid contact information
|
|
- Complete profile
|
|
- Appropriate content
|
|
- Logo quality
|
|
- **Notes & Comments**: Internal admin notes
|
|
- **Statistics**: Verification rate, average time
|
|
|
|
**UX Features**:
|
|
|
|
- **Side-by-side View**: Compare with similar verified organizations
|
|
- **Keyboard Navigation**: Arrow keys to navigate queue
|
|
- **Bulk Approve**: Select and approve multiple
|
|
- **Templates**: Pre-written rejection/request messages
|
|
|
|
---
|
|
|
|
### 3. Localization Management (`/admin/localization`)
|
|
|
|
**Purpose**: Complete management of all UI and data translations across all supported locales.
|
|
|
|
#### Sub-pages
|
|
|
|
##### 3.1 UI Translations (`/admin/localization/ui`)
|
|
|
|
**Purpose**: Manage all frontend UI text translations.
|
|
|
|
**Layout**:
|
|
|
|
- **Left Panel**: Translation keys tree (grouped by namespace)
|
|
- **Right Panel**: Translation editor for selected key
|
|
|
|
**Features**:
|
|
|
|
**Translation Key Tree**:
|
|
|
|
- Hierarchical structure matching frontend structure
|
|
- `common.*`
|
|
- `adminPage.*`
|
|
- `organizationPage.*`
|
|
- `mapView.*`
|
|
- etc.
|
|
- Search/filter keys
|
|
- Expand/collapse groups
|
|
- Show missing translations (highlighted)
|
|
- Show untranslated keys (red indicator)
|
|
|
|
**Translation Editor**:
|
|
|
|
- **Key Path**: Full path display (e.g., `adminPage.title`)
|
|
- **Source Locale** (Russian): Read-only, serves as reference
|
|
- **Target Locales**: Editable fields for each locale (en, tt)
|
|
- Text input (single line)
|
|
- Textarea (multi-line)
|
|
- Rich text editor (for formatted content)
|
|
- **Translation Status**:
|
|
- ✅ Complete
|
|
- ⚠️ Needs Review
|
|
- ❌ Missing
|
|
- 🔄 Auto-translated (needs review)
|
|
- **Translation Metadata**:
|
|
- Last updated
|
|
- Updated by
|
|
- Translation source (manual, auto, import)
|
|
- Character count
|
|
- Word count
|
|
|
|
**Bulk Operations**:
|
|
|
|
- **Bulk Edit**: Edit multiple keys at once
|
|
- **Auto-translate**: Translate missing keys using AI/ML
|
|
- **Import/Export**:
|
|
- Export to JSON/CSV/XLSX
|
|
- Import from file
|
|
- Merge strategy options
|
|
- **Find & Replace**: Across all translations
|
|
- **Copy from Locale**: Copy translations from another locale
|
|
|
|
**Translation Tools**:
|
|
|
|
- **Translation Memory**: Suggest similar translations
|
|
- **Spell Check**: Per locale
|
|
- **Placeholder Validation**: Ensure placeholders match (e.g., `{{name}}`)
|
|
- **Length Warning**: Warn if translation is significantly longer/shorter
|
|
- **Context Preview**: Show where translation is used in UI
|
|
|
|
**UX Features**:
|
|
|
|
- **Live Preview**: See translation in context
|
|
- **Keyboard Shortcuts**:
|
|
- `Ctrl+S`: Save
|
|
- `Ctrl+Enter`: Save and next
|
|
- `Tab`: Next field
|
|
- **Translation Progress**: Progress bar per locale
|
|
- **Filter Options**:
|
|
- Show only missing
|
|
- Show only changed
|
|
- Show only auto-translated
|
|
- **History**: View translation history, revert changes
|
|
|
|
##### 3.2 Data Translations (`/admin/localization/data`)
|
|
|
|
**Purpose**: Manage translations for dynamic content (organizations, sites, heritage buildings, etc.).
|
|
|
|
**Layout**:
|
|
|
|
- **Entity Type Selector**: Organizations, Sites, Heritage, etc.
|
|
- **Entity List**: Searchable, filterable list
|
|
- **Translation Editor**: Similar to UI translations but entity-specific
|
|
|
|
**Features**:
|
|
|
|
**Entity Selection**:
|
|
|
|
- Dropdown or tabs for entity types
|
|
- Search entities by name/ID
|
|
- Filter by translation status
|
|
|
|
**Entity Translation View**:
|
|
|
|
- **Entity Info**: Name, ID, source locale values
|
|
- **Translatable Fields**:
|
|
- Name
|
|
- Description
|
|
- Address
|
|
- Custom fields
|
|
- **Translation Status per Field**: Visual indicators
|
|
- **Bulk Translate**: Translate all fields for an entity
|
|
- **Copy Entity**: Copy translations from similar entity
|
|
|
|
**Translation Workflow**:
|
|
|
|
1. Select entity type
|
|
2. Search/filter entities
|
|
3. Select entity
|
|
4. View source (Russian) values
|
|
5. Edit translations for each locale
|
|
6. Save with review status
|
|
|
|
**Advanced Features**:
|
|
|
|
- **Translation Suggestions**: AI-powered suggestions based on similar entities
|
|
- **Bulk Operations**:
|
|
- Translate all missing for entity type
|
|
- Review and approve auto-translations
|
|
- Export/import entity translations
|
|
- **Translation Statistics**:
|
|
- Coverage per entity type
|
|
- Coverage per locale
|
|
- Missing translations count
|
|
|
|
**UX Features**:
|
|
|
|
- **Side-by-side Comparison**: Source vs. translations
|
|
- **Entity Preview**: See how entity appears in different locales
|
|
- **Translation Queue**: List of entities needing translation
|
|
- **Quality Indicators**:
|
|
- Translation confidence score
|
|
- Length mismatch warnings
|
|
- Placeholder validation
|
|
|
|
---
|
|
|
|
### 4. Content Management (`/admin/content`)
|
|
|
|
**Purpose**: Manage static pages, announcements, and media assets.
|
|
|
|
#### Sub-pages
|
|
|
|
##### 4.1 Static Pages (`/admin/content/pages`)
|
|
|
|
**Features**:
|
|
|
|
- **Page List**:
|
|
- About, Contact, Privacy, Terms, etc.
|
|
- Custom pages
|
|
- Status indicators (Published, Draft, Archived)
|
|
- **Page Editor**:
|
|
- **Metadata**:
|
|
- Page title
|
|
- URL slug
|
|
- Meta description
|
|
- SEO settings
|
|
- **Content**:
|
|
- Rich text editor (WYSIWYG)
|
|
- Markdown support
|
|
- Media insertion
|
|
- Code blocks
|
|
- **Translations**:
|
|
- Content per locale
|
|
- Language switcher in editor
|
|
- **Settings**:
|
|
- Published/Draft status
|
|
- Publication date
|
|
- Visibility (Public, Private, Admin-only)
|
|
- Template selection
|
|
- **Page Preview**: Live preview in new tab
|
|
- **Version History**: View and restore previous versions
|
|
|
|
##### 4.2 Announcements (`/admin/content/announcements`)
|
|
|
|
**Features**:
|
|
|
|
- **Announcement List**:
|
|
- Title, Status, Date, Priority
|
|
- Filter by status, date range
|
|
- **Announcement Editor**:
|
|
- Title (with translations)
|
|
- Content (rich text, with translations)
|
|
- Priority (Low, Normal, High, Urgent)
|
|
- Start/End date
|
|
- Target audience (All, Organizations, Users, Specific groups)
|
|
- Display settings (Banner, Modal, Notification)
|
|
- **Scheduling**: Schedule announcements for future
|
|
- **Analytics**: Views, clicks, dismissals
|
|
|
|
##### 4.3 Media Library (`/admin/content/media`)
|
|
|
|
**Features**:
|
|
|
|
- **Media Grid View**:
|
|
- Thumbnails with overlay info
|
|
- Filter by type (Image, Video, Document)
|
|
- Search by filename, tags
|
|
- **Upload**:
|
|
- Drag & drop
|
|
- Multiple file upload
|
|
- Progress indicators
|
|
- Automatic optimization
|
|
- **Media Details**:
|
|
- Preview
|
|
- Metadata (dimensions, size, format)
|
|
- Alt text (with translations)
|
|
- Tags
|
|
- Usage: Show where media is used
|
|
- **Bulk Operations**:
|
|
- Delete
|
|
- Tag assignment
|
|
- Alt text update
|
|
- **Storage Management**:
|
|
- Total storage used
|
|
- Storage by type
|
|
- Cleanup tools (unused media)
|
|
|
|
---
|
|
|
|
### 5. User Management (`/admin/users`)
|
|
|
|
**Purpose**: Manage user accounts, roles, and permissions.
|
|
|
|
#### Sub-pages
|
|
|
|
##### 5.1 User List (`/admin/users`)
|
|
|
|
**Features**:
|
|
|
|
- **User Table**:
|
|
- Columns: Avatar, Name, Email, Role, Status, Last Login, Actions
|
|
- Sortable, filterable
|
|
- Search by name, email
|
|
- **Filters**:
|
|
- Role (Admin, User)
|
|
- Status (Active, Inactive, Suspended)
|
|
- Registration date
|
|
- **Bulk Actions**:
|
|
- Change role
|
|
- Activate/Deactivate
|
|
- Send email
|
|
- Export
|
|
|
|
##### 5.2 User Editor (`/admin/users/new`, `/admin/users/:id/edit`)
|
|
|
|
**Features**:
|
|
|
|
- **Basic Information**:
|
|
- Name
|
|
- Email (unique validation)
|
|
- Password (with strength indicator)
|
|
- Avatar upload
|
|
- **Role & Permissions**:
|
|
- Role selection (Admin, User)
|
|
- Custom permissions (future: granular permissions)
|
|
- **Account Status**:
|
|
- Active/Inactive toggle
|
|
- Suspension reason (if suspended)
|
|
- **Activity**:
|
|
- Last login
|
|
- Created organizations
|
|
- Recent activity
|
|
- **Security**:
|
|
- Password reset
|
|
- Two-factor authentication status
|
|
- Active sessions
|
|
|
|
##### 5.3 Activity Log (`/admin/users/activity`)
|
|
|
|
**Features**:
|
|
|
|
- **Activity Feed**:
|
|
- User actions (login, create org, edit, etc.)
|
|
- Timestamp
|
|
- IP address
|
|
- User agent
|
|
- **Filters**:
|
|
- User
|
|
- Action type
|
|
- Date range
|
|
- IP address
|
|
- **Export**: CSV export of filtered activities
|
|
|
|
---
|
|
|
|
### 6. Analytics & Reporting (`/admin/analytics`)
|
|
|
|
**Purpose**: System-wide analytics, metrics, and reporting.
|
|
|
|
#### Sub-pages
|
|
|
|
##### 6.1 Overview (`/admin/analytics`)
|
|
|
|
**Features**:
|
|
|
|
- **Key Metrics Dashboard**:
|
|
- Total users
|
|
- Active users (last 30 days)
|
|
- Total organizations
|
|
- Total connections
|
|
- Proposals sent/accepted
|
|
- **Charts**:
|
|
- User growth over time
|
|
- Organization growth
|
|
- Activity heatmap
|
|
- Geographic distribution
|
|
- **Time Range Selector**: Last 7/30/90 days, custom range
|
|
|
|
##### 6.2 Organization Analytics (`/admin/analytics/organizations`)
|
|
|
|
**Features**:
|
|
|
|
- **Sector Distribution**: Pie/bar chart
|
|
- **Verification Rate**: Over time
|
|
- **Top Sectors**: By count, by connections
|
|
- **Geographic Distribution**: Map visualization
|
|
- **Engagement Metrics**: Views, proposals, matches
|
|
|
|
##### 6.3 User Activity (`/admin/analytics/users`)
|
|
|
|
**Features**:
|
|
|
|
- **User Engagement**:
|
|
- Daily/Monthly active users
|
|
- Session duration
|
|
- Pages visited
|
|
- **User Retention**: Cohort analysis
|
|
- **Feature Usage**: Which features are used most
|
|
- **User Journey**: Funnel analysis
|
|
|
|
##### 6.4 Matching Statistics (`/admin/analytics/matching`)
|
|
|
|
**Features**:
|
|
|
|
- **Match Success Rate**: Over time
|
|
- **Top Matched Sectors**: Which sectors match most
|
|
- **Proposal Statistics**: Sent, accepted, rejected
|
|
- **Connection Strength**: Average connection scores
|
|
|
|
##### 6.5 Reports (`/admin/analytics/reports`)
|
|
|
|
**Features**:
|
|
|
|
- **Report Templates**:
|
|
- Monthly summary
|
|
- User activity report
|
|
- Organization growth report
|
|
- Custom reports
|
|
- **Scheduled Reports**: Email reports on schedule
|
|
- **Export Options**: PDF, CSV, Excel
|
|
- **Report Builder**: Create custom reports (future)
|
|
|
|
---
|
|
|
|
### 7. Settings (`/admin/settings`)
|
|
|
|
**Purpose**: System configuration and maintenance.
|
|
|
|
#### Sub-pages
|
|
|
|
##### 7.1 General Settings (`/admin/settings/general`)
|
|
|
|
**Features**:
|
|
|
|
- **Site Information**:
|
|
- Site name
|
|
- Site description
|
|
- Logo
|
|
- Favicon
|
|
- Contact email
|
|
- **Features**:
|
|
- Enable/disable features
|
|
- Feature flags
|
|
- **Limits**:
|
|
- Max file upload size
|
|
- Max organizations per user
|
|
- Rate limiting settings
|
|
|
|
##### 7.2 Localization Settings (`/admin/settings/localization`)
|
|
|
|
**Features**:
|
|
|
|
- **Supported Locales**:
|
|
- Enable/disable locales
|
|
- Default locale
|
|
- Locale display names
|
|
- **Translation Settings**:
|
|
- Auto-translation provider (Ollama, external API)
|
|
- Translation quality threshold
|
|
- Review required for auto-translations
|
|
- **Locale-Specific Settings**:
|
|
- Date format
|
|
- Time format
|
|
- Number format
|
|
- Currency
|
|
|
|
##### 7.3 Integrations (`/admin/settings/integrations`)
|
|
|
|
**Features**:
|
|
|
|
- **API Keys**:
|
|
- External services
|
|
- API key management
|
|
- Usage statistics
|
|
- **Webhooks**:
|
|
- Configure webhooks
|
|
- Test webhooks
|
|
- Webhook logs
|
|
- **Third-party Services**:
|
|
- Email service (SMTP, SendGrid, etc.)
|
|
- Storage service (S3, etc.)
|
|
- Analytics (Google Analytics, etc.)
|
|
|
|
##### 7.4 Email Templates (`/admin/settings/email`)
|
|
|
|
**Features**:
|
|
|
|
- **Template List**:
|
|
- Welcome email
|
|
- Verification email
|
|
- Password reset
|
|
- Notifications
|
|
- Custom templates
|
|
- **Template Editor**:
|
|
- Subject (with translations)
|
|
- Body (HTML editor with preview)
|
|
- Variables: `{{name}}`, `{{link}}`, etc.
|
|
- Test email sending
|
|
- **Template Variables**: Documentation of available variables
|
|
|
|
##### 7.5 System Maintenance (`/admin/settings/maintenance`)
|
|
|
|
**Features**:
|
|
|
|
- **Maintenance Mode**:
|
|
- Enable/disable
|
|
- Custom message
|
|
- Allowed IPs (for admins)
|
|
- **Database**:
|
|
- Backup now
|
|
- Backup schedule
|
|
- Restore from backup
|
|
- Database statistics
|
|
- **Cache Management**:
|
|
- Clear cache
|
|
- Cache statistics
|
|
- Cache warming
|
|
- **Logs**:
|
|
- View system logs
|
|
- Log level settings
|
|
- Log retention
|
|
- **Health Checks**:
|
|
- System status
|
|
- Service status
|
|
- Performance metrics
|
|
|
|
---
|
|
|
|
## UX Design Principles
|
|
|
|
### 1. Consistency
|
|
|
|
- **Design System**: Use consistent components, colors, typography
|
|
- **Navigation**: Predictable navigation patterns
|
|
- **Terminology**: Consistent language throughout
|
|
- **Icons**: Standardized icon set with clear meanings
|
|
|
|
### 2. Efficiency
|
|
|
|
- **Keyboard Shortcuts**: Power users can work faster
|
|
- **Bulk Operations**: Perform actions on multiple items
|
|
- **Quick Actions**: Common actions easily accessible
|
|
- **Auto-save**: Prevent data loss
|
|
- **Undo/Redo**: Allow mistake correction
|
|
|
|
### 3. Feedback
|
|
|
|
- **Loading States**: Clear indicators for async operations
|
|
- **Success Messages**: Confirm successful actions
|
|
- **Error Messages**: Clear, actionable error messages
|
|
- **Progress Indicators**: Show progress for long operations
|
|
- **Notifications**: Non-intrusive notifications system
|
|
|
|
### 4. Accessibility
|
|
|
|
- **WCAG 2.1 AA Compliance**: Meet accessibility standards
|
|
- **Keyboard Navigation**: Full functionality via keyboard
|
|
- **Screen Reader Support**: Proper ARIA labels
|
|
- **Color Contrast**: Sufficient contrast ratios
|
|
- **Focus Indicators**: Clear focus states
|
|
|
|
### 5. Responsiveness
|
|
|
|
- **Mobile-First**: Works on all screen sizes
|
|
- **Touch-Friendly**: Adequate touch targets (44x44px minimum)
|
|
- **Adaptive Layouts**: Layouts adapt to screen size
|
|
- **Performance**: Fast loading, smooth interactions
|
|
|
|
### 6. Discoverability
|
|
|
|
- **Breadcrumbs**: Show current location
|
|
- **Search**: Global search for quick access
|
|
- **Tooltips**: Helpful hints on hover
|
|
- **Help Documentation**: Contextual help links
|
|
- **Onboarding**: Guided tour for new admins
|
|
|
|
### 7. Error Prevention
|
|
|
|
- **Validation**: Real-time field validation
|
|
- **Confirmations**: For destructive actions
|
|
- **Draft Saving**: Auto-save to prevent data loss
|
|
- **Input Constraints**: Prevent invalid input
|
|
- **Clear Labels**: Unambiguous field labels
|
|
|
|
### 8. Performance
|
|
|
|
- **Lazy Loading**: Load content as needed
|
|
- **Pagination**: Efficient data loading
|
|
- **Optimistic Updates**: Immediate UI feedback
|
|
- **Caching**: Cache frequently accessed data
|
|
- **Debouncing**: Debounce search/input
|
|
|
|
---
|
|
|
|
## Technical Implementation
|
|
|
|
### Frontend Architecture
|
|
|
|
**Technology Stack**:
|
|
|
|
- **Framework**: React 18+ with TypeScript
|
|
- **Routing**: React Router v6
|
|
- **State Management**: React Query for server state, Zustand for client state
|
|
- **UI Components**: Custom component library (existing)
|
|
- **Forms**: React Hook Form with Zod validation
|
|
- **Styling**: Tailwind CSS with design tokens
|
|
- **Icons**: Lucide React
|
|
- **Charts**: Recharts or similar
|
|
- **Rich Text**: Tiptap or similar
|
|
|
|
**Component Structure**:
|
|
|
|
```
|
|
components/
|
|
admin/
|
|
layout/
|
|
AdminLayout.tsx
|
|
AdminSidebar.tsx
|
|
AdminHeader.tsx
|
|
AdminBreadcrumbs.tsx
|
|
dashboard/
|
|
DashboardStats.tsx
|
|
EconomicGraph.tsx
|
|
SupplyChainAnalysis.tsx
|
|
RecentActivity.tsx
|
|
organizations/
|
|
OrganizationList.tsx
|
|
OrganizationEditor.tsx
|
|
OrganizationTable.tsx
|
|
VerificationQueue.tsx
|
|
localization/
|
|
UITranslationEditor.tsx
|
|
DataTranslationEditor.tsx
|
|
TranslationKeyTree.tsx
|
|
TranslationStatusIndicator.tsx
|
|
content/
|
|
PageEditor.tsx
|
|
AnnouncementEditor.tsx
|
|
MediaLibrary.tsx
|
|
users/
|
|
UserList.tsx
|
|
UserEditor.tsx
|
|
ActivityLog.tsx
|
|
analytics/
|
|
AnalyticsDashboard.tsx
|
|
ChartComponents.tsx
|
|
settings/
|
|
SettingsForm.tsx
|
|
IntegrationConfig.tsx
|
|
```
|
|
|
|
**Routing Structure**:
|
|
|
|
```typescript
|
|
/admin
|
|
/dashboard
|
|
/organizations
|
|
/new
|
|
/:id/edit
|
|
/verification
|
|
/localization
|
|
/ui
|
|
/data
|
|
/content
|
|
/pages
|
|
/announcements
|
|
/media
|
|
/users
|
|
/new
|
|
/:id/edit
|
|
/activity
|
|
/analytics
|
|
/organizations
|
|
/users
|
|
/matching
|
|
/reports
|
|
/settings
|
|
/general
|
|
/localization
|
|
/integrations
|
|
/email
|
|
/maintenance
|
|
```
|
|
|
|
### Backend Architecture
|
|
|
|
**API Endpoints Structure**:
|
|
|
|
```
|
|
/api/v1/admin/
|
|
/organizations
|
|
GET / # List with filters
|
|
POST / # Create
|
|
GET /:id # Get details
|
|
PUT /:id # Update
|
|
DELETE /:id # Delete
|
|
POST /:id/verify # Verify
|
|
POST /bulk-verify # Bulk verify
|
|
POST /export # Export
|
|
|
|
/localization
|
|
/ui
|
|
GET /:locale # Get UI translations
|
|
PUT /:locale/:key # Update translation
|
|
POST /:locale/bulk # Bulk update
|
|
POST /auto-translate # Auto-translate missing
|
|
GET /export # Export translations
|
|
POST /import # Import translations
|
|
/data
|
|
GET /:entityType # List entities
|
|
GET /:entityType/:id # Get entity translations
|
|
PUT /:entityType/:id # Update translations
|
|
POST /bulk-translate # Bulk translate
|
|
|
|
/content
|
|
/pages
|
|
GET / # List pages
|
|
POST / # Create page
|
|
GET /:id # Get page
|
|
PUT /:id # Update page
|
|
DELETE /:id # Delete page
|
|
/announcements
|
|
GET / # List
|
|
POST / # Create
|
|
PUT /:id # Update
|
|
DELETE /:id # Delete
|
|
/media
|
|
GET / # List media
|
|
POST /upload # Upload
|
|
DELETE /:id # Delete
|
|
|
|
/users
|
|
GET / # List users
|
|
POST / # Create user
|
|
GET /:id # Get user
|
|
PUT /:id # Update user
|
|
DELETE /:id # Delete user
|
|
GET /activity # Activity log
|
|
|
|
/analytics
|
|
GET /overview # Overview metrics
|
|
GET /organizations # Org analytics
|
|
GET /users # User analytics
|
|
GET /matching # Matching analytics
|
|
GET /reports # Generate report
|
|
|
|
/settings
|
|
GET /general # Get settings
|
|
PUT /general # Update settings
|
|
GET /localization # Get localization settings
|
|
PUT /localization # Update localization settings
|
|
POST /maintenance/backup # Create backup
|
|
POST /maintenance/cache/clear # Clear cache
|
|
```
|
|
|
|
**Middleware**:
|
|
|
|
- Authentication required for all admin routes
|
|
- Role check: Must be `admin` role
|
|
- Rate limiting for admin endpoints
|
|
- Audit logging for all admin actions
|
|
|
|
---
|
|
|
|
## API Requirements
|
|
|
|
### Authentication & Authorization
|
|
|
|
- All admin endpoints require JWT authentication
|
|
- Role-based access: Only users with `admin` role
|
|
- Audit logging for all admin actions
|
|
|
|
### Response Formats
|
|
|
|
- Consistent JSON response structure
|
|
- Error responses with proper HTTP status codes
|
|
- Pagination for list endpoints
|
|
- Filtering and sorting support
|
|
|
|
### Performance
|
|
|
|
- Pagination: Default 25 items, max 100
|
|
- Caching: Cache frequently accessed data
|
|
- Rate limiting: Prevent abuse
|
|
- Bulk operations: Support batch processing
|
|
|
|
### Data Validation
|
|
|
|
- Input validation on all endpoints
|
|
- Type checking
|
|
- Business rule validation
|
|
- Sanitization of user input
|
|
|
|
---
|
|
|
|
## Implementation Phases
|
|
|
|
### Phase 1: Foundation (Week 1-2)
|
|
|
|
- Admin layout and navigation
|
|
- Dashboard with basic metrics
|
|
- Organization management (enhance existing)
|
|
- User management basics
|
|
|
|
### Phase 2: Localization (Week 3-4)
|
|
|
|
- UI translation management
|
|
- Data translation management
|
|
- Translation tools and bulk operations
|
|
- Import/export functionality
|
|
|
|
### Phase 3: Content Management (Week 5-6)
|
|
|
|
- Static page management
|
|
- Announcement system
|
|
- Media library
|
|
- Rich text editing
|
|
|
|
### Phase 4: Analytics (Week 7-8)
|
|
|
|
- Analytics dashboard
|
|
- Charts and visualizations
|
|
- Reporting system
|
|
- Export functionality
|
|
|
|
### Phase 5: Settings & Polish (Week 9-10)
|
|
|
|
- System settings
|
|
- Integration management
|
|
- Email templates
|
|
- Maintenance tools
|
|
- UX improvements
|
|
- Testing and bug fixes
|
|
|
|
---
|
|
|
|
## Success Metrics
|
|
|
|
### Usability
|
|
|
|
- Task completion rate > 90%
|
|
- Average time to complete common tasks
|
|
- User satisfaction score
|
|
- Error rate < 5%
|
|
|
|
### Performance
|
|
|
|
- Page load time < 2 seconds
|
|
- API response time < 500ms (p95)
|
|
- Zero critical bugs in production
|
|
|
|
### Adoption
|
|
|
|
- Admin user engagement
|
|
- Feature usage statistics
|
|
- Support ticket reduction
|
|
|
|
---
|
|
|
|
## Future Enhancements
|
|
|
|
1. **Advanced Permissions**: Granular role-based permissions
|
|
2. **Workflow Automation**: Automated approval workflows
|
|
3. **AI-Powered Features**:
|
|
- Smart translation suggestions
|
|
- Content recommendations
|
|
- Anomaly detection
|
|
4. **Mobile App**: Native mobile admin app
|
|
5. **Custom Dashboards**: User-configurable dashboards
|
|
6. **Advanced Analytics**: Predictive analytics, ML insights
|
|
7. **Multi-tenancy**: Support for multiple organizations/instances
|
|
8. **API Management**: Admin API for third-party integrations
|
|
|
|
---
|
|
|
|
## Conclusion
|
|
|
|
This admin panel concept provides a comprehensive, user-friendly interface for managing all aspects of the "Turash" ecosystem. The design prioritizes efficiency, usability, and maintainability while providing powerful features for content and localization management.
|
|
|
|
The phased implementation approach allows for iterative development and early value delivery, while the modular architecture ensures scalability and extensibility for future needs.
|