# Core Initialization

## Main

The core initialization is responsible for unifying all mandarine modules (*Core*, *MVC*, *Security*, *Data*) into one as it handles some of the most important tasks inside the framework such as:

* Dependency Initialization
* Controllers' initialization
* Templates' initialization
* Repositories' proxy connector
* Initialization of *entity manager*
  * Responsible for handling the use of data source&#x73;*.*

The core initialization is also responsible for creating a bridge between Mandarine's internal core & Mandarine's MVC Core.

## Usage

In order to invoke the initialization of Mandarine's core, this is what you would have to do.

```typescript
import { MandarineCore } from "https://deno.land/x/mandarinets/mod.ts";

/**
 * Code
 */
 
 new MandarineCore();
```

## Single entry-point file

The single entry point file serves as an index for all your Mandarine-powered components as well as modules that are not written in *Mandarine* but are required in certain sections of your Mandarine-powered application.

{% tabs %}
{% tab title="Syntax example" %}

```typescript
import { MandarineCore } from "https://deno.land/x/mandarinets/mod.ts";

const services = [/* Unitialized Instances / Classes */];
const middleware = [/* Unitialized Instances / Classes */];
const repositories = [/* Unitialized Instances / Classes */];
const configurations = [/* Unitialized Instances / Classes */];
const components = [/* Unitialized Instances / Classes */];
const otherModules = [/* Unitialized Instances / Classes */];

new MandarineCore();
```

{% endtab %}
{% endtabs %}

**Note** that you *should not* pass initialized instances in the entry-point variables as shown above, you should only pass the reference.

## MVC Bridge

If your application is a Mandarine's web MVC application, you would start it like this:

```typescript
import { MandarineCore } from "https://deno.land/x/mandarinets/mod.ts";

/**
 * Code
 * Or Single entry-point File
 */
 
 new MandarineCore().MVC().run();
```

{% hint style="info" %}
For more information on how to initialize a Mandarine-powered application with multiple file references or a Mandarine-powered *web application* [click here](https://mandarineframework.gitbook.io/mandarine-ts/mandarine-mvc/launching-web-app#single-entry-point-file)
{% endhint %}
