| Dimension | Shared | Only in A | Only in B | Overlap |
|---|---|---|---|---|
| Sections | 0 | 6 | 5 | 0% |
| Commands | 0 | 0 | 0 | — |
| Section tags | 1 | 3 | 0 | 25% |
What each file covers
Sections
0 shared · 6 only in A · 5 only in B- − Code Style Guidelines
- − Formatting Standards
- − Naming Conventions
- − Function Structure
- − Comments
- − Error Handling
- + NOWCRM Architecture
- + Tech Stack
- + app Structure
- + library Structure
- + Key Principles
Commands
neither file has anySection tags
1 shared · 3 only in A · 0 only in B- − lint-format
- − code-style
- − docs
- architecture
Line diff
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```
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
@@ −1 +1 @@
11 ---
2−description: Code style guidelines for NOWCRM
3−globs:
2+description: NOWCRM architecture overview - monorepo structure, tech stack, and development principles
3+globs: []
44 alwaysApply: true
55 ---
6−# Code Style Guidelines
76
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
7+# NOWCRM Architecture
128
13−## Naming Conventions
14−```typescript
15−// ✅ Variables and functions - camelCase
16−const userAccountBalance = 1000;
17−const calculateMonthlyPayment = () => {};
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
1813
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
14+## app Structure
3315 ```
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−};
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.
5322 ```
5423
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−};
24+## library Structure
7225 ```
73−
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−}
26+./
27+├── services/ # Handle types, services which talks withs strapi and common functions
8728 ```
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
