Initial commit: Meshkee dashboards monorepo.

Includes business, customer, and super-admin apps with shared packages and production deploy scripts.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-07-22 13:48:53 +03:30
co-authored by Cursor
commit f566387c61
509 changed files with 62690 additions and 0 deletions
+84
View File
@@ -0,0 +1,84 @@
import type { Category } from '../types/category'
export const initialCategories: Category[] = [
{
id: '1',
nameEn: 'Software & Apps',
nameFa: 'نرم‌افزار و اپلیکیشن',
description: 'Digital software, mobile and desktop applications.',
variationCount: 0,
parentId: null,
},
{
id: '2',
nameEn: 'Mobile Apps',
nameFa: 'اپلیکیشن موبایل',
description: 'iOS and Android applications.',
variationCount: 0,
parentId: '1',
},
{
id: '3',
nameEn: 'Desktop Software',
nameFa: 'نرم‌افزار دسکتاپ',
description: 'Windows, macOS and Linux software.',
variationCount: 0,
parentId: '1',
},
{
id: '4',
nameEn: 'Digital Downloads',
nameFa: 'دانلودهای دیجیتال',
description: 'Instant downloadable digital products.',
variationCount: 0,
parentId: null,
},
{
id: '5',
nameEn: 'E-books & Courses',
nameFa: 'کتاب الکترونیکی و دوره‌ها',
description: 'Online learning materials and digital books.',
variationCount: 0,
parentId: null,
},
{
id: '6',
nameEn: 'Templates & Assets',
nameFa: 'قالب‌ها و دارایی‌ها',
description: 'Design templates, graphics and digital assets.',
variationCount: 0,
parentId: null,
},
{
id: '7',
nameEn: 'Subscriptions',
nameFa: 'اشتراک‌ها',
description: 'Recurring digital subscription services.',
variationCount: 0,
parentId: null,
},
{
id: '8',
nameEn: 'Gaming',
nameFa: 'بازی',
description: 'Digital games and gaming content.',
variationCount: 0,
parentId: null,
},
{
id: '9',
nameEn: 'PC Games',
nameFa: 'بازی‌های کامپیوتر',
description: 'Games for Windows, macOS and Linux.',
variationCount: 0,
parentId: '8',
},
{
id: '10',
nameEn: 'Console Games',
nameFa: 'بازی‌های کنسول',
description: 'PlayStation, Xbox and Nintendo games.',
variationCount: 0,
parentId: '8',
},
]
@@ -0,0 +1,9 @@
export function formatCommentDate(iso: string): string {
return new Date(iso).toLocaleString('en-US', {
year: 'numeric',
month: 'short',
day: 'numeric',
hour: '2-digit',
minute: '2-digit',
})
}
+43
View File
@@ -0,0 +1,43 @@
import type { ProductVariant } from '../types/productVariant'
import { buildVariantLabel } from '../types/productVariant'
import { DEFAULT_VARIATIONS } from '../types/variation'
function makeVariant(
id: string,
color: string,
capacity: string,
guarantee: string,
): ProductVariant {
const selections = [
{ attributeId: 'default-color', attributeName: 'Color', optionId: `opt-color-${color}`, value: color },
{ attributeId: 'default-capacity', attributeName: 'Capacity', optionId: `opt-capacity-${capacity}`, value: capacity },
{ attributeId: 'default-guarantee', attributeName: 'Guarantee', optionId: `opt-guarantee-${guarantee}`, value: guarantee },
]
return {
id,
selections,
label: buildVariantLabel(selections),
}
}
const seeded: Record<string, ProductVariant[]> = {
'1': [
makeVariant('v-1-1', 'Red', '128GB', '1 Year'),
makeVariant('v-1-2', 'Blue', '256GB', '2 Years'),
],
'3': [makeVariant('v-3-1', 'Black', '64GB', '1 Year')],
'5': [
makeVariant('v-5-1', 'Silver', '128GB', '2 Years'),
makeVariant('v-5-2', 'Gold', '256GB', '2 Years'),
makeVariant('v-5-3', 'Navy', '512GB', '1 Year'),
],
'13': [makeVariant('v-13-1', 'Red', '64GB', '1 Year')],
}
export function getInitialProductVariants(): Record<string, ProductVariant[]> {
return { ...seeded }
}
export function getProductAttributes() {
return DEFAULT_VARIATIONS
}
+44
View File
@@ -0,0 +1,44 @@
import type { Product } from '../types/product'
export const PRODUCT_IMAGE = '/product-template.png'
const catalog: Omit<Product, 'id' | 'image' | 'thumbnail' | 'commentCount'>[] = [
{ nameEn: 'iPhone 15 Pro Digital', nameFa: 'آیفون ۱۵ پرو دیجیتال', categoryId: '2', category: 'Mobile Apps', summary: 'Premium mobile digital product license.', description: '<p>Full digital access to iPhone 15 Pro features and assets.</p>', images: [PRODUCT_IMAGE], tags: ['mobile', 'premium'], status: 'active' },
{ nameEn: 'Samsung Galaxy Bundle', nameFa: 'بسته سامسونگ گلکسی', categoryId: '2', category: 'Mobile Apps', summary: 'Complete Samsung Galaxy digital bundle.', description: '<p>Includes apps, themes and exclusive digital content.</p>', images: [PRODUCT_IMAGE], tags: ['samsung', 'bundle'], status: 'active' },
{ nameEn: 'MacBook Pro License', nameFa: 'لایسنس مک‌بوک پرو', categoryId: '3', category: 'Desktop Software', summary: 'Professional desktop software license.', description: '<p>Desktop tools and utilities for creative professionals.</p>', images: [PRODUCT_IMAGE], tags: ['desktop', 'pro'], status: 'active' },
{ nameEn: 'Wireless Earbuds Pro', nameFa: 'هدفون بی‌سیم پرو', categoryId: '4', category: 'Digital Downloads', summary: 'Digital audio companion package.', description: '<p>Sound profiles, presets and companion app access.</p>', images: [PRODUCT_IMAGE], tags: ['audio'], status: 'active' },
{ nameEn: 'Smart Watch Ultra', nameFa: 'ساعت هوشمند اولترا', categoryId: '4', category: 'Digital Downloads', summary: 'Smartwatch digital asset pack.', description: '<p>Watch faces, widgets and fitness tracking modules.</p>', images: [PRODUCT_IMAGE], tags: ['wearable'], status: 'active' },
{ nameEn: 'Gaming Console Pack', nameFa: 'بسته کنسول بازی', categoryId: '10', category: 'Console Games', summary: 'Console gaming content bundle.', description: '<p>Digital games and DLC for console platforms.</p>', images: [PRODUCT_IMAGE], tags: ['gaming', 'console'], status: 'active' },
{ nameEn: '4K Monitor Asset', nameFa: 'دارایی مانیتور ۴ک', categoryId: '6', category: 'Templates & Assets', summary: 'Display calibration and UI assets.', description: '<p>4K display templates and calibration tools.</p>', images: [PRODUCT_IMAGE], tags: ['display'], status: 'draft' },
{ nameEn: 'Mechanical Keyboard Kit', nameFa: 'کیت کیبورد مکانیکی', categoryId: '4', category: 'Digital Downloads', summary: 'Keyboard customization digital kit.', description: '<p>Layouts, macros and RGB profiles.</p>', images: [PRODUCT_IMAGE], tags: ['keyboard'], status: 'active' },
{ nameEn: 'Portable SSD 2TB', nameFa: 'اس‌اس‌دی پرتابل ۲ ترابایت', categoryId: '4', category: 'Digital Downloads', summary: 'Cloud storage management suite.', description: '<p>Backup tools and sync utilities.</p>', images: [PRODUCT_IMAGE], tags: ['storage'], status: 'active' },
{ nameEn: 'Tablet Pro Subscription', nameFa: 'اشتراک تبلت پرو', categoryId: '7', category: 'Subscriptions', summary: 'Monthly tablet productivity suite.', description: '<p>Apps and cloud features for tablet users.</p>', images: [PRODUCT_IMAGE], tags: ['subscription'], status: 'active' },
{ nameEn: 'Action Camera HD', nameFa: 'دوربین اکشن اچ‌دی', categoryId: '4', category: 'Digital Downloads', summary: 'Video editing presets for action cam.', description: '<p>LUTs, transitions and export profiles.</p>', images: [PRODUCT_IMAGE], tags: ['video'], status: 'active' },
{ nameEn: 'Bluetooth Speaker Mini', nameFa: 'اسپیکر بلوتوث مینی', categoryId: '4', category: 'Digital Downloads', summary: 'Audio enhancement digital pack.', description: '<p>EQ presets and companion app features.</p>', images: [PRODUCT_IMAGE], tags: ['speaker'], status: 'active' },
{ nameEn: 'Pro Photo Editor', nameFa: 'ویرایشگر حرفه‌ای عکس', categoryId: '1', category: 'Software & Apps', summary: 'Professional photo editing software.', description: '<p>Advanced editing tools and filters.</p>', images: [PRODUCT_IMAGE], tags: ['photo', 'editor'], status: 'active' },
{ nameEn: 'Space Quest Game', nameFa: 'بازی ماجراجویی فضایی', categoryId: '9', category: 'PC Games', summary: 'Epic space adventure game.', description: '<p>Explore galaxies in this digital download.</p>', images: [PRODUCT_IMAGE], tags: ['game', 'space'], status: 'active' },
{ nameEn: 'JavaScript Mastery eBook', nameFa: 'کتاب جاوااسکریپت پیشرفته', categoryId: '5', category: 'E-books & Courses', summary: 'Complete JS learning guide.', description: '<p>From basics to advanced patterns.</p>', images: [PRODUCT_IMAGE], tags: ['ebook', 'javascript'], status: 'active' },
{ nameEn: 'UI Kit Template Pack', nameFa: 'بسته قالب رابط کاربری', categoryId: '6', category: 'Templates & Assets', summary: 'Modern UI component library.', description: '<p>Figma and code-ready components.</p>', images: [PRODUCT_IMAGE], tags: ['ui', 'template'], status: 'draft' },
{ nameEn: 'VPN Pro Subscription', nameFa: 'اشتراک وی‌پی‌ان حرفه‌ای', categoryId: '7', category: 'Subscriptions', summary: 'Secure VPN annual plan.', description: '<p>Privacy and security for all devices.</p>', images: [PRODUCT_IMAGE], tags: ['vpn', 'security'], status: 'active' },
{ nameEn: 'Music Stream Premium', nameFa: 'پخش موسیقی پریمیوم', categoryId: '7', category: 'Subscriptions', summary: 'Unlimited music streaming.', description: '<p>Ad-free listening across platforms.</p>', images: [PRODUCT_IMAGE], tags: ['music'], status: 'active' },
{ nameEn: 'Cloud Storage 1TB', nameFa: 'فضای ابری ۱ ترابایت', categoryId: '4', category: 'Digital Downloads', summary: '1TB cloud storage plan.', description: '<p>Sync and share files anywhere.</p>', images: [PRODUCT_IMAGE], tags: ['cloud'], status: 'active' },
{ nameEn: 'Mobile Fitness App', nameFa: 'اپلیکیشن تناسب اندام', categoryId: '2', category: 'Mobile Apps', summary: 'Workout and nutrition tracker.', description: '<p>Personalized fitness programs.</p>', images: [PRODUCT_IMAGE], tags: ['fitness', 'health'], status: 'active' },
{ nameEn: '3D Icon Bundle', nameFa: 'بسته آیکون سه‌بعدی', categoryId: '6', category: 'Templates & Assets', summary: 'Premium 3D icon collection.', description: '<p>PNG and SVG formats included.</p>', images: [PRODUCT_IMAGE], tags: ['icons', '3d'], status: 'draft' },
{ nameEn: 'Console Racing Game', nameFa: 'بازی مسابقه‌ای کنسول', categoryId: '10', category: 'Console Games', summary: 'High-speed racing experience.', description: '<p>Tracks, cars and multiplayer modes.</p>', images: [PRODUCT_IMAGE], tags: ['racing', 'game'], status: 'active' },
{ nameEn: 'Video Editing Course', nameFa: 'دوره تدوین ویدیو', categoryId: '5', category: 'E-books & Courses', summary: 'Learn professional video editing.', description: '<p>Step-by-step video tutorials.</p>', images: [PRODUCT_IMAGE], tags: ['course', 'video'], status: 'active' },
{ nameEn: 'Desktop Antivirus Pro', nameFa: 'آنتی‌ویروس دسکتاپ', categoryId: '3', category: 'Desktop Software', summary: 'Complete system protection.', description: '<p>Real-time threat detection and removal.</p>', images: [PRODUCT_IMAGE], tags: ['security', 'antivirus'], status: 'active' },
]
export const dummyProducts: Product[] = catalog.map((item, index) => ({
id: String(index + 1),
...item,
image: PRODUCT_IMAGE,
thumbnail: PRODUCT_IMAGE,
commentCount: [3, 12, 0, 7, 24, 5, 1, 18, 9, 0, 14, 6, 21, 4, 11, 2, 8, 16, 0, 13, 7, 19, 3, 10][index] ?? 0,
}))
export const PRODUCTS_PER_PAGE = 12
export function getProductById(id: string): Product | undefined {
return dummyProducts.find((p) => p.id === id)
}