Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readme update #9

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 65 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,27 @@

## About this project

`ims-nest-api-starter` is a backend API starter template using [NestJS](https://nestjs.com/) and [MikroORM](https://mikro-orm.io/) designed for scalable applications. This starter includes authentication, authorization, user management, role management, and role/permission-based access. Additionally, with the added security layer of XSECURITY, your APIs are safeguarded against unauthorized access, ensuring enhanced protection for your system.
`ims-nest-api-starter` is a backend API starter template using [NestJS](https://nestjs.com/), [PostgreSQL](https://www.postgresql.org/), [Redis](https://redis.io/) and [MikroORM](https://mikro-orm.io/) designed for scalable applications.

### Key Features

- **Authentication**: JWT-based token authentication for secure access.
- **Authorization**: Role- and permission-based access control to manage user privileges.
- **Caching Support**: Integrated Redis caching for enhanced performance.
- **Database Management**: MikroORM setup with PostgreSQL for efficient data handling.
- **XSECURITY**: An added security layer that safeguards APIs against unauthorized access, ensuring data protection and integrity.

## Getting Started Guide Without Docker

1. **Choose Your Local Development Tool:**

Select your preferred local development tool, such as [Docker](https://www.docker.com/), [Laragon](https://github.com/leokhoa/laragon), [Dbngin](https://dbngin.com/), or any other tool that suits your needs.
Select your preferred local development tool, such as [Dbngin](https://dbngin.com/)(comes with postgresql and redis) or any other tool that suits your needs.

### Version Requirements

- Node.js version 18+
- PostgreSQL 16+
- MikroORM for database interaction
- Redis 7+

2. **Configure Your Environment:**

Expand Down Expand Up @@ -56,6 +64,15 @@

You can ignore this if you are using Docker (see the Docker section).

You also need to set up your Redis server:

```bash
REDIS_HOST=localhost
REDIS_PORT=6379
```

You can ignore this if you are using Docker (see the Docker section).

3. **Install Dependencies:**

To install all necessary packages, run the following commands:
Expand Down Expand Up @@ -111,6 +128,12 @@

the Api should be running at `.env.docker` file (`APP_PORT`)(8000) by default.

You can also use `docker-compose up -d` to start the application in the background.

You can also use `docker-compose logs -f` to follow the logs of the application.

you can also use `docker-compose up --build` to build the image and start the application.

3. **Run Migrations and Seed Data**

If you need to run database migrations and seed initial data, you can enter the application container with the following command:
Expand All @@ -130,6 +153,7 @@

4. **Git hook for Check**
You can use Husky to manage git hooks:
go to root directory of your project, then run the following command:

```bash
npx husky install
Expand Down Expand Up @@ -158,6 +182,9 @@ If everything is set up correctly, you should see a response like this:
},
"memory_rss": {
"status": "up"
},
"redis": {
"status": "up"
}
},
"error": {},
Expand All @@ -173,6 +200,9 @@ If everything is set up correctly, you should see a response like this:
},
"memory_rss": {
"status": "up"
},
"redis": {
"status": "up"
}
}
}
Expand Down Expand Up @@ -264,9 +294,9 @@ You can create custom CLI commands tailored to your specific needs using the [ne
This project already includes integration with [nestjs-command](https://www.npmjs.com/package/nestjs-command) package.
For reference, check out the `xsecurity` command implemented in [src/commands/xsecurity.command.ts](https://github.com/Innovix-Matrix-Systems/ims-nest-api-starter/blob/main/src/commands/xsecurity.command.ts).

## Custom Module Creation Command
### Custom Module Creation Command

This project includes a custom script to generate a new NestJS module with a well-organized folder structure.
This project includes a custom command to generate a new NestJS module with a well-organized folder structure.

### What this command does:

Expand Down Expand Up @@ -295,38 +325,39 @@ This project includes a custom script to generate a new NestJS module with a wel
- [@AHS12](https://www.github.com/AHS12)

## Contributors
<!-- readme: contributors -start -->
<table>
<tbody>
<tr>
<td align="center">
<a href="https://github.com/AHS12">
<img src="https://avatars.githubusercontent.com/u/25058208?v=4" width="100;" alt="AHS12"/>
<br />
<sub><b>Azizul Hakim</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/ajshovon">
<img src="https://avatars.githubusercontent.com/u/61104583?v=4" width="100;" alt="ajshovon"/>
<br />
<sub><b>shovon</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/amanullah7649">
<img src="https://avatars.githubusercontent.com/u/45013120?v=4" width="100;" alt="amanullah7649"/>
<br />
<sub><b>MD: AMAN ULLAH</b></sub>
</a>
</td>
</tr>
<tbody>
</table>

<!-- readme: contributors -start -->
<table>
<tbody>
<tr>
<td align="center">
<a href="https://github.com/AHS12">
<img src="https://avatars.githubusercontent.com/u/25058208?v=4" width="100;" alt="AHS12"/>
<br />
<sub><b>Azizul Hakim</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/ajshovon">
<img src="https://avatars.githubusercontent.com/u/61104583?v=4" width="100;" alt="ajshovon"/>
<br />
<sub><b>shovon</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/amanullah7649">
<img src="https://avatars.githubusercontent.com/u/45013120?v=4" width="100;" alt="amanullah7649"/>
<br />
<sub><b>MD: AMAN ULLAH</b></sub>
</a>
</td>
</tr>
<tbody>
</table>
<!-- readme: contributors -end -->

## License

This project is brought to you by Innovix Matrix System and is released as open-source software under the [MIT license](https://opensource.org/licenses/MIT).
This project is brought to you by [Innovix Matrix System](https://innovixmatrixsystem.com/) and is released as open-source software under the [MIT license](https://opensource.org/licenses/MIT).

Feel free to use, modify, and distribute this starter project under the MIT license terms. Contributions are welcome to improve this template!
Loading