feat: add domains, ideas, layouts, widgets API modules

- Add DomainsModule with full CRUD, search, and activity logging
- Add IdeasModule with quick capture endpoint
- Add LayoutsModule for user dashboard layouts
- Add WidgetsModule for widget definitions (read-only)
- Update ActivityService with domain/idea logging methods
- Register all new modules in AppModule
This commit is contained in:
Jason Woltje
2026-01-29 13:47:03 -06:00
parent 973502f26e
commit f47dd8bc92
66 changed files with 4277 additions and 29 deletions
@@ -0,0 +1,31 @@
import {
IsString,
IsOptional,
IsBoolean,
IsArray,
MinLength,
MaxLength,
IsObject,
} from "class-validator";
import { Layout } from "../types/widget.types";
/**
* DTO for creating a new user layout
*/
export class CreateLayoutDto {
@IsString({ message: "name must be a string" })
@MinLength(1, { message: "name must not be empty" })
@MaxLength(100, { message: "name must not exceed 100 characters" })
name!: string;
@IsOptional()
@IsBoolean({ message: "isDefault must be a boolean" })
isDefault?: boolean;
@IsArray({ message: "layout must be an array" })
layout!: Layout;
@IsOptional()
@IsObject({ message: "metadata must be an object" })
metadata?: Record<string, unknown>;
}
+2
View File
@@ -0,0 +1,2 @@
export { CreateLayoutDto } from "./create-layout.dto";
export { UpdateLayoutDto } from "./update-layout.dto";
@@ -0,0 +1,34 @@
import {
IsString,
IsOptional,
IsBoolean,
IsArray,
MinLength,
MaxLength,
IsObject,
} from "class-validator";
import { Layout } from "../types/widget.types";
/**
* DTO for updating an existing user layout
* All fields are optional to support partial updates
*/
export class UpdateLayoutDto {
@IsOptional()
@IsString({ message: "name must be a string" })
@MinLength(1, { message: "name must not be empty" })
@MaxLength(100, { message: "name must not exceed 100 characters" })
name?: string;
@IsOptional()
@IsBoolean({ message: "isDefault must be a boolean" })
isDefault?: boolean;
@IsOptional()
@IsArray({ message: "layout must be an array" })
layout?: Layout;
@IsOptional()
@IsObject({ message: "metadata must be an object" })
metadata?: Record<string, unknown>;
}