teamshare-bridge 0.22.7 → 0.22.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +383 -383
- package/dist/bridge/daemon.js +43 -20
- package/dist/bridge/daemon.js.map +1 -1
- package/dist/bridge/install-verify.js +8 -8
- package/dist/bridge/spawn.d.ts +14 -0
- package/dist/bridge/spawn.js +7 -1
- package/dist/bridge/spawn.js.map +1 -1
- package/dist/bridge/wake-handler.d.ts +8 -15
- package/dist/bridge/wake-handler.js +109 -14
- package/dist/bridge/wake-handler.js.map +1 -1
- package/dist/bridge/wake-outbox.js +7 -0
- package/dist/bridge/wake-outbox.js.map +1 -1
- package/dist/cli/commands/plan.js +4 -0
- package/dist/cli/commands/plan.js.map +1 -1
- package/dist/lib/browser/human-input-guard.js +98 -98
- package/dist/lib/browser/screen-change.js +60 -60
- package/dist/lib/llm/usage-reader.js +4 -4
- package/dist/lib/workspace/classify.d.ts +29 -0
- package/dist/lib/workspace/classify.js +62 -0
- package/dist/lib/workspace/classify.js.map +1 -1
- package/dist/lib/workspace/presence.d.ts +31 -0
- package/dist/lib/workspace/presence.js +35 -1
- package/dist/lib/workspace/presence.js.map +1 -1
- package/dist/lib/workspace/shim-runner.js +23 -0
- package/dist/lib/workspace/shim-runner.js.map +1 -1
- package/package.json +70 -70
- package/skills/THIRD_PARTY_NOTICES.md +26 -26
- package/skills/architect/LICENSE +21 -21
- package/skills/codebase-design/LICENSE +21 -21
- package/skills/diagnosing-bugs/LICENSE +21 -21
- package/skills/domain-modeling/LICENSE +21 -21
- package/skills/improve-codebase-architecture/LICENSE +21 -21
- package/skills/recover/LICENSE +21 -21
- package/skills/review/LICENSE +21 -21
- package/skills/tdd/LICENSE +21 -21
- package/skills/teamshare-auth-rbac/SKILL.md +78 -78
- package/skills/teamshare-cdd/SKILL.md +205 -205
- package/skills/teamshare-modularity/SKILL.md +146 -146
- package/skills/teamshare-orchestrator-ask/SKILL.md +77 -77
- package/skills/teamshare-scaffold/SKILL.md +116 -116
- package/templates/backend/.env.example.tpl +13 -13
- package/templates/backend/nest-cli.json.tpl +8 -8
- package/templates/backend/package.json.tpl +41 -41
- package/templates/backend/prisma/schema.prisma.tpl +39 -39
- package/templates/backend/src/app.module.ts.tpl +24 -24
- package/templates/backend/src/common/filters/all-exceptions.filter.ts.tpl +59 -59
- package/templates/backend/src/common/guards/jwt-auth.guard.ts.tpl +27 -27
- package/templates/backend/src/common/guards/rbac.guard.ts.tpl +48 -48
- package/templates/backend/src/common/interceptors/transform.interceptor.ts.tpl +44 -44
- package/templates/backend/src/common/pipes/zod-validation.pipe.ts.tpl +29 -29
- package/templates/backend/src/common/swagger/envelope.schemas.ts.tpl +53 -53
- package/templates/backend/src/common/swagger/error.schemas.ts.tpl +62 -62
- package/templates/backend/src/main.ts.tpl +27 -27
- package/templates/backend/src/modules/example/example.controller.ts.tpl +102 -102
- package/templates/backend/src/modules/example/example.dto.ts.tpl +14 -14
- package/templates/backend/src/modules/example/example.module.ts.tpl +10 -10
- package/templates/backend/src/modules/example/example.service.ts.tpl +45 -45
- package/templates/backend/tsconfig.json.tpl +26 -26
- package/templates/common/.gitignore.tpl +42 -42
- package/templates/common/AGENTS.md.tpl +58 -58
- package/templates/common/docs/adr/README.md +25 -25
- package/templates/common/docs/api-contract.md.tpl +72 -72
- package/templates/web/next.config.ts.tpl +7 -7
- package/templates/web/package.json.tpl +37 -37
- package/templates/web/src/app/globals.css.tpl +48 -48
- package/templates/web/src/app/layout.tsx.tpl +25 -25
- package/templates/web/src/components/shared/app-button.tsx.tpl +59 -59
- package/templates/web/src/components/shared/app-empty-state.tsx.tpl +39 -39
- package/templates/web/src/components/shared/app-list-toolbar.tsx.tpl +63 -63
- package/templates/web/src/components/shared/app-skeleton.tsx.tpl +14 -14
- package/templates/web/src/components/shared/app-table.tsx.tpl +128 -128
- package/templates/web/src/components/shared/index.ts.tpl +5 -5
- package/templates/web/src/hooks/use-list-state.ts.tpl +72 -72
- package/templates/web/src/hooks/use-url-tab.ts.tpl +25 -25
- package/templates/web/src/lib/api/client.ts.tpl +123 -123
- package/templates/web/src/lib/providers.tsx.tpl +35 -35
- package/templates/web/src/lib/query-keys.ts.tpl +21 -21
- package/templates/web/src/lib/utils.ts.tpl +7 -7
- package/templates/web/src/lib/validation/schemas.ts.tpl +15 -15
- package/templates/web/src/modules/example/views/example-list-view.tsx.tpl +97 -97
- package/templates/web/tsconfig.json.tpl +23 -23
- package/tools/workspace-arbitration-check.mjs +389 -389
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Controller,
|
|
3
|
-
Get,
|
|
4
|
-
Post,
|
|
5
|
-
Param,
|
|
6
|
-
Query,
|
|
7
|
-
Body,
|
|
8
|
-
ParseUUIDPipe,
|
|
9
|
-
} from "@nestjs/common";
|
|
10
|
-
import {
|
|
11
|
-
ApiTags,
|
|
12
|
-
ApiOperation,
|
|
13
|
-
ApiParam,
|
|
14
|
-
ApiQuery,
|
|
15
|
-
ApiBody,
|
|
16
|
-
ApiOkResponse,
|
|
17
|
-
ApiBearerAuth,
|
|
18
|
-
} from "@nestjs/swagger";
|
|
19
|
-
import { Permissions } from "../../common/decorators/permissions.decorator";
|
|
20
|
-
import { Public } from "../../common/decorators/public.decorator";
|
|
21
|
-
import { ZodValidationPipe } from "../../common/pipes/zod-validation.pipe";
|
|
22
|
-
import { successSchema, paginatedSchema } from "../../common/swagger/envelope.schemas";
|
|
23
|
-
import { errs } from "../../common/swagger/error.schemas";
|
|
24
|
-
import { ExampleService } from "./example.service";
|
|
25
|
-
import { CreateExampleSchema, ExampleQuerySchema } from "./example.dto";
|
|
26
|
-
|
|
27
|
-
@ApiTags("examples")
|
|
28
|
-
@ApiBearerAuth()
|
|
29
|
-
@Controller("examples")
|
|
30
|
-
export class ExampleController {
|
|
31
|
-
constructor(private readonly exampleService: ExampleService) {}
|
|
32
|
-
|
|
33
|
-
@Get()
|
|
34
|
-
@Public()
|
|
35
|
-
@ApiOperation({ summary: "List examples", description: "Retrieve a paginated list of examples" })
|
|
36
|
-
@ApiQuery({ name: "page", required: false, example: 1 })
|
|
37
|
-
@ApiQuery({ name: "limit", required: false, example: 20 })
|
|
38
|
-
@ApiQuery({ name: "search", required: false })
|
|
39
|
-
@ApiOkResponse({
|
|
40
|
-
description: "Paginated list of examples",
|
|
41
|
-
schema: paginatedSchema({
|
|
42
|
-
type: "object",
|
|
43
|
-
properties: {
|
|
44
|
-
id: { type: "string", format: "uuid" },
|
|
45
|
-
name: { type: "string" },
|
|
46
|
-
createdAt: { type: "string", format: "date-time" },
|
|
47
|
-
},
|
|
48
|
-
}),
|
|
49
|
-
})
|
|
50
|
-
@errs("INTERNAL_ERROR")
|
|
51
|
-
async list(
|
|
52
|
-
@Query(new ZodValidationPipe(ExampleQuerySchema, "query")) query: {
|
|
53
|
-
page: number;
|
|
54
|
-
limit: number;
|
|
55
|
-
search?: string;
|
|
56
|
-
}
|
|
57
|
-
) {
|
|
58
|
-
return this.exampleService.list(query);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
@Post()
|
|
62
|
-
@Permissions("example:create")
|
|
63
|
-
@ApiOperation({ summary: "Create example", description: "Create a new example" })
|
|
64
|
-
@ApiBody({ schema: { type: "object", properties: { name: { type: "string" } }, required: ["name"] } })
|
|
65
|
-
@ApiOkResponse({
|
|
66
|
-
description: "Created example",
|
|
67
|
-
schema: successSchema({
|
|
68
|
-
type: "object",
|
|
69
|
-
properties: {
|
|
70
|
-
id: { type: "string", format: "uuid" },
|
|
71
|
-
name: { type: "string" },
|
|
72
|
-
createdAt: { type: "string", format: "date-time" },
|
|
73
|
-
},
|
|
74
|
-
}),
|
|
75
|
-
})
|
|
76
|
-
@errs("BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "INTERNAL_ERROR")
|
|
77
|
-
async create(
|
|
78
|
-
@Body(new ZodValidationPipe(CreateExampleSchema)) body: { name: string }
|
|
79
|
-
) {
|
|
80
|
-
return this.exampleService.create(body);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
@Get(":id")
|
|
84
|
-
@Permissions("example:read")
|
|
85
|
-
@ApiOperation({ summary: "Get example", description: "Get an example by ID" })
|
|
86
|
-
@ApiParam({ name: "id", required: true })
|
|
87
|
-
@ApiOkResponse({
|
|
88
|
-
description: "Example details",
|
|
89
|
-
schema: successSchema({
|
|
90
|
-
type: "object",
|
|
91
|
-
properties: {
|
|
92
|
-
id: { type: "string", format: "uuid" },
|
|
93
|
-
name: { type: "string" },
|
|
94
|
-
createdAt: { type: "string", format: "date-time" },
|
|
95
|
-
},
|
|
96
|
-
}),
|
|
97
|
-
})
|
|
98
|
-
@errs("NOT_FOUND", "UNAUTHORIZED", "FORBIDDEN", "INTERNAL_ERROR")
|
|
99
|
-
async getOne(@Param("id", ParseUUIDPipe) id: string) {
|
|
100
|
-
return this.exampleService.getOne(id);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
Controller,
|
|
3
|
+
Get,
|
|
4
|
+
Post,
|
|
5
|
+
Param,
|
|
6
|
+
Query,
|
|
7
|
+
Body,
|
|
8
|
+
ParseUUIDPipe,
|
|
9
|
+
} from "@nestjs/common";
|
|
10
|
+
import {
|
|
11
|
+
ApiTags,
|
|
12
|
+
ApiOperation,
|
|
13
|
+
ApiParam,
|
|
14
|
+
ApiQuery,
|
|
15
|
+
ApiBody,
|
|
16
|
+
ApiOkResponse,
|
|
17
|
+
ApiBearerAuth,
|
|
18
|
+
} from "@nestjs/swagger";
|
|
19
|
+
import { Permissions } from "../../common/decorators/permissions.decorator";
|
|
20
|
+
import { Public } from "../../common/decorators/public.decorator";
|
|
21
|
+
import { ZodValidationPipe } from "../../common/pipes/zod-validation.pipe";
|
|
22
|
+
import { successSchema, paginatedSchema } from "../../common/swagger/envelope.schemas";
|
|
23
|
+
import { errs } from "../../common/swagger/error.schemas";
|
|
24
|
+
import { ExampleService } from "./example.service";
|
|
25
|
+
import { CreateExampleSchema, ExampleQuerySchema } from "./example.dto";
|
|
26
|
+
|
|
27
|
+
@ApiTags("examples")
|
|
28
|
+
@ApiBearerAuth()
|
|
29
|
+
@Controller("examples")
|
|
30
|
+
export class ExampleController {
|
|
31
|
+
constructor(private readonly exampleService: ExampleService) {}
|
|
32
|
+
|
|
33
|
+
@Get()
|
|
34
|
+
@Public()
|
|
35
|
+
@ApiOperation({ summary: "List examples", description: "Retrieve a paginated list of examples" })
|
|
36
|
+
@ApiQuery({ name: "page", required: false, example: 1 })
|
|
37
|
+
@ApiQuery({ name: "limit", required: false, example: 20 })
|
|
38
|
+
@ApiQuery({ name: "search", required: false })
|
|
39
|
+
@ApiOkResponse({
|
|
40
|
+
description: "Paginated list of examples",
|
|
41
|
+
schema: paginatedSchema({
|
|
42
|
+
type: "object",
|
|
43
|
+
properties: {
|
|
44
|
+
id: { type: "string", format: "uuid" },
|
|
45
|
+
name: { type: "string" },
|
|
46
|
+
createdAt: { type: "string", format: "date-time" },
|
|
47
|
+
},
|
|
48
|
+
}),
|
|
49
|
+
})
|
|
50
|
+
@errs("INTERNAL_ERROR")
|
|
51
|
+
async list(
|
|
52
|
+
@Query(new ZodValidationPipe(ExampleQuerySchema, "query")) query: {
|
|
53
|
+
page: number;
|
|
54
|
+
limit: number;
|
|
55
|
+
search?: string;
|
|
56
|
+
}
|
|
57
|
+
) {
|
|
58
|
+
return this.exampleService.list(query);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@Post()
|
|
62
|
+
@Permissions("example:create")
|
|
63
|
+
@ApiOperation({ summary: "Create example", description: "Create a new example" })
|
|
64
|
+
@ApiBody({ schema: { type: "object", properties: { name: { type: "string" } }, required: ["name"] } })
|
|
65
|
+
@ApiOkResponse({
|
|
66
|
+
description: "Created example",
|
|
67
|
+
schema: successSchema({
|
|
68
|
+
type: "object",
|
|
69
|
+
properties: {
|
|
70
|
+
id: { type: "string", format: "uuid" },
|
|
71
|
+
name: { type: "string" },
|
|
72
|
+
createdAt: { type: "string", format: "date-time" },
|
|
73
|
+
},
|
|
74
|
+
}),
|
|
75
|
+
})
|
|
76
|
+
@errs("BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "INTERNAL_ERROR")
|
|
77
|
+
async create(
|
|
78
|
+
@Body(new ZodValidationPipe(CreateExampleSchema)) body: { name: string }
|
|
79
|
+
) {
|
|
80
|
+
return this.exampleService.create(body);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@Get(":id")
|
|
84
|
+
@Permissions("example:read")
|
|
85
|
+
@ApiOperation({ summary: "Get example", description: "Get an example by ID" })
|
|
86
|
+
@ApiParam({ name: "id", required: true })
|
|
87
|
+
@ApiOkResponse({
|
|
88
|
+
description: "Example details",
|
|
89
|
+
schema: successSchema({
|
|
90
|
+
type: "object",
|
|
91
|
+
properties: {
|
|
92
|
+
id: { type: "string", format: "uuid" },
|
|
93
|
+
name: { type: "string" },
|
|
94
|
+
createdAt: { type: "string", format: "date-time" },
|
|
95
|
+
},
|
|
96
|
+
}),
|
|
97
|
+
})
|
|
98
|
+
@errs("NOT_FOUND", "UNAUTHORIZED", "FORBIDDEN", "INTERNAL_ERROR")
|
|
99
|
+
async getOne(@Param("id", ParseUUIDPipe) id: string) {
|
|
100
|
+
return this.exampleService.getOne(id);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
export const CreateExampleSchema = z.object({
|
|
4
|
-
name: z.string().min(1).max(200),
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
export const ExampleQuerySchema = z.object({
|
|
8
|
-
page: z.coerce.number().int().positive().default(1),
|
|
9
|
-
limit: z.coerce.number().int().positive().max(100).default(20),
|
|
10
|
-
search: z.string().optional(),
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
export type CreateExampleInput = z.infer<typeof CreateExampleSchema>;
|
|
14
|
-
export type ExampleQueryInput = z.infer<typeof ExampleQuerySchema>;
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
export const CreateExampleSchema = z.object({
|
|
4
|
+
name: z.string().min(1).max(200),
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
export const ExampleQuerySchema = z.object({
|
|
8
|
+
page: z.coerce.number().int().positive().default(1),
|
|
9
|
+
limit: z.coerce.number().int().positive().max(100).default(20),
|
|
10
|
+
search: z.string().optional(),
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export type CreateExampleInput = z.infer<typeof CreateExampleSchema>;
|
|
14
|
+
export type ExampleQueryInput = z.infer<typeof ExampleQuerySchema>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Module } from "@nestjs/common";
|
|
2
|
-
import { ExampleController } from "./example.controller";
|
|
3
|
-
import { ExampleService } from "./example.service";
|
|
4
|
-
|
|
5
|
-
@Module({
|
|
6
|
-
controllers: [ExampleController],
|
|
7
|
-
providers: [ExampleService],
|
|
8
|
-
exports: [ExampleService],
|
|
9
|
-
})
|
|
10
|
-
export class ExampleModule {}
|
|
1
|
+
import { Module } from "@nestjs/common";
|
|
2
|
+
import { ExampleController } from "./example.controller";
|
|
3
|
+
import { ExampleService } from "./example.service";
|
|
4
|
+
|
|
5
|
+
@Module({
|
|
6
|
+
controllers: [ExampleController],
|
|
7
|
+
providers: [ExampleService],
|
|
8
|
+
exports: [ExampleService],
|
|
9
|
+
})
|
|
10
|
+
export class ExampleModule {}
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { Injectable, NotFoundException } from "@nestjs/common";
|
|
2
|
-
import { PrismaService } from "../../prisma/prisma.service";
|
|
3
|
-
|
|
4
|
-
@Injectable()
|
|
5
|
-
export class ExampleService {
|
|
6
|
-
constructor(private readonly prisma: PrismaService) {}
|
|
7
|
-
|
|
8
|
-
async list(query: { page: number; limit: number; search?: string }) {
|
|
9
|
-
const where = query.search
|
|
10
|
-
? { name: { contains: query.search, mode: "insensitive" as const } }
|
|
11
|
-
: {};
|
|
12
|
-
|
|
13
|
-
const [data, total] = await Promise.all([
|
|
14
|
-
this.prisma.example.findMany({
|
|
15
|
-
where,
|
|
16
|
-
skip: (query.page - 1) * query.limit,
|
|
17
|
-
take: query.limit,
|
|
18
|
-
orderBy: { createdAt: "desc" },
|
|
19
|
-
}),
|
|
20
|
-
this.prisma.example.count({ where }),
|
|
21
|
-
]);
|
|
22
|
-
|
|
23
|
-
return {
|
|
24
|
-
data,
|
|
25
|
-
pagination: {
|
|
26
|
-
page: query.page,
|
|
27
|
-
limit: query.limit,
|
|
28
|
-
total,
|
|
29
|
-
totalPages: Math.ceil(total / query.limit),
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
async create(data: { name: string }) {
|
|
35
|
-
return this.prisma.example.create({ data });
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
async getOne(id: string) {
|
|
39
|
-
const example = await this.prisma.example.findUnique({ where: { id } });
|
|
40
|
-
if (!example) {
|
|
41
|
-
throw new NotFoundException("Example not found");
|
|
42
|
-
}
|
|
43
|
-
return example;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
1
|
+
import { Injectable, NotFoundException } from "@nestjs/common";
|
|
2
|
+
import { PrismaService } from "../../prisma/prisma.service";
|
|
3
|
+
|
|
4
|
+
@Injectable()
|
|
5
|
+
export class ExampleService {
|
|
6
|
+
constructor(private readonly prisma: PrismaService) {}
|
|
7
|
+
|
|
8
|
+
async list(query: { page: number; limit: number; search?: string }) {
|
|
9
|
+
const where = query.search
|
|
10
|
+
? { name: { contains: query.search, mode: "insensitive" as const } }
|
|
11
|
+
: {};
|
|
12
|
+
|
|
13
|
+
const [data, total] = await Promise.all([
|
|
14
|
+
this.prisma.example.findMany({
|
|
15
|
+
where,
|
|
16
|
+
skip: (query.page - 1) * query.limit,
|
|
17
|
+
take: query.limit,
|
|
18
|
+
orderBy: { createdAt: "desc" },
|
|
19
|
+
}),
|
|
20
|
+
this.prisma.example.count({ where }),
|
|
21
|
+
]);
|
|
22
|
+
|
|
23
|
+
return {
|
|
24
|
+
data,
|
|
25
|
+
pagination: {
|
|
26
|
+
page: query.page,
|
|
27
|
+
limit: query.limit,
|
|
28
|
+
total,
|
|
29
|
+
totalPages: Math.ceil(total / query.limit),
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
async create(data: { name: string }) {
|
|
35
|
+
return this.prisma.example.create({ data });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
async getOne(id: string) {
|
|
39
|
+
const example = await this.prisma.example.findUnique({ where: { id } });
|
|
40
|
+
if (!example) {
|
|
41
|
+
throw new NotFoundException("Example not found");
|
|
42
|
+
}
|
|
43
|
+
return example;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "commonjs",
|
|
4
|
-
"declaration": true,
|
|
5
|
-
"removeComments": true,
|
|
6
|
-
"emitDecoratorMetadata": true,
|
|
7
|
-
"experimentalDecorators": true,
|
|
8
|
-
"allowSyntheticDefaultImports": true,
|
|
9
|
-
"target": "ES2021",
|
|
10
|
-
"sourceMap": true,
|
|
11
|
-
"outDir": "./dist",
|
|
12
|
-
"baseUrl": "./",
|
|
13
|
-
"incremental": true,
|
|
14
|
-
"skipLibCheck": true,
|
|
15
|
-
"strictNullChecks": true,
|
|
16
|
-
"noImplicitAny": false,
|
|
17
|
-
"strictBindCallApply": false,
|
|
18
|
-
"forceConsistentCasingInFileNames": false,
|
|
19
|
-
"noFallthroughCasesInSwitch": false,
|
|
20
|
-
"paths": {
|
|
21
|
-
"@/*": ["src/*"]
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"include": ["src/**/*"],
|
|
25
|
-
"exclude": ["node_modules", "dist"]
|
|
26
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "commonjs",
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"removeComments": true,
|
|
6
|
+
"emitDecoratorMetadata": true,
|
|
7
|
+
"experimentalDecorators": true,
|
|
8
|
+
"allowSyntheticDefaultImports": true,
|
|
9
|
+
"target": "ES2021",
|
|
10
|
+
"sourceMap": true,
|
|
11
|
+
"outDir": "./dist",
|
|
12
|
+
"baseUrl": "./",
|
|
13
|
+
"incremental": true,
|
|
14
|
+
"skipLibCheck": true,
|
|
15
|
+
"strictNullChecks": true,
|
|
16
|
+
"noImplicitAny": false,
|
|
17
|
+
"strictBindCallApply": false,
|
|
18
|
+
"forceConsistentCasingInFileNames": false,
|
|
19
|
+
"noFallthroughCasesInSwitch": false,
|
|
20
|
+
"paths": {
|
|
21
|
+
"@/*": ["src/*"]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"include": ["src/**/*"],
|
|
25
|
+
"exclude": ["node_modules", "dist"]
|
|
26
|
+
}
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
# Dependencies
|
|
2
|
-
node_modules/
|
|
3
|
-
|
|
4
|
-
# Build output
|
|
5
|
-
dist/
|
|
6
|
-
.next/
|
|
7
|
-
out/
|
|
8
|
-
|
|
9
|
-
# Environment
|
|
10
|
-
.env
|
|
11
|
-
.env.local
|
|
12
|
-
.env.*.local
|
|
13
|
-
|
|
14
|
-
# IDE
|
|
15
|
-
.vscode/
|
|
16
|
-
.idea/
|
|
17
|
-
*.swp
|
|
18
|
-
*.swo
|
|
19
|
-
*~
|
|
20
|
-
|
|
21
|
-
# OS
|
|
22
|
-
.DS_Store
|
|
23
|
-
Thumbs.db
|
|
24
|
-
|
|
25
|
-
# Debug
|
|
26
|
-
npm-debug.log*
|
|
27
|
-
yarn-debug.log*
|
|
28
|
-
yarn-error.log*
|
|
29
|
-
|
|
30
|
-
# Prisma
|
|
31
|
-
prisma/migrations/
|
|
32
|
-
|
|
33
|
-
# TypeScript
|
|
34
|
-
*.tsbuildinfo
|
|
35
|
-
next-env.d.ts
|
|
36
|
-
|
|
37
|
-
# Logs
|
|
38
|
-
*.log
|
|
39
|
-
|
|
40
|
-
# Temp
|
|
41
|
-
tmp/
|
|
42
|
-
temp/
|
|
1
|
+
# Dependencies
|
|
2
|
+
node_modules/
|
|
3
|
+
|
|
4
|
+
# Build output
|
|
5
|
+
dist/
|
|
6
|
+
.next/
|
|
7
|
+
out/
|
|
8
|
+
|
|
9
|
+
# Environment
|
|
10
|
+
.env
|
|
11
|
+
.env.local
|
|
12
|
+
.env.*.local
|
|
13
|
+
|
|
14
|
+
# IDE
|
|
15
|
+
.vscode/
|
|
16
|
+
.idea/
|
|
17
|
+
*.swp
|
|
18
|
+
*.swo
|
|
19
|
+
*~
|
|
20
|
+
|
|
21
|
+
# OS
|
|
22
|
+
.DS_Store
|
|
23
|
+
Thumbs.db
|
|
24
|
+
|
|
25
|
+
# Debug
|
|
26
|
+
npm-debug.log*
|
|
27
|
+
yarn-debug.log*
|
|
28
|
+
yarn-error.log*
|
|
29
|
+
|
|
30
|
+
# Prisma
|
|
31
|
+
prisma/migrations/
|
|
32
|
+
|
|
33
|
+
# TypeScript
|
|
34
|
+
*.tsbuildinfo
|
|
35
|
+
next-env.d.ts
|
|
36
|
+
|
|
37
|
+
# Logs
|
|
38
|
+
*.log
|
|
39
|
+
|
|
40
|
+
# Temp
|
|
41
|
+
tmp/
|
|
42
|
+
temp/
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
# AGENTS.md - {{projectName}}
|
|
2
|
-
|
|
3
|
-
## What this is
|
|
4
|
-
|
|
5
|
-
{{description}}
|
|
6
|
-
|
|
7
|
-
## Tech stack
|
|
8
|
-
|
|
9
|
-
- **Frontend:** Next.js 16, React 19, TypeScript, Tailwind v4, shadcn, react-query v5, TanStack Table v8, react-hook-form, zod, next-auth v4, next-themes, socket.io-client
|
|
10
|
-
- **Backend:** NestJS 11, Prisma 6, zod, Swagger/OpenAPI, passport-jwt, argon2, socket.io
|
|
11
|
-
- **Database:** PostgreSQL
|
|
12
|
-
|
|
13
|
-
## Folder structure
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
{{slug}}/
|
|
17
|
-
├── frontend/ # Next.js web app
|
|
18
|
-
│ ├── src/
|
|
19
|
-
│ │ ├── app/ # App Router routes
|
|
20
|
-
│ │ ├── components/
|
|
21
|
-
│ │ │ ├── ui/ # Vendor primitives (shadcn) — do not edit
|
|
22
|
-
│ │ │ └── shared/# Shared wrappers (AppButton, AppTable, etc.)
|
|
23
|
-
│ │ ├── hooks/ # Custom React hooks
|
|
24
|
-
│ │ ├── lib/ # Utilities, API client, query keys, validation
|
|
25
|
-
│ │ └── modules/ # Feature modules (views, components, columns)
|
|
26
|
-
│ └── package.json
|
|
27
|
-
├── backend/ # NestJS API
|
|
28
|
-
│ ├── prisma/ # Schema + migrations
|
|
29
|
-
│ ├── src/
|
|
30
|
-
│ │ ├── common/ # Guards, filters, interceptors, pipes, swagger
|
|
31
|
-
│ │ ├── modules/ # Feature modules (controller, service, dto, module)
|
|
32
|
-
│ │ ├── generated/ # Prisma + zod generated output
|
|
33
|
-
│ │ └── main.ts
|
|
34
|
-
│ └── package.json
|
|
35
|
-
└── docs/ # Project documentation
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Build commands
|
|
39
|
-
|
|
40
|
-
| Command | Location | Description |
|
|
41
|
-
|---|---|---|
|
|
42
|
-
| `npm run dev` | frontend/ | Start Next.js dev server |
|
|
43
|
-
| `npm run build` | frontend/ | Build Next.js app |
|
|
44
|
-
| `npm run dev` | backend/ | Start NestJS dev server |
|
|
45
|
-
| `npm run build` | backend/ | Build NestJS app |
|
|
46
|
-
| `npx prisma generate` | backend/ | Regenerate Prisma client |
|
|
47
|
-
| `npx prisma migrate dev` | backend/ | Run migrations |
|
|
48
|
-
|
|
49
|
-
## Conventions
|
|
50
|
-
|
|
51
|
-
- Shared components use a consistent prefix (e.g., App*, or your own choice)
|
|
52
|
-
- Use `data-slot="app-*"` attribute on shared components for styling hooks
|
|
53
|
-
- Backend uses ZodValidationPipe for request validation
|
|
54
|
-
- All endpoints return `{ success: true, data }` envelope
|
|
55
|
-
- RBAC via `@Permissions()` decorator, `@Public()` for open routes
|
|
56
|
-
- Query keys live in `src/lib/query-keys.ts`
|
|
57
|
-
- Validation schemas live in `src/lib/validation/schemas.ts`
|
|
58
|
-
- Loading states: every query view has skeleton + error + empty state
|
|
1
|
+
# AGENTS.md - {{projectName}}
|
|
2
|
+
|
|
3
|
+
## What this is
|
|
4
|
+
|
|
5
|
+
{{description}}
|
|
6
|
+
|
|
7
|
+
## Tech stack
|
|
8
|
+
|
|
9
|
+
- **Frontend:** Next.js 16, React 19, TypeScript, Tailwind v4, shadcn, react-query v5, TanStack Table v8, react-hook-form, zod, next-auth v4, next-themes, socket.io-client
|
|
10
|
+
- **Backend:** NestJS 11, Prisma 6, zod, Swagger/OpenAPI, passport-jwt, argon2, socket.io
|
|
11
|
+
- **Database:** PostgreSQL
|
|
12
|
+
|
|
13
|
+
## Folder structure
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
{{slug}}/
|
|
17
|
+
├── frontend/ # Next.js web app
|
|
18
|
+
│ ├── src/
|
|
19
|
+
│ │ ├── app/ # App Router routes
|
|
20
|
+
│ │ ├── components/
|
|
21
|
+
│ │ │ ├── ui/ # Vendor primitives (shadcn) — do not edit
|
|
22
|
+
│ │ │ └── shared/# Shared wrappers (AppButton, AppTable, etc.)
|
|
23
|
+
│ │ ├── hooks/ # Custom React hooks
|
|
24
|
+
│ │ ├── lib/ # Utilities, API client, query keys, validation
|
|
25
|
+
│ │ └── modules/ # Feature modules (views, components, columns)
|
|
26
|
+
│ └── package.json
|
|
27
|
+
├── backend/ # NestJS API
|
|
28
|
+
│ ├── prisma/ # Schema + migrations
|
|
29
|
+
│ ├── src/
|
|
30
|
+
│ │ ├── common/ # Guards, filters, interceptors, pipes, swagger
|
|
31
|
+
│ │ ├── modules/ # Feature modules (controller, service, dto, module)
|
|
32
|
+
│ │ ├── generated/ # Prisma + zod generated output
|
|
33
|
+
│ │ └── main.ts
|
|
34
|
+
│ └── package.json
|
|
35
|
+
└── docs/ # Project documentation
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Build commands
|
|
39
|
+
|
|
40
|
+
| Command | Location | Description |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| `npm run dev` | frontend/ | Start Next.js dev server |
|
|
43
|
+
| `npm run build` | frontend/ | Build Next.js app |
|
|
44
|
+
| `npm run dev` | backend/ | Start NestJS dev server |
|
|
45
|
+
| `npm run build` | backend/ | Build NestJS app |
|
|
46
|
+
| `npx prisma generate` | backend/ | Regenerate Prisma client |
|
|
47
|
+
| `npx prisma migrate dev` | backend/ | Run migrations |
|
|
48
|
+
|
|
49
|
+
## Conventions
|
|
50
|
+
|
|
51
|
+
- Shared components use a consistent prefix (e.g., App*, or your own choice)
|
|
52
|
+
- Use `data-slot="app-*"` attribute on shared components for styling hooks
|
|
53
|
+
- Backend uses ZodValidationPipe for request validation
|
|
54
|
+
- All endpoints return `{ success: true, data }` envelope
|
|
55
|
+
- RBAC via `@Permissions()` decorator, `@Public()` for open routes
|
|
56
|
+
- Query keys live in `src/lib/query-keys.ts`
|
|
57
|
+
- Validation schemas live in `src/lib/validation/schemas.ts`
|
|
58
|
+
- Loading states: every query view has skeleton + error + empty state
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
# Architecture Decision Records
|
|
2
|
-
|
|
3
|
-
One file per decision, named `NNN-short-title.md` (e.g. `001-orm-choice.md`).
|
|
4
|
-
|
|
5
|
-
Format for each ADR:
|
|
6
|
-
|
|
7
|
-
```markdown
|
|
8
|
-
# ADR-NNN: <Title>
|
|
9
|
-
|
|
10
|
-
**Status:** proposed | accepted | superseded by ADR-MMM
|
|
11
|
-
**Date:** YYYY-MM-DD
|
|
12
|
-
|
|
13
|
-
## Context
|
|
14
|
-
What problem or force drove this decision?
|
|
15
|
-
|
|
16
|
-
## Decision
|
|
17
|
-
What was decided, stated plainly.
|
|
18
|
-
|
|
19
|
-
## Consequences
|
|
20
|
-
What becomes easier, what becomes harder, what must now be true.
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Write an ADR whenever a choice is expensive to reverse (ORM, validation
|
|
24
|
-
strategy, folder layout, auth model). Agents working in this repo should
|
|
25
|
-
read existing ADRs before proposing conflicting changes.
|
|
1
|
+
# Architecture Decision Records
|
|
2
|
+
|
|
3
|
+
One file per decision, named `NNN-short-title.md` (e.g. `001-orm-choice.md`).
|
|
4
|
+
|
|
5
|
+
Format for each ADR:
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# ADR-NNN: <Title>
|
|
9
|
+
|
|
10
|
+
**Status:** proposed | accepted | superseded by ADR-MMM
|
|
11
|
+
**Date:** YYYY-MM-DD
|
|
12
|
+
|
|
13
|
+
## Context
|
|
14
|
+
What problem or force drove this decision?
|
|
15
|
+
|
|
16
|
+
## Decision
|
|
17
|
+
What was decided, stated plainly.
|
|
18
|
+
|
|
19
|
+
## Consequences
|
|
20
|
+
What becomes easier, what becomes harder, what must now be true.
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Write an ADR whenever a choice is expensive to reverse (ORM, validation
|
|
24
|
+
strategy, folder layout, auth model). Agents working in this repo should
|
|
25
|
+
read existing ADRs before proposing conflicting changes.
|