| Dimension | Shared | Only in A | Only in B | Overlap |
|---|---|---|---|---|
| Sections | 0 | 5 | 6 | 0% |
| Commands | 0 | 0 | 0 | — |
| Section tags | 1 | 0 | 3 | 25% |
What each file covers
Sections
0 shared · 5 only in A · 6 only in B- − NOWCRM Architecture
- − Tech Stack
- − app Structure
- − library Structure
- − Key Principles
- + Code Style Guidelines
- + Formatting Standards
- + Naming Conventions
- + Function Structure
- + Comments
- + Error Handling
Commands
neither file has anySection tags
1 shared · 0 only in A · 3 only in B- + lint-format
- + code-style
- + docs
- architecture
Line diff
nowtec/nowCRM · .cursor/rules/architecture.mdc
@@ −1 @@
1---
2description: NOWCRM architecture overview - monorepo structure, tech stack, and development principles
3globs: []
4alwaysApply: true
5---
6
7# NOWCRM Architecture
8
9## Tech Stack
10- **Frontend**: React 19, TypeScript, NextJs 15, ShadCN components
11- **Backend**: Nodejs, PostgreSQL, Redis, Rabbitmq
12- **Monorepo**: pnpm workspace with docker composer
13
14## app Structure
15```
16./
17├── nowcrm/ # Nextjs front app
18├── dal/ # Orchestrates heavy asynchronous or bulk operations using BullMQ.
19├── composer/ # Handles content generation, channel dispatch, and AWS SES event ingestion. |
20├── journeys/ # Manages automated multi-step marketing journeys.
21└── strapi/ # Headless CMS used as the universal data backend, authentication layer, and admin panel.
22```
23
24## library Structure
25```
26./
27├── services/ # Handle types, services which talks withs strapi and common functions
28```
29
30## Key Principles
31- **Functional components only** (no classes)
32- **Named exports only** (no default exports)
33- **Types over interfaces** (except for extending third-party)
34- **String literals over enums**
35- **No 'any' type allowed**
36- **Event handlers over useEffect** for state updates
nowtec/nowCRM · .cursor/rules/code-style.mdc
@@ +1 @@
1---
2description: Code style guidelines for NOWCRM
3globs:
4alwaysApply: true
5---
6# Code Style Guidelines
7
8## Formatting Standards
9- **Prettier**: 2-space indentation, single quotes, trailing commas, semicolons
10- **Print width**: 80 characters
11- **ESLint**: No unused imports, consistent import ordering, prefer const over let
12
13## Naming Conventions
14```typescript
15// ✅ Variables and functions - camelCase
16const userAccountBalance = 1000;
17const calculateMonthlyPayment = () => {};
18
19// ✅ Constants - SCREAMING_SNAKE_CASE
20const API_ROUTES_STRAPI = {
21 USERS: 'users',
22 CONTATs: 'contacts',
23} as const;
24
25// ✅ Types and Classes - PascalCase
26class UserService {}
27type UserAccountData = {};
28type ButtonProps = {}; // Component props suffix with 'Props'
29
30// ✅ Files and directories - kebab-case
31// user-profile.component.tsx
32// user-profile.styles.ts
33```
34
35## Function Structure
36```typescript
37// ✅ Small, focused functions
38// ✅ Required parameters first, optional last
39const processUserData = (
40 user: User,
41 options: ProcessingOptions,
42 callback?: (result: ProcessedUser) => void
43): ProcessedUser => {
44 const processedUser = transformUserData(user);
45 applyOptions(processedUser, options);
46
47 if (callback) {
48 callback(processedUser);
49 }
50
51 return processedUser;
52};
53```
54
55## Comments
56```typescript
57// ✅ Explain business logic and non-obvious intentions
58// Apply 15% discount for premium users with orders > $100
59const discount = isPremiumUser && orderTotal > 100 ? 0.15 : 0;
60
61// TODO: Replace with proper authentication service
62const isAuthenticated = localStorage.getItem('token') !== null;
63
64/**
65 * JSDoc for public APIs
66 * @param basePrice - The base price before modifications
67 * @returns The final price after tax and discount
68 */
69const calculateTotalPrice = (basePrice: number): number => {
70 // Implementation
71};
72```
73
74## Error Handling
75```typescript
76// ✅ Proper error types and meaningful messages
77try {
78 const user = await userService.findById(userId);
79 if (!user) {
80 throw new UserNotFoundError(`User with ID ${userId} not found`);
81 }
82 return user;
83} catch (error) {
84 logger.error('Failed to fetch user', { userId, error });
85 throw error;
86}
87```
@@ −1 +1 @@
11 ---
2−description: NOWCRM architecture overview - monorepo structure, tech stack, and development principles
3−globs: []
2+description: Code style guidelines for NOWCRM
3+globs:
44 alwaysApply: true
55 ---
6+# Code Style Guidelines
67
7−# NOWCRM Architecture
8+## Formatting Standards
9+- **Prettier**: 2-space indentation, single quotes, trailing commas, semicolons
10+- **Print width**: 80 characters
11+- **ESLint**: No unused imports, consistent import ordering, prefer const over let
812
9−## Tech Stack
10−- **Frontend**: React 19, TypeScript, NextJs 15, ShadCN components
11−- **Backend**: Nodejs, PostgreSQL, Redis, Rabbitmq
12−- **Monorepo**: pnpm workspace with docker composer
13+## Naming Conventions
14+```typescript
15+// ✅ Variables and functions - camelCase
16+const userAccountBalance = 1000;
17+const calculateMonthlyPayment = () => {};
1318
14−## app Structure
19+// ✅ Constants - SCREAMING_SNAKE_CASE
20+const API_ROUTES_STRAPI = {
21+ USERS: 'users',
22+ CONTATs: 'contacts',
23+} as const;
24+
25+// ✅ Types and Classes - PascalCase
26+class UserService {}
27+type UserAccountData = {};
28+type ButtonProps = {}; // Component props suffix with 'Props'
29+
30+// ✅ Files and directories - kebab-case
31+// user-profile.component.tsx
32+// user-profile.styles.ts
1533 ```
16−./
17−├── nowcrm/ # Nextjs front app
18−├── dal/ # Orchestrates heavy asynchronous or bulk operations using BullMQ.
19−├── composer/ # Handles content generation, channel dispatch, and AWS SES event ingestion. |
20−├── journeys/ # Manages automated multi-step marketing journeys.
21−└── strapi/ # Headless CMS used as the universal data backend, authentication layer, and admin panel.
34+
35+## Function Structure
36+```typescript
37+// ✅ Small, focused functions
38+// ✅ Required parameters first, optional last
39+const processUserData = (
40+ user: User,
41+ options: ProcessingOptions,
42+ callback?: (result: ProcessedUser) => void
43+): ProcessedUser => {
44+ const processedUser = transformUserData(user);
45+ applyOptions(processedUser, options);
46+
47+ if (callback) {
48+ callback(processedUser);
49+ }
50+
51+ return processedUser;
52+};
2253 ```
2354
24−## library Structure
55+## Comments
56+```typescript
57+// ✅ Explain business logic and non-obvious intentions
58+// Apply 15% discount for premium users with orders > $100
59+const discount = isPremiumUser && orderTotal > 100 ? 0.15 : 0;
60+
61+// TODO: Replace with proper authentication service
62+const isAuthenticated = localStorage.getItem('token') !== null;
63+
64+/**
65+ * JSDoc for public APIs
66+ * @param basePrice - The base price before modifications
67+ * @returns The final price after tax and discount
68+ */
69+const calculateTotalPrice = (basePrice: number): number => {
70+ // Implementation
71+};
2572 ```
26−./
27−├── services/ # Handle types, services which talks withs strapi and common functions
28−```
2973
30−## Key Principles
31−- **Functional components only** (no classes)
32−- **Named exports only** (no default exports)
33−- **Types over interfaces** (except for extending third-party)
34−- **String literals over enums**
35−- **No 'any' type allowed**
36−- **Event handlers over useEffect** for state updates
74+## Error Handling
75+```typescript
76+// ✅ Proper error types and meaningful messages
77+try {
78+ const user = await userService.findById(userId);
79+ if (!user) {
80+ throw new UserNotFoundError(`User with ID ${userId} not found`);
81+ }
82+ return user;
83+} catch (error) {
84+ logger.error('Failed to fetch user', { userId, error });
85+ throw error;
86+}
87+```
