# Core Modules

### **HTTP Module**

* **http.module.ts**: The main module for handling HTTP logic.
* **auth.module.ts**: Contains authentication logic, with `auth.controller.ts` managing authentication endpoints.
* **profile.module.ts**: Handles profile-related functionality, with `profile.controller.ts` managing user profiles.
* **user.module.ts**: Manages user data and includes `user.service.ts` for user management.

***

### D**atabase Module**

* **database.module.ts**: Responsible for managing database connections and queries.

### P**erformance Module**

* **performance.module.ts**: Optimizes performance through various middlewares like compression and response-time tracking.
* **compression.service.ts**, **morgan.service.ts**, **response-time.service.ts**: Individual services for performance enhancements.

***

### Se**curity Module**

* **security.module.ts**: Manages application security with guards like `captcha.guard.ts` and `csrf.guard.ts`.
* **cors-config.service.ts**, **helmet-config.service.ts**, **rate-limit-config.service.ts**: Services responsible for security configurations.
* **captcha-config.service.ts** and **csrf-config.service.ts**: Specific services for handling CAPTCHA and CSRF security measures.

***

### Services <a href="#services" id="services"></a>

Each module has its own services that encapsulate the business logic. Notable services include:

Exemple :&#x20;

* **user.service.ts**: Provides user-related operations like creation, updates, and retrieval.
* **dynamic-modules-loader.service.ts**: Dynamically loads submodules and components at runtime.
* **performance-service-impl.ts**: Implements performance-related optimizations.
* **security-service-impl.ts**: Implements security measures like CSRF, rate-limiting, and CORS.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gruntsass.gitbook.io/template-api-nodejs/nodejs/premium-template-rest-api/core-modules.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
