- Eliminated KeycloakAuth from the SocketManager initialization.
- Updated SocketManager to directly use the server instance, simplifying the socket management setup.
- Introduced otpExpiryMins setting to specify the expiration time for OTPs in minutes.
- Updated configuration structure to enhance authentication management.
- Removed SocketClient class and its associated functionality.
- Introduced SocketUser and SocketHost classes to handle user and host socket connections respectively.
- Updated SocketManager to manage user and host connections, including authentication and event handling.
- Enhanced event handling for user actions such as locking, unlocking, and subscribing to updates.
- Added CodeAuth class for verifying authentication codes and OTPs against the database.
- Implemented methods to check host status, validate codes, and manage OTP expiration.
- Updated KeycloakAuth to retrieve user information from the database.
- Refactored createAuthMiddleware to handle authentication checks for Socket.IO connections.
- Introduced new schemas for managing inventory, including filamentStock, partStock, stockAudit, stockEvent, and their respective models.
- Added management schemas for user, vendor, material, and various document types to enhance data structure and organization.
- Implemented necessary fields and relationships to support inventory tracking and management functionalities.
- Implemented TemplateManager class for rendering EJS templates with dynamic content.
- Added base template, preview template, content placeholder, and render template EJS files.
- Introduced CSS styles for document layout and presentation.
- Integrated dayjs for date formatting and posthtml for custom element transformation.