https://github.com/gabireze/password-generator-api
A flexible and well-structured API for generating secure passwords, built with NestJS. It allows customization of character types, quantity, and output format (JSON, XML, YAML, CSV, text, or HTML).
https://github.com/gabireze/password-generator-api
api csv customizable generator html json just nestjs nestjs-backend openapi password password-generator secure supertest swagger xml yaml
Last synced: about 1 month ago
JSON representation
A flexible and well-structured API for generating secure passwords, built with NestJS. It allows customization of character types, quantity, and output format (JSON, XML, YAML, CSV, text, or HTML).
- Host: GitHub
- URL: https://github.com/gabireze/password-generator-api
- Owner: gabireze
- License: mit
- Created: 2021-09-02T16:44:56.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-05-20T13:43:17.000Z (9 months ago)
- Last Synced: 2025-06-05T13:16:30.632Z (8 months ago)
- Topics: api, csv, customizable, generator, html, json, just, nestjs, nestjs-backend, openapi, password, password-generator, secure, supertest, swagger, xml, yaml
- Language: TypeScript
- Homepage:
- Size: 535 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ Password Generator API
[](https://codecov.io/gh/gabireze/password-generator-api)
A secure and flexible password generation API built with [NestJS](https://nestjs.com/). Supports multiple formats including JSON, text, XML, CSV, YAML, and HTML.
## GitAds Sponsored
[](https://gitads.dev/v1/ad-track?source=gabireze/password-generator-api@github)
## ๐ Features
- Generate multiple random passwords with custom rules
- Format output as:
- JSON
- Plain Text
- XML
- CSV
- YAML
- HTML
- Exclude specific characters (e.g., `lIO0`)
- Choose custom separators and quoting
- Fully documented with Swagger (OpenAPI)
- Includes unit and E2E tests
## ๐ฆ Installation
```bash
npm install
```
## ๐งช Run in development
```bash
npm run start:dev
```
## ๐๏ธ Build for production
```bash
npm run build
npm run start:prod
```
## ๐ API Documentation
After running the app, visit:
```
http://localhost:3000/api
```
This loads the Swagger UI with all available endpoints.
## ๐ Example request
### POST `/password/generate`
```json
{
"length": 12,
"uppercase": true,
"lowercase": true,
"numbers": true,
"symbols": true,
"quantity": 3,
"format": "json"
}
```
#### Supported formats:
`json` | `text` | `xml` | `csv` | `yaml` | `html`
## โ
Run tests
```bash
npm run test # Unit tests
npm run test:e2e # End-to-End tests
npm run test:cov # Coverage report
```
## ๐งน Code quality
```bash
npm run lint # Check code style
npm run lint:fix # Fix lint issues
npm run prettier:fix
```
## ๐ง Export OpenAPI docs (Swagger JSON)
```bash
npm run export:swagger
```
## ๐ Project Structure
```
src/
โโโ password/ # Password generator module
โโโ app.controller.ts # Healthcheck route
โโโ swagger.ts # Swagger export
โโโ main.ts # Entry point
```