- Added a ConcurrencyPool class to manage concurrent PDF rendering operations.
- Introduced PoolOverloadedError to handle cases when the pool is busy.
- Updated PDFService to utilize the new concurrency pool for generating student ID cards.
- Modified getStoredCardPdf to handle concurrent requests and avoid duplicate PDF generations.
- Enhanced error handling in the PDF generation process to provide clearer responses.
- Updated database connection settings to allow for configurable pool size and connection timeout.
- Refactored file storage service to ensure unique PDF filenames.
- Adjusted test scripts to cover the new concurrency features.
feat: create subdirectories for student and card storage in Dockerfile
- Updated PDFService to use a shared browser instance for Puppeteer to improve performance.
- Enhanced error handling during PDF generation by ensuring the page is closed properly.
- Modified the content disposition header for PDF downloads to include the registration number.
- Introduced a new authTokens module to encapsulate JWT token creation logic.
- Updated AuthController to utilize the new createAuthToken function for generating JWTs.
- Added tests for the authTokens module to verify default and configurable token expiration.
- Updated package.json to include a test script for running the new tests.
feat(migrations): add CreateStudents migration to create students table
- Implemented CreateStudents migration with up and down methods.
- The migration creates a 'students' table with necessary fields including id, firstName, lastName, registrationNumber, department, faculty, level, photoUrl, createdAt, and updatedAt.
- Added TypeScript definition and source map files for the migration.
- Baseline existing installations by checking for the existence of the 'students' table before creation.
chore(scripts): add clean-dist script to remove dist directory
- Introduced a clean-dist script to remove the 'dist' directory recursively and forcefully.