15 Commits

Author SHA1 Message Date
88952fbde2 Added purchase orders and couriers. 2025-12-03 03:40:10 +00:00
5dd4d9275b Modified schemas. 2025-12-03 00:07:58 +00:00
7f17f5f205 Rewrote subjob handling so it works and better progress updates too. 2025-12-02 18:29:59 +00:00
79ed7691f9 Added document printer support. 2025-11-29 01:28:20 +00:00
509b7de11c Refactoring 2025-11-29 01:27:19 +00:00
362265da72 Refactor caching mechanism to utilize Redis for improved performance and reliability
- Replaced in-memory caching with Redis for object and list caching in database operations.
- Introduced a new RedisServer class for managing Redis connections and operations.
- Updated cache retrieval and update functions to handle asynchronous operations with Redis.
- Enhanced logging for cache operations to improve traceability of cache hits, misses, and errors.
- Adjusted configuration to include Redis settings in config.json.
2025-11-24 03:35:26 +00:00
ab50a5261d Enhance utility functions and refactor authentication logic
- Added a new jsonToCacheKey function to generate a SHA-256 hash from a canonicalized JSON object for improved caching.
- Updated getModelByName to return the first model directly instead of an array.
- Refactored authentication logic to utilize listObjects for user and host retrieval, ensuring consistent handling of returned data.
- Improved logging for OTP verification to include the specific OTP used in the search.
2025-09-05 23:30:06 +01:00
7ccc4bb993 Add NATS messaging support
- Introduced a new NatsServer class for managing NATS connections and messaging.
- Implemented connection handling, publishing, requesting, and subscription management.
- Updated index.js to connect to NATS on application startup and handle connection errors.
- Enhanced logging for NATS operations to improve traceability and error management.
2025-09-05 23:29:14 +01:00
d6214e316b Add message field to alert schema in printer.schema.js 2025-09-05 23:28:39 +01:00
e4c790e7cc Refactor caching mechanism in database.js
- Replaced the previous model cache implementation with a unified object cache using NodeCache for improved performance and simplicity.
- Updated cache retrieval and update functions to support additional parameters such as `populate`, `filter`, `sort`, and `project`.
- Enhanced logging for cache operations to provide better traceability of cache hits and misses.
- Removed deprecated functions and streamlined the caching logic for object and list retrieval.
2025-09-05 23:28:23 +01:00
6cc2a07ee0 Add utility functions for database operations
- Introduced a new utils.js file containing various utility functions for database operations.
- Implemented functions for parsing filters, converting objects to camelCase, extracting configuration blocks, and managing audit logs.
- Added functionality to handle ObjectId conversions and filter generation based on query parameters.
- Enhanced object ID handling with functions to flatten and expand ObjectIds for better integration with MongoDB.
2025-08-18 01:09:14 +01:00
f5bfbe0d63 Refactor EtcdServer class to enhance event handling and logging
- Introduced separate watchers for prefix and key events, improving organization and clarity.
- Renamed methods for setting and deleting keys to better reflect their functionality.
- Updated logging levels from debug to trace for more granular logging during operations.
- Added functionality to remove watchers for both prefixes and keys, enhancing resource management.
- Improved error handling and callback management for event listeners.
2025-08-18 01:08:36 +01:00
e2eb240a06 Deleted schema. 2025-08-18 01:07:51 +01:00
ce15d3dbfc Add inventory and management schemas for filament, part, and stock management
- 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.
2025-08-18 01:06:38 +01:00
bf56234c4b Refactor project structure: remove app.js, update config.json for environment-specific settings, enhance package.json with new scripts and dependencies, and convert websockets.js to ES module syntax with Keycloak authentication integration. 2025-06-29 22:39:23 +01:00