Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/CollatzConjecture/nestjs-clean-architecture
/ functions
Functions
156 in github.com/CollatzConjecture/nestjs-clean-architecture
⨍
Functions
156
◇
Types & classes
114
↓ 29 callers
Method
logger
(message: any, context?: Context)
src/application/services/logger.service.ts:11
↓ 18 callers
Method
success
* Create a successful response
src/application/services/response.service.ts:16
↓ 12 callers
Method
findById
(id: string, withPassword?: boolean)
src/domain/interfaces/repositories/auth-repository.interface.ts:5
↓ 12 callers
Method
update
(id: string, user: Partial<AuthUser>)
src/domain/interfaces/repositories/auth-repository.interface.ts:8
↓ 10 callers
Method
create
(user: Partial<AuthUser>)
src/domain/interfaces/repositories/auth-repository.interface.ts:4
↓ 10 callers
Method
error
* Create an error response
src/application/services/response.service.ts:23
↓ 10 callers
Method
get
()
src/api/controllers/hello.controller.ts:23
↓ 9 callers
Method
findByAuthId
(authId: string)
src/domain/interfaces/repositories/profile-repository.interface.ts:7
↓ 8 callers
Method
validateAge
* Business Logic: Validate age * @param age - Age to validate
src/domain/services/profile-domain.service.ts:148
↓ 8 callers
Method
warning
(message: any, context: Context)
src/application/services/logger.service.ts:35
↓ 7 callers
Method
validateLastname
* Business Logic: Validate lastname * @param lastname - Lastname to validate
src/domain/services/profile-domain.service.ts:138
↓ 7 callers
Method
validateName
* Business Logic: Validate name * @param name - Name to validate
src/domain/services/profile-domain.service.ts:128
↓ 7 callers
Method
withRequest
* Create response with request context
src/application/services/response.service.ts:53
↓ 6 callers
Method
canActivate
(context: ExecutionContext)
src/application/auth/guards/roles.guard.ts:10
↓ 6 callers
Function
createMockExecutionContext
(request: any)
src/application/__test__/roles.guard.spec.ts:83
↓ 6 callers
Method
generateProfileId
* Business Logic: Generate profile ID * @returns Generated profile ID
src/domain/services/profile-domain.service.ts:158
↓ 6 callers
Function
isAdminCallback
(data: unknown, ctx: ExecutionContext)
src/application/__test__/current-user.decorator.spec.ts:21
↓ 6 callers
Method
isProfileComplete
* Business Logic: Check if profile is complete * @param profile - Profile to check
src/domain/services/profile-domain.service.ts:104
↓ 6 callers
Method
retrieved
( data: T, message = 'Resource retrieved successfully', )
src/application/services/response.service.ts:80
↓ 6 callers
Method
validateProfileUpdate
* Business Logic: Validate profile update data before persistence * @param existingProfile - Current profile data * @param updates - Updates to
src/domain/services/profile-domain.service.ts:47
↓ 5 callers
Method
createProfileEntity
* Business Logic: Create profile entity with business validation * @param profileData - Profile creation data * @returns Profile entity ready fo
src/domain/services/profile-domain.service.ts:22
↓ 5 callers
Method
err
(message: any, context: Context)
src/application/services/logger.service.ts:23
↓ 5 callers
Method
find
()
src/application/services/profile.service.ts:42
↓ 5 callers
Method
findByEmail
(email: string, includePassword?: boolean)
src/domain/interfaces/repositories/auth-repository.interface.ts:6
↓ 4 callers
Method
canCreateProfile
* Business Logic: Validate if profile can be created * @param existingProfile - Profile data from repository (passed by application layer)
src/domain/services/profile-domain.service.ts:13
↓ 4 callers
Method
created
* Common success responses
src/application/services/response.service.ts:62
↓ 4 callers
Method
findByRole
(role: Role)
src/domain/interfaces/repositories/profile-repository.interface.ts:9
↓ 4 callers
Method
generateUserId
* Business Logic: Generate user ID * @returns Generated user ID
src/domain/services/auth-domain.service.ts:192
↓ 3 callers
Method
canCreateUser
* Business Logic: Validate if user can be created * @param existingUser - Existing user check result (passed by application layer)
src/domain/services/auth-domain.service.ts:80
↓ 3 callers
Method
canUpdateProfile
* Business Logic: Check if profile can be updated * @param profile - Profile to update * @param requestingUserId - User requesting the update
src/domain/services/profile-domain.service.ts:76
↓ 3 callers
Method
delete
(id: string)
src/domain/interfaces/repositories/auth-repository.interface.ts:9
↓ 3 callers
Method
generateTokens
(auth: AuthUser)
src/application/services/auth.service.ts:269
↓ 3 callers
Method
isEmailValid
* Business Logic: Validate email format * @param email - Email to validate
src/domain/services/auth-domain.service.ts:143
↓ 3 callers
Method
updated
( data?: T, message = 'Resource updated successfully', )
src/application/services/response.service.ts:69
↓ 2 callers
Function
Roles
(...roles: Role[])
src/application/auth/decorators/roles.decorator.ts:5
↓ 2 callers
Method
badRequest
( message = 'Bad request', code = 'BAD_REQUEST', details?: any, )
src/application/services/response.service.ts:111
↓ 2 callers
Function
createBlindIndex
(text: string)
src/infrastructure/models/auth.model.ts:45
↓ 2 callers
Function
currentUserCallback
( data: unknown, ctx: ExecutionContext, )
src/application/__test__/current-user.decorator.spec.ts:5
↓ 2 callers
Function
currentUserIdCallback
( data: unknown, ctx: ExecutionContext, )
src/application/__test__/current-user.decorator.spec.ts:13
↓ 2 callers
Method
deleted
(message = 'Resource deleted successfully')
src/application/services/response.service.ts:76
↓ 2 callers
Method
execute
(command: CreateAuthUserCommand)
src/application/auth/command/handler/create-auth-user.handler.ts:21
↓ 2 callers
Method
findAll
()
src/domain/interfaces/repositories/profile-repository.interface.ts:8
↓ 2 callers
Method
findOrCreateGoogleUser
(profile: any)
src/application/services/auth.service.ts:361
↓ 2 callers
Method
forbidden
( message = 'Access forbidden', code = 'AUTHORIZATION_ERROR', )
src/application/services/response.service.ts:104
↓ 2 callers
Method
internalError
( message = 'Internal server error', code = 'INTERNAL_ERROR', )
src/application/services/response.service.ts:126
↓ 2 callers
Method
isPasswordValid
* Business Logic: Validate password strength * @param password - Password to validate
src/domain/services/auth-domain.service.ts:119
↓ 2 callers
Method
notFound
* Common error responses
src/application/services/response.service.ts:90
↓ 2 callers
Method
register
(registerDto: RegisterAuthDto)
src/application/services/auth.service.ts:46
↓ 2 callers
Method
save
()
src/infrastructure/models/profile.model.ts:45
↓ 2 callers
Method
unauthorized
( message = 'Unauthorized access', code = 'AUTHENTICATION_ERROR', )
src/application/services/response.service.ts:97
↓ 2 callers
Method
updateMyProfile
( updates: Partial<Profile>, requestingUserId: string, )
src/application/services/profile.service.ts:60
↓ 2 callers
Method
validateProfileUpdateData
* Business Logic: Validate profile update data * @param updates - Updates to validate
src/domain/services/profile-domain.service.ts:88
↓ 2 callers
Method
validateUserCreation
* Business Logic: Validate user creation data * @param userData - User data to validate
src/domain/services/auth-domain.service.ts:152
↓ 2 callers
Method
validationError
( details: any, message = 'Validation failed', )
src/application/services/response.service.ts:119
↓ 1 callers
Function
bootstrap
()
src/main.ts:22
↓ 1 callers
Method
deleteByAuthId
(authId: string)
src/application/services/auth.service.ts:411
↓ 1 callers
Function
encrypt
(text: string)
src/infrastructure/models/auth.model.ts:10
↓ 1 callers
Method
findByGoogleId
(googleId: string)
src/domain/interfaces/repositories/auth-repository.interface.ts:7
↓ 1 callers
Method
handleGoogleRedirect
(code: string, state: string, storedState: string)
src/application/services/auth.service.ts:314
↓ 1 callers
Method
initiateGoogleAuth
()
src/application/services/auth.service.ts:297
↓ 1 callers
Method
paginated
* Create a paginated response
src/application/services/response.service.ts:30
↓ 1 callers
Method
removeRefreshToken
(userId: string)
src/domain/interfaces/repositories/auth-repository.interface.ts:10
↓ 1 callers
Method
use
(req: any, res: any, next: any)
src/application/middlewere/logger.middleware.ts:13
↓ 1 callers
Method
userExistsForDeletion
* Business Logic: Check if user exists for deletion (used in compensation actions) * @param user - User data from repository (passed by application
src/domain/services/auth-domain.service.ts:102
↓ 1 callers
Method
validatePasswordChangeData
* Business Logic: Validate password change data
src/domain/services/auth-domain.service.ts:129
↓ 1 callers
Method
validateProfileData
* Business Logic: Validate profile data * @param profileData - Profile data to validate
src/domain/services/profile-domain.service.ts:112
↓ 1 callers
Method
validateUser
(email: string, pass: string)
src/application/services/auth.service.ts:112
Method
canDeleteUser
* Business Logic: Validate if user can be deleted * @param user - User to delete * @param requestingUserId - User requesting deletion * @para
src/domain/services/auth-domain.service.ts:90
Method
canPerformAdminActions
* Business Logic: Check if user can perform admin actions * @param user - User to check
src/domain/services/auth-domain.service.ts:72
Method
catch
(exception: unknown, host: ArgumentsHost)
src/application/filters/api-exception.filter.ts:16
Method
changePassword
( userId: string, oldPassword: string, newPassword: string, )
src/application/services/auth.service.ts:173
Method
changePassword
(@CurrentUserId() userId: string, @Body() dto: ChangePasswordDto)
src/api/controllers/auth.controller.ts:89
Method
check
()
src/infrastructure/health/health.controller.ts:9
Method
check
()
src/infrastructure/health/terminus-options.check.ts:18
Method
configure
(consumer: MiddlewareConsumer)
src/app.module.ts:51
Method
constructor
( @Inject(AUTH_MODEL_PROVIDER) private readonly authModel: Model<Auth>, )
src/infrastructure/repository/auth.repository.ts:10
Method
constructor
( @Inject(PROFILE_MODEL_PROVIDER) private readonly profileModel: Model<ProfileModel>, @Inject(AUTH_MOD
src/infrastructure/repository/profile.repository.ts:12
Method
constructor
(profile: ProfileModel | any)
src/infrastructure/models/profile.model.ts:27
Method
constructor
(private readonly terminusOptionsService: TerminusOptionsService)
src/infrastructure/health/health.controller.ts:6
Method
constructor
( private readonly health: HealthCheckService, private readonly http: HttpHealthIndicator, private
src/infrastructure/health/terminus-options.check.ts:11
Method
constructor
()
src/application/auth/jwt.strategy.ts:9
Method
constructor
(private readonly authService: AuthService)
src/application/auth/google.strategy.ts:13
Method
constructor
(private readonly authService: AuthService)
src/application/auth/local.strategy.ts:8
Method
constructor
(private reflector: Reflector)
src/application/auth/guards/roles.guard.ts:8
Method
constructor
( public readonly registerAuthDto: RegisterAuthDto, public readonly authId: string, public readonl
src/application/auth/command/create-auth-user.command.ts:4
Method
constructor
( public readonly authId: string, public readonly profileId: string, )
src/application/auth/command/delete-auth-user.command.ts:2
Method
constructor
( @Inject('IAuthRepository') private readonly authRepository: IAuthRepository, private readonly ev
src/application/auth/command/handler/create-auth-user.handler.ts:13
Method
constructor
( @Inject('IAuthRepository') private readonly authRepository: IAuthRepository, @Inject('IProfileRe
src/application/auth/command/handler/delete-auth-user.handler.ts:14
Method
constructor
( public readonly authId: string, public readonly profileId: string, public readonly name: string,
src/application/auth/events/auth-user-created.event.ts:2
Method
constructor
( public readonly authId: string, public readonly profileId: string, )
src/application/auth/events/auth-user-deleted.event.ts:2
Method
constructor
( public readonly profileId: string, public readonly authId: string, public readonly n
src/application/profile/command/create-profile.command.ts:2
Method
constructor
( @Inject('IProfileRepository') private readonly profileRepository: IProfileRepository, private re
src/application/profile/command/handler/create-profile.handler.ts:12
Method
constructor
( public readonly authId: string, public readonly profileId: string, public readonly e
src/application/profile/events/profile-creation-failed.event.ts:2
Method
constructor
(private readonly responseService: ResponseService)
src/application/interceptors/response.interceptor.ts:14
Method
constructor
( private readonly commandBus: CommandBus, @Inject('IAuthRepository') private readonly authReposit
src/application/services/auth.service.ts:34
Method
constructor
( @Inject('IProfileRepository') private readonly repository: IProfileRepository, private readonly
src/application/services/profile.service.ts:12
Method
constructor
(private readonly loggerService: LoggerService)
src/application/middlewere/logger.middleware.ts:11
Method
constructor
(private readonly responseService: ResponseService)
src/application/filters/api-exception.filter.ts:14
Method
constructor
( private readonly profileService: ProfileService, private readonly responseService: ResponseService,
src/api/controllers/profile.controller.ts:41
Method
constructor
( private readonly logger: LoggerService, private readonly responseService: ResponseService )
src/api/controllers/hello.controller.ts:15
next →
1–100 of 156, ranked by callers