Initial commit: Meshkee CMS API

NestJS backend with Prisma, Docker Compose for Postgres/Redis, and deploy docs for the production VM.
This commit is contained in:
Ali Reza
2026-07-21 17:52:36 +03:30
commit bb59d5e9ba
254 changed files with 37031 additions and 0 deletions
@@ -0,0 +1,60 @@
import type { BusinessPrimaryColorId } from './business-primary-colors';
import { DEFAULT_BUSINESS_PRIMARY_COLOR_ID } from './business-primary-colors';
export type BrandingSettings = {
primaryColor: BusinessPrimaryColorId;
};
export type DashboardCommentsSettings = {
autoApprove: boolean;
};
export type DashboardExpertReviewsSettings = {
autoApprove: boolean;
};
/** Per-business dashboard settings. Add new sections here as the CMS grows. */
export type DashboardSettings = {
comments: DashboardCommentsSettings;
expertReviews: DashboardExpertReviewsSettings;
};
export type OrderProcessStep = {
id: string;
label: string;
color: string;
};
/** Per-business store / sales settings. */
export type StoreSettings = {
onlineSellEnabled: boolean;
orderProcessSteps: OrderProcessStep[];
};
/** Top-level business settings stored in `businesses.settings` JSONB. */
export type BusinessSettings = {
branding: BrandingSettings;
dashboard: DashboardSettings;
store: StoreSettings;
};
export const DEFAULT_ORDER_PROCESS_STEPS: OrderProcessStep[] = [
{ id: 'processing', label: 'Under processing', color: '#3B82F6' },
{ id: 'ready-for-shipping', label: 'Ready for shipping', color: '#F59E0B' },
{ id: 'shipped', label: 'Shipped', color: '#8B5CF6' },
{ id: 'delivered', label: 'Delivered', color: '#22C55E' },
];
export const DEFAULT_BUSINESS_SETTINGS: BusinessSettings = {
branding: {
primaryColor: DEFAULT_BUSINESS_PRIMARY_COLOR_ID,
},
dashboard: {
comments: { autoApprove: false },
expertReviews: { autoApprove: false },
},
store: {
onlineSellEnabled: true,
orderProcessSteps: DEFAULT_ORDER_PROCESS_STEPS,
},
};