Rename Forte to LunarFront, generalize for any small business

Rebrand from Forte (music-store-specific) to LunarFront (any small business):
- Package namespace @forte/* → @lunarfront/*
- Database forte/forte_test → lunarfront/lunarfront_test
- Docker containers, volumes, connection strings
- UI branding, localStorage keys, test emails
- All documentation and planning docs

Generalize music-specific terminology:
- instrumentDescription → itemDescription
- instrumentCount → itemCount
- instrumentType → itemCategory (on service templates)
- New migration 0027_generalize_terminology for column renames
- Seed data updated with generic examples
- RBAC descriptions updated
This commit is contained in:
Ryan Moon
2026-03-30 08:51:54 -05:00
parent 535446696c
commit 9400828f62
84 changed files with 390 additions and 820 deletions

View File

@@ -20,8 +20,8 @@ import type {
TaxExemptionCreateInput,
TaxExemptionUpdateInput,
PaginationInput,
} from '@forte/shared/schemas'
import { isMinor, normalizeStateCode } from '@forte/shared/utils'
} from '@lunarfront/shared/schemas'
import { isMinor, normalizeStateCode } from '@lunarfront/shared/utils'
import {
withPagination,
withSort,

View File

@@ -7,7 +7,7 @@ import type {
SupplierCreateInput,
SupplierUpdateInput,
PaginationInput,
} from '@forte/shared/schemas'
} from '@lunarfront/shared/schemas'
import {
withPagination,
withSort,

View File

@@ -7,7 +7,7 @@ import {
SYSTEM_UNIT_STATUSES,
SYSTEM_ITEM_CONDITIONS,
} from '../db/schema/lookups.js'
import type { LookupCreateInput, LookupUpdateInput } from '@forte/shared/schemas'
import type { LookupCreateInput, LookupUpdateInput } from '@lunarfront/shared/schemas'
function createLookupService(
table: typeof inventoryUnitStatuses | typeof itemConditions,

View File

@@ -8,7 +8,7 @@ import type {
InventoryUnitCreateInput,
InventoryUnitUpdateInput,
PaginationInput,
} from '@forte/shared/schemas'
} from '@lunarfront/shared/schemas'
import {
withPagination,
withSort,

View File

@@ -1,6 +1,6 @@
import { eq, and, inArray, count, type Column } from 'drizzle-orm'
import type { PostgresJsDatabase } from 'drizzle-orm/postgres-js'
import type { PaginationInput } from '@forte/shared/schemas'
import type { PaginationInput } from '@lunarfront/shared/schemas'
import { permissions, roles, rolePermissions, userRoles } from '../db/schema/rbac.js'
import { SYSTEM_PERMISSIONS, DEFAULT_ROLES } from '../db/seeds/rbac.js'
import { ForbiddenError } from '../lib/errors.js'

View File

@@ -18,7 +18,7 @@ import type {
RepairServiceTemplateCreateInput,
RepairServiceTemplateUpdateInput,
PaginationInput,
} from '@forte/shared/schemas'
} from '@lunarfront/shared/schemas'
import {
withPagination,
withSort,
@@ -59,7 +59,7 @@ export const RepairTicketService = {
locationId: input.locationId,
repairBatchId: input.repairBatchId,
inventoryUnitId: input.inventoryUnitId,
instrumentDescription: input.instrumentDescription,
itemDescription: input.itemDescription,
serialNumber: input.serialNumber,
conditionIn: input.conditionIn,
conditionInNotes: input.conditionInNotes,
@@ -101,7 +101,7 @@ export const RepairTicketService = {
repairTickets.ticketNumber,
repairTickets.customerName,
repairTickets.customerPhone,
repairTickets.instrumentDescription,
repairTickets.itemDescription,
repairTickets.serialNumber,
])
if (search) conditions.push(search)
@@ -151,7 +151,7 @@ export const RepairTicketService = {
async listByBatch(db: PostgresJsDatabase<any>, batchId: string, params: PaginationInput) {
const baseWhere = eq(repairTickets.repairBatchId, batchId)
const searchCondition = params.q
? buildSearchCondition(params.q, [repairTickets.ticketNumber, repairTickets.customerName, repairTickets.instrumentDescription])
? buildSearchCondition(params.q, [repairTickets.ticketNumber, repairTickets.customerName, repairTickets.itemDescription])
: undefined
const where = searchCondition ? and(baseWhere, searchCondition) : baseWhere
@@ -292,7 +292,7 @@ export const RepairBatchService = {
contactEmail: input.contactEmail,
pickupDate: input.pickupDate ? new Date(input.pickupDate) : undefined,
dueDate: input.dueDate ? new Date(input.dueDate) : undefined,
instrumentCount: input.instrumentCount,
itemCount: input.itemCount,
notes: input.notes,
})
.returning()
@@ -391,7 +391,7 @@ export const RepairServiceTemplateService = {
.insert(repairServiceTemplates)
.values({
name: input.name,
instrumentType: input.instrumentType,
itemCategory: input.itemCategory,
size: input.size,
description: input.description,
itemType: input.itemType,
@@ -406,13 +406,13 @@ export const RepairServiceTemplateService = {
async list(db: PostgresJsDatabase<any>, params: PaginationInput) {
const baseWhere = eq(repairServiceTemplates.isActive, true)
const searchCondition = params.q
? buildSearchCondition(params.q, [repairServiceTemplates.name, repairServiceTemplates.instrumentType, repairServiceTemplates.size, repairServiceTemplates.description])
? buildSearchCondition(params.q, [repairServiceTemplates.name, repairServiceTemplates.itemCategory, repairServiceTemplates.size, repairServiceTemplates.description])
: undefined
const where = searchCondition ? and(baseWhere, searchCondition) : baseWhere
const sortableColumns: Record<string, Column> = {
name: repairServiceTemplates.name,
instrument_type: repairServiceTemplates.instrumentType,
item_category: repairServiceTemplates.itemCategory,
default_price: repairServiceTemplates.defaultPrice,
sort_order: repairServiceTemplates.sortOrder,
created_at: repairServiceTemplates.createdAt,

View File

@@ -5,7 +5,7 @@ import { userRoles } from '../db/schema/rbac.js'
import type { StorageProvider } from '../storage/index.js'
import { randomUUID } from 'crypto'
import { withPagination, withSort, buildSearchCondition, paginatedResponse } from '../utils/pagination.js'
import type { PaginationInput } from '@forte/shared/schemas'
import type { PaginationInput } from '@lunarfront/shared/schemas'
const MAX_PARENT_DEPTH = 50

View File

@@ -3,7 +3,7 @@ import type { PostgresJsDatabase } from 'drizzle-orm/postgres-js'
import { vaultConfig, vaultCategories, vaultCategoryPermissions, vaultEntries } from '../db/schema/vault.js'
import { userRoles } from '../db/schema/rbac.js'
import { withPagination, withSort, buildSearchCondition, paginatedResponse } from '../utils/pagination.js'
import type { PaginationInput } from '@forte/shared/schemas'
import type { PaginationInput } from '@lunarfront/shared/schemas'
import { randomBytes, createCipheriv, createDecipheriv, pbkdf2Sync } from 'crypto'
import bcrypt from 'bcrypt'