open-index/open-npm huggingface dataset:
npm package: @iyyafi/svelte-package
Description: testing svelte lib
Author: Iyyafi Qolbi
Latest version: 0.0.2

# create-svelte

Everything you need to build a Svelte library, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).

Read more about creating a library [in the docs](https://svelte.dev/docs/kit/packaging).

## Creating a project

If you're seeing this, you've probably already done this step. Congrats!

```bash
# create a new project in the current directory
npx sv create

# create a new project in my-app
npx sv create my-app
```

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

Everything inside `src/lib` is part of your library, everything inside `src/routes` can be used as a showcase or preview app.

## Building

To build your library:

```bash
npm run package
```

To create a production version of your showcase app:

```bash
npm run build
```

You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.

## Publishing

Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)).

To publish your library to [npm](https://www.npmjs.com):

```bash
npm publish
```
npm package: @izaher-dev/auth
Description: A **clean-architecture-based authentication library** for Angular applications.
Author: Ibrahim Zaher
Latest version: 1.0.6

# Auth Library

A **clean-architecture-based authentication library** for Angular applications.

---

## Installation

```bash
npm install @izaher-dev/auth
```

## Setup

### Dependency Injection

To configure and inject the library in your Angular project, you can use one of the following methods:

#### 1. Using `bootstrapApplication` (Standalone Components)

```ts
import { bootstrapApplication } from '@angular/platform-browser';
import { App } from './app.component';
import { AUTH_PROVIDERS, API_CONFIG } from '@izaher-dev/auth';

bootstrapApplication(App, {
  providers: [
    ...AUTH_PROVIDERS,
    { provide: API_CONFIG, useValue: { baseUrl: 'https://api.example.com/' } },
  ],
});
```

#### 1. 2. Using `NgModule` (Traditional Module-based App)

```ts
import { NgModule } from '@angular/core';
import { AUTH_PROVIDERS, API_CONFIG } from '@izaher-dev/auth';

@NgModule({
  providers: [
    ...AUTH_PROVIDERS,
    { provide: API_CONFIG, useValue: { baseUrl: 'https://api.example.com/' } },
  ],
})
export class AppModule {}
```

## Usage

### Using Individual UseCases

```ts
import { LoginUsecaseService, RegisterUsecaseService } from '@izaher-dev/auth';

constructor(private loginUsecase: LoginUsecaseService) {}

this.loginUsecase.execute({ email, password }).subscribe(...);

```

## Layers

### Domain

- **Models**
  - UserModel
  - AuthModel
  - ProfileModel
  - MessageModel
  - StatusModel
  - PasswordModel
- **AuthRepo interface**
- **UseCases:**
  - LoginUsecaseService
  - RegisterUsecaseService
  - ChangePasswordUsecaseService
  - LogoutUsecaseService
  - DeleteMeUsecaseService
  - EditProfileUsecaseService
  - ForgetPasswordUsecaseService
  - ResetPasswordUsecaseService
  - VerifyResetCodeUsecaseService
  - ProfileDataUsecaseService

### Data

- **DTOs:** `auth-req.dto.ts`, `auth-res.dto.ts`
- **API Service:** `AuthApiService`
- **Repository Implementation:** `AuthApiRepo`
- **Adaptors:** `AuthApiAdaptor`
- **Endpoints:** `AuthApiEndPoint`

---

## DTOs

### Request DTOs

- LoginRequest
- RegisterRequest
- ChangePasswordReq
- EditProfileReq
- ForgetPasswordReq
- ResetPasswordReq
- VerifyResetCodeReq

### Response DTOs

- LoginResponse
- RegisterResponse
- ChangePasswordRes
- DeleteMeRes
- LogOutRes
- ProfileDataRes
- EditProfileRes
- ForgetPasswordRes
- ResetPasswordRes
- VerifyResetCodeRes

---

## Notes

- Use Angular Dependency Injection for repository and API config.
- Errors are propagated via Observable errors; optionally handle them with interceptors.
- Endpoints are centralized in `AuthApiEndPoint`.

---

## License

MIT