Skip to content

Latest commit

 

History

History
120 lines (94 loc) · 4.09 KB

File metadata and controls

120 lines (94 loc) · 4.09 KB

Rockets Server

Rockets Logo

Project

Codacy Code Climate Maint Code Climate Debt Codecov GitHub Build GH Commits GH Last Commit GH Contrib

Rapid Enterprise Development Toolkit

Overview

Rockets Server is a comprehensive authentication and user management solution for NestJS applications. It provides JWT authentication, user management, OTP verification, email notifications, and API documentation out of the box.

🚀 Quick Start

Installation

npm install @concepta/rockets-server-auth @concepta/nestjs-typeorm-ext typeorm

Basic Setup

This is the minimum required setup to get started with Rockets Server. You'll need to create your entities and configure the module as follows:

// app.module.ts
import { Module } from '@nestjs/common';
import { RocketsServerAuthModule } from '@concepta/rockets-server-auth';
import { TypeOrmExtModule } from '@concepta/nestjs-typeorm-ext';
import { UserEntity } from './entities/user.entity';
import { UserOtpEntity } from './entities/user-otp.entity';
import { FederatedEntity } from './entities/federated.entity';

@Module({
  imports: [
    TypeOrmExtModule.forRoot({
      type: 'sqlite',
      database: ':memory:',
      synchronize: true,
      autoLoadEntities: true,
    }),
    RocketsServerAuthModule.forRoot({
      user: {
        imports: [
          TypeOrmExtModule.forFeature({
            user: {
              entity: UserFixture,
            },
          }),
        ],
      },
      otp: {
        imports: [
          TypeOrmExtModule.forFeature({
            userOtp: {
              entity: UserOtpEntityFixture,
            },
          }),
        ],
      },
      services: {
        mailerService: mockEmailService,
      },
    }),
  ],
})
export class AppModule {}

That's it! You now have:

  • Authentication endpoints (/auth/login, /auth/signup, etc.)
  • User management (/user)
  • OTP verification (/otp)
  • API documentation (/api)

📖 Documentation

For detailed setup, configuration, and API reference, see:

📚 Complete Documentation

🔧 Dependencies

Rockets Server is built on top of the nestjs-modules collection. Visit the repository to explore individual modules for authentication, user management, email, and more.

🤝 Contributing

This project is currently in alpha testing, however, feedback is highly appreciated and encouraged!

Pull requests will be gratefully accepted in the very near future, once we have finalized our Contributor License Agreement.

📄 License

This project is licensed under the MIT License - see the LICENSE.txt file for details.

Notes: Rockest server has a global server guard that uses auth provider rockets server auth can choose to use the gloal jwt one