Skip to content

Commit d5d7075

Browse files
authored
Merge pull request btwld#6 from tnramalho/main
Update Documentation and workspace
2 parents c50282e + 6a2ecc8 commit d5d7075

5 files changed

Lines changed: 156 additions & 94 deletions

File tree

README.md

Lines changed: 97 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Rockets
1+
# Rockets Server
22

33
![Rockets Logo](https://raw.githubusercontent.com/conceptadev/rockets/main/assets/rockets-icon.svg)
44

@@ -17,37 +17,99 @@
1717
Rapid Enterprise Development Toolkit
1818
```
1919

20-
A collection of NestJS modules
21-
that were created for the rapid development of enterpise level APIs.
22-
23-
All reasonable efforts have been made to provide loosely coupled interfaces,
24-
overridable services, and sane default implementations.
25-
26-
## Contributing
27-
28-
This project is currently in alpha testing, however, feedback is highly
29-
appreciated and encouraged!
30-
31-
Pull requests will be gratefully accepted in the very near future,
32-
once we have finalized our Contributor License Agreement.
33-
34-
## Modules
35-
36-
| Module | Summary |
37-
| -------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
38-
| [nestjs-access-control](https://github.com/conceptadev/rockets/tree/main/packages/nestjs-access-control 'nestjs-access-control') | Advanced access control guard for NestJS with optional per-request filtering. |
39-
| [nestjs-auth-github](https://github.com/conceptadev/rockets/tree/main/packages/nestjs-auth-github 'nestjs-auth-github') | Authenticate requests using GitHub oAuth2 sign-on. |
40-
| [nestjs-auth-jwt](https://github.com/conceptadev/rockets/tree/main/packages/nestjs-auth-jwt 'nestjs-auth-jwt') | Authenticate requests using JWT tokens passed via the request (headers, cookies, body, query, etc). |
41-
| [nestjs-auth-local](https://github.com/conceptadev/rockets/tree/main/packages/nestjs-auth-local 'nestjs-auth-local') | Authenticate requests using username/email and password against a local or remote data source. |
42-
| [nestjs-auth-refresh](https://github.com/conceptadev/rockets/tree/main/packages/nestjs-auth-refresh 'nestjs-auth-refresh') | Authenticate requests using JWT refresh tokens passed via the request (headers, cookies, body, query, etc). |
43-
| [nestjs-authentication](https://github.com/conceptadev/rockets/tree/main/packages/nestjs-authentication 'nestjs-authentication') | Authenticate requests using one or more strategies (local, jwt, etc). |
44-
| [nestjs-common](https://github.com/conceptadev/rockets/tree/main/packages/nestjs-common 'nestjs-common') | The common module is a dependency of all Rockets modules. |
45-
| [nestjs-crud](https://github.com/conceptadev/rockets/tree/main/packages/nestjs-crud 'nestjs-crud') | Extremely powerful CRUD module that is an extension/wrapper of the popular @nestjsx/crud module. |
46-
| [nestjs-email](https://github.com/conceptadev/rockets/tree/main/packages/nestjs-email 'nestjs-email') | Email deliver module that supports most popular transports, as well as template based email bodies using handlebars syntax. |
47-
| [nestjs-event](https://github.com/conceptadev/rockets/tree/main/packages/nestjs-event 'nestjs-event') | Advanced class based event dispatch/listener module. |
48-
| [nestjs-jwt](https://github.com/conceptadev/rockets/tree/main/packages/nestjs-jwt 'nestjs-jwt') | A flexible JWT utilities module for signing and validating tokens. |
49-
| [nestjs-logger](https://github.com/conceptadev/rockets/tree/main/packages/nestjs-logger 'nestjs-logger') | Drop-in replacement for the core NestJS logger that provides additonal support for pushing log data to external log providers. |
50-
| [nestjs-password](https://github.com/conceptadev/rockets/tree/main/packages/nestjs-password 'nestjs-password') | A flexible Password utilities module that provides services for password strength, creation and storage. |
51-
| [nestjs-swagger-ui](https://github.com/conceptadev/rockets/tree/main/packages/nestjs-swagger-ui 'nestjs-swagger-ui') | Expose your OpenApi spec on your API using the powerful Swagger UI interface. |
52-
| [nestjs-typeorm-ext](https://github.com/conceptadev/rockets/tree/main/packages/nestjs-typeorm-ext 'nestjs-typeorm-ext') | Extension of the NestJS TypeOrm module that allows your dynamic modules to accept drop-in replacements of custom entities and repositories. |
53-
| [nestjs-user](https://github.com/conceptadev/rockets/tree/main/packages/nestjs-user 'nestjs-user') | A module for managing a basic User entity, including controller with full CRUD, DTOs, sample data factory and seeder. |
20+
## Overview
21+
22+
**Rockets Server** is a comprehensive authentication and user management
23+
solution for NestJS applications. It provides JWT authentication, user
24+
management, OTP verification, email notifications, and API documentation
25+
out of the box.
26+
27+
## 🚀 Quick Start
28+
29+
### Installation
30+
31+
```bash
32+
npm install @concepta/rockets-server @concepta/nestjs-typeorm-ext typeorm
33+
```
34+
35+
### Basic Setup
36+
37+
```typescript
38+
// app.module.ts
39+
import { Module } from '@nestjs/common';
40+
import { RocketsServerModule } from '@concepta/rockets-server';
41+
import { TypeOrmExtModule } from '@concepta/nestjs-typeorm-ext';
42+
import { UserEntity } from './entities/user.entity';
43+
import { UserOtpEntity } from './entities/user-otp.entity';
44+
import { FederatedEntity } from './entities/federated.entity';
45+
46+
@Module({
47+
imports: [
48+
TypeOrmExtModule.forRoot({
49+
type: 'sqlite',
50+
database: ':memory:',
51+
synchronize: true,
52+
autoLoadEntities: true,
53+
}),
54+
TypeOrmExtModule.forFeature({
55+
user: { entity: UserEntity },
56+
}),
57+
TypeOrmExtModule.forFeature({
58+
userOtp: { entity: UserOtpEntity },
59+
}),
60+
TypeOrmExtModule.forFeature({
61+
federated: { entity: FederatedEntity },
62+
}),
63+
RocketsServerModule.forRoot({
64+
jwt: {
65+
settings: {
66+
access: { secret: 'your-secret-key' },
67+
refresh: { secret: 'your-refresh-secret' },
68+
},
69+
},
70+
services: {
71+
mailerService: {
72+
sendMail: (options) => {
73+
console.log('Email sent:', options.to);
74+
return Promise.resolve();
75+
},
76+
},
77+
},
78+
}),
79+
],
80+
})
81+
export class AppModule {}
82+
```
83+
84+
That's it! You now have:
85+
86+
- Authentication endpoints (`/auth/login`, `/auth/signup`, etc.)
87+
- User management (`/user`)
88+
- OTP verification (`/otp`)
89+
- API documentation (`/api`)
90+
91+
## 📖 Documentation
92+
93+
For detailed setup, configuration, and API reference, see:
94+
95+
**[📚 Complete Documentation](./packages/rockets-server/README.md)**
96+
97+
## 🔧 Dependencies
98+
99+
Rockets Server is built on top of the
100+
[nestjs-modules](https://github.com/btwld/nestjs-modules) collection. Visit the
101+
repository to explore individual modules for authentication, user management, email,
102+
and more.
103+
104+
## 🤝 Contributing
105+
106+
This project is currently in alpha testing, however, feedback is highly appreciated
107+
and encouraged!
108+
109+
Pull requests will be gratefully accepted in the very near future, once we have
110+
finalized our Contributor License Agreement.
111+
112+
## 📄 License
113+
114+
This project is licensed under the MIT License - see the
115+
[LICENSE.txt](LICENSE.txt) file for details.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "root",
3-
"version": "7.0.0-alpha.4",
3+
"version": "0.1.0-dev.1",
44
"license": "BSD-3-Clause",
55
"private": true,
66
"workspaces": {

packages/rockets-server/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
## Project
44

5-
[![NPM Latest](https://img.shields.io/npm/v/@concepta/rockets-server)](https://www.npmjs.com/package/@concepta/rockets-server)
6-
[![NPM Downloads](https://img.shields.io/npm/dw/@concepta/rockets-server)](https://www.npmjs.com/package/@concepta/rockets-server)
5+
[![NPM Latest](https://img.shields.io/npm/v/@bitwild/rockets-server)](https://www.npmjs.com/package/@bitwild/rockets-server)
6+
[![NPM Downloads](https://img.shields.io/npm/dw/@bitwild/rockets-server)](https://www.npmjs.com/package/@bitwild/rockets-server)
77
[![GH Last Commit](https://img.shields.io/github/last-commit/conceptadev/rockets?logo=github)](https://github.com/conceptadev/rockets)
88
[![GH Contrib](https://img.shields.io/github/contributors/conceptadev/rockets?logo=github)](https://github.com/conceptadev/rockets/graphs/contributors)
99
[![NestJS Dep](https://img.shields.io/github/package-json/dependency-version/conceptadev/rockets/@nestjs/common?label=NestJS&logo=nestjs&filename=packages%2Fnestjs-core%2Fpackage.json)](https://www.npmjs.com/package/@nestjs/common)
@@ -77,7 +77,7 @@ maintaining flexibility for customization and extension.
7777
Install the Rockets SDK and its peer dependencies:
7878

7979
```bash
80-
npm install @concepta/rockets-server @concepta/nestjs-typeorm-ext typeorm
80+
npm install @bitwild/rockets-server @concepta/nestjs-typeorm-ext typeorm
8181
```
8282

8383
**Note**: We use SQLite for the examples as it requires no additional setup.
@@ -135,7 +135,7 @@ Create your main application module with the Rockets SDK:
135135
```typescript
136136
// app.module.ts
137137
import { Module } from '@nestjs/common';
138-
import { RocketsServerModule } from '@concepta/rockets-server';
138+
import { RocketsServerModule } from '@bitwild/rockets-server';
139139
import { TypeOrmExtModule } from '@concepta/nestjs-typeorm-ext';
140140
import { UserEntity } from './entities/user.entity';
141141
import { UserOtpEntity } from './entities/user-otp.entity';

packages/rockets-server/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "@concepta/rockets-server",
3-
"version": "7.0.0-alpha.4",
4-
"description": "Rockets",
2+
"name": "@bitwild/rockets-server",
3+
"version": "0.1.0-dev.1",
4+
"description": "Rockets Server",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
77
"license": "BSD-3-Clause",

yarn.lock

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,57 @@ __metadata:
421421
languageName: node
422422
linkType: hard
423423

424+
"@bitwild/rockets-server@workspace:packages/rockets-server":
425+
version: 0.0.0-use.local
426+
resolution: "@bitwild/rockets-server@workspace:packages/rockets-server"
427+
dependencies:
428+
"@concepta/nestjs-access-control": "npm:^7.0.0-alpha.4"
429+
"@concepta/nestjs-auth-jwt": "npm:^7.0.0-alpha.4"
430+
"@concepta/nestjs-auth-local": "npm:^7.0.0-alpha.4"
431+
"@concepta/nestjs-auth-recovery": "npm:^7.0.0-alpha.4"
432+
"@concepta/nestjs-auth-refresh": "npm:^7.0.0-alpha.4"
433+
"@concepta/nestjs-auth-verify": "npm:^7.0.0-alpha.4"
434+
"@concepta/nestjs-authentication": "npm:^7.0.0-alpha.4"
435+
"@concepta/nestjs-common": "npm:^7.0.0-alpha.4"
436+
"@concepta/nestjs-crud": "npm:^7.0.0-alpha.4"
437+
"@concepta/nestjs-email": "npm:^7.0.0-alpha.4"
438+
"@concepta/nestjs-jwt": "npm:^7.0.0-alpha.4"
439+
"@concepta/nestjs-otp": "npm:^7.0.0-alpha.4"
440+
"@concepta/nestjs-password": "npm:^7.0.0-alpha.4"
441+
"@concepta/nestjs-typeorm-ext": "npm:^7.0.0-alpha.4"
442+
"@concepta/nestjs-user": "npm:^7.0.0-alpha.4"
443+
"@nestjs/common": "npm:^10.4.1"
444+
"@nestjs/config": "npm:^3.2.3"
445+
"@nestjs/core": "npm:^10.4.1"
446+
"@nestjs/jwt": "npm:^10.2.0"
447+
"@nestjs/passport": "npm:^10.0.3"
448+
"@nestjs/platform-express": "npm:^10.4.1"
449+
"@nestjs/swagger": "npm:^7.4.0"
450+
"@nestjs/testing": "npm:^10.4.1"
451+
"@nestjs/typeorm": "npm:^10.0.2"
452+
"@types/jsonwebtoken": "npm:9.0.6"
453+
"@types/passport-jwt": "npm:^3.0.13"
454+
"@types/passport-strategy": "npm:^0.2.38"
455+
"@types/supertest": "npm:^6.0.2"
456+
express-serve-static-core: "npm:^0.1.1"
457+
jest-mock-extended: "npm:^2.0.9"
458+
jsonwebtoken: "npm:^9.0.2"
459+
passport: "npm:^0.7.0"
460+
passport-jwt: "npm:^4.0.1"
461+
passport-strategy: "npm:^1.0.0"
462+
sqlite3: "npm:^5.1.4"
463+
supertest: "npm:^6.3.4"
464+
ts-node: "npm:^10.9.2"
465+
peerDependencies:
466+
class-transformer: "*"
467+
class-validator: "*"
468+
rxjs: ^7.1.0
469+
typeorm: ^0.3.0
470+
bin:
471+
rockets-swagger: ./bin/generate-swagger.js
472+
languageName: unknown
473+
linkType: soft
474+
424475
"@colors/colors@npm:1.5.0":
425476
version: 1.5.0
426477
resolution: "@colors/colors@npm:1.5.0"
@@ -913,57 +964,6 @@ __metadata:
913964
languageName: node
914965
linkType: hard
915966

916-
"@concepta/rockets-server@workspace:packages/rockets-server":
917-
version: 0.0.0-use.local
918-
resolution: "@concepta/rockets-server@workspace:packages/rockets-server"
919-
dependencies:
920-
"@concepta/nestjs-access-control": "npm:^7.0.0-alpha.4"
921-
"@concepta/nestjs-auth-jwt": "npm:^7.0.0-alpha.4"
922-
"@concepta/nestjs-auth-local": "npm:^7.0.0-alpha.4"
923-
"@concepta/nestjs-auth-recovery": "npm:^7.0.0-alpha.4"
924-
"@concepta/nestjs-auth-refresh": "npm:^7.0.0-alpha.4"
925-
"@concepta/nestjs-auth-verify": "npm:^7.0.0-alpha.4"
926-
"@concepta/nestjs-authentication": "npm:^7.0.0-alpha.4"
927-
"@concepta/nestjs-common": "npm:^7.0.0-alpha.4"
928-
"@concepta/nestjs-crud": "npm:^7.0.0-alpha.4"
929-
"@concepta/nestjs-email": "npm:^7.0.0-alpha.4"
930-
"@concepta/nestjs-jwt": "npm:^7.0.0-alpha.4"
931-
"@concepta/nestjs-otp": "npm:^7.0.0-alpha.4"
932-
"@concepta/nestjs-password": "npm:^7.0.0-alpha.4"
933-
"@concepta/nestjs-typeorm-ext": "npm:^7.0.0-alpha.4"
934-
"@concepta/nestjs-user": "npm:^7.0.0-alpha.4"
935-
"@nestjs/common": "npm:^10.4.1"
936-
"@nestjs/config": "npm:^3.2.3"
937-
"@nestjs/core": "npm:^10.4.1"
938-
"@nestjs/jwt": "npm:^10.2.0"
939-
"@nestjs/passport": "npm:^10.0.3"
940-
"@nestjs/platform-express": "npm:^10.4.1"
941-
"@nestjs/swagger": "npm:^7.4.0"
942-
"@nestjs/testing": "npm:^10.4.1"
943-
"@nestjs/typeorm": "npm:^10.0.2"
944-
"@types/jsonwebtoken": "npm:9.0.6"
945-
"@types/passport-jwt": "npm:^3.0.13"
946-
"@types/passport-strategy": "npm:^0.2.38"
947-
"@types/supertest": "npm:^6.0.2"
948-
express-serve-static-core: "npm:^0.1.1"
949-
jest-mock-extended: "npm:^2.0.9"
950-
jsonwebtoken: "npm:^9.0.2"
951-
passport: "npm:^0.7.0"
952-
passport-jwt: "npm:^4.0.1"
953-
passport-strategy: "npm:^1.0.0"
954-
sqlite3: "npm:^5.1.4"
955-
supertest: "npm:^6.3.4"
956-
ts-node: "npm:^10.9.2"
957-
peerDependencies:
958-
class-transformer: "*"
959-
class-validator: "*"
960-
rxjs: ^7.1.0
961-
typeorm: ^0.3.0
962-
bin:
963-
rockets-swagger: ./bin/generate-swagger.js
964-
languageName: unknown
965-
linkType: soft
966-
967967
"@cspotcode/source-map-support@npm:^0.8.0":
968968
version: 0.8.1
969969
resolution: "@cspotcode/source-map-support@npm:0.8.1"

0 commit comments

Comments
 (0)