Skip to content

Conversation

@CabralArthur
Copy link
Owner

No description provided.

- Completely restructured the project architecture from Express to NestJS
- Replaced Sequelize with TypeORM for database management
- Migrated authentication, user, and core modules to TypeScript and NestJS
- Added new configuration modules for environment validation and app settings
- Removed legacy JavaScript files and introduced TypeScript-based modules
- Updated project structure to follow NestJS best practices and conventions
- Implemented Swagger documentation and improved type safety
- Removed old migration and seeder files in favor of TypeORM migrations
- Renamed project to 'node-saas-base-api' in package files
- Updated TypeORM migration scripts in package.json
- Created new TypeORM configuration file (typeOrm.config.ts)
- Removed old database configuration and migration files
- Generated a new initial migration for the users table
- Simplified AppModule by removing unnecessary module imports
- Updated AuthService to remove wallet-related references
- Added SSL configuration to DatabaseModule
- Integrated SendGrid email service for sending password reset emails
- Created EmailModule and EmailService to handle email sending
- Added UserRecoverPassword entity to track password reset tokens
- Implemented password reset request, validation, and reset endpoints in UserController
- Added new DTOs for password reset request and reset operations
- Updated environment validation to include SendGrid and email configuration
- Configured email sending with dynamic base URL and sender email
- Added Team and Member entities to support multi-team functionality
- Implemented TeamModule with basic team management services
- Enhanced UserService with team-aware user creation, update, and deletion
- Introduced AdminGuard and SelfOrAdminGuard for role-based access control
- Updated AuthService to handle team membership during login
- Modified User entity to include active team tracking
- Created new migrations for teams, members, and user active team support
- Removed deprecated password reset DTOs and moved functionality to AuthService
- Added registration endpoint in AuthController with validation
- Updated AuthService to handle user and team creation during registration
- Modified guards to use uppercase role constants (ADMIN, MEMBER)
- Relocated password reset DTOs to auth module
- Added Team entity to AuthModule's TypeORM configuration
- Included ConfigService in AuthModule providers
- Added role field to CreateUserDto for flexible user role specification
- Modified UserController to automatically assign team_id and default role during user creation
- Updated UserService to handle user creation with team membership and default 'MEMBER' role
- Improved findById method in UserService to handle soft-deleted users and add explicit not found error
- Extended UpdateUserDto with new_password and confirm_new_password fields
- Updated UserService to implement password change validation
- Added password verification before allowing password updates
- Ensured new password and confirmation match before processing
- Implemented secure password hashing during update process
- Implemented switchTeam endpoint in AuthController
- Created SwitchTeamDto for team switching validation
- Updated AuthService to generate new JWT token with updated active team
- Added team membership verification before allowing team switch
- Included proper error handling for unauthorized team switches
- Implemented switchTeam endpoint in AuthController
- Created SwitchTeamDto for team switching validation
- Updated AuthService to generate new JWT token with updated active team
- Added team membership verification before allowing team switch
- Included proper error handling for unauthorized team switches
- Created subscription module with entities for Plans, Subscriptions, and Payments
- Implemented SubscriptionService for handling trial subscriptions, checkout, and plan management
- Added WebhookService to process Stripe webhook events for subscription lifecycle
- Integrated Stripe checkout and subscription management in AuthService during team creation
- Created migration for subscription-related database tables
- Added seed script to initialize default subscription plans
- Configured Stripe integration with environment-based configuration
@CabralArthur CabralArthur added the Feature This issue or pull request already exists label Jan 27, 2025
@CabralArthur CabralArthur self-assigned this Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature This issue or pull request already exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants