Automated changelog | Aug 20 - Sep 05 | 38 hours (6 active days)
This changelog summarizes code changes made between August 20th and September 5th, representing approximately 48 hours of development effort across 4 active days.
Backend:
- API Module: A new
AppModulewas implemented using NestJS. This module incorporates environment configuration usingConfigModule.forRoot, setting up global access to.envfile variables. It includes database integration viaDatabaseModule, rate limiting withThrottlerModule.forRoot, and theAuthModuleas a feature module. The purpose is to establish a well-structured and organized application architecture. TheHealthControllerprovides a basic health check endpoint. The impact is improved maintainability and scalability of the API. - Database Module: A
DatabaseModulewas created to encapsulate database interactions, promoting modularity and clean separation of concerns. This module uses TypeORM and is configured asynchronously to retrieve database configuration from environment variables. The impact is improved maintainability and testability of the database access. - Data Source: A
DataSourcewas added to handle TypeORM interactions with a PostgreSQL database. TheDataSourceOptionsare sourced from environment variables, facilitating easy switching between development and production configurations. Thesynchronizeflag is enabled in development for auto-schema generation, while SSL is enforced in production environments.
Authentication (Auth Layer):
- Data Models: New TypeORM entities were created:
User,Invitation, andVerificationCode.Userstores user information (email, verification status, invitation status, login timestamps).Invitationmanages email invitations for access, tracking their usage.VerificationCodehandles email verification codes, including their expiration and use status. The purpose is to represent the authentication-related data in a structured and persistent manner. Indexing was added toVerificationCodefor efficient code lookup. - Auth Service: An
AuthServicewas introduced to handle the core authentication logic: submitting emails for verification, generating and sending verification codes viaEmailService, validating codes, creating or updating user records, and generating JWT access tokens usingJwtModule. ThesubmitEmailmethod checks email invitations viaInvitationServicebefore generating and sending codes. TheverifyCodemethod validates codes and then either creates a new user or updates an existing one, settingisVerifiedto true. ThegenerateVerificationCodehelper function ensures unique codes. This service is now exported for use in other modules. The impact is a comprehensive and centralized authentication system. - Auth Controller: An
AuthControllerwas implemented to handle incoming authentication requests. It uses NestJS decorators (@Post,@Body,@HttpCode,@ApiOperation,@ApiResponse) for route definition, request handling, and response formatting, providing well-defined endpoints for email submission and code verification. Swagger annotations are included for improved API documentation. The impact is a clean and well-documented API for authentication. - Email Service: An
EmailServicewas created usingMailerSendto send verification emails. It strictly enforces a template-based email strategy, ensuring branding and deliverability consistency. Includes robust error handling and logging. The purpose is centralized email management with consistent design. It handles both the verification and welcome emails, though the welcome email is not yet implemented fully. - Invitation Service: An
InvitationServicewas introduced to manage email invitations. ThecheckInvitationandmarkInvitationAsUsedmethods handle invitation verification and marking them as used, supporting the email submission workflow. The impact is a system for managing invitation lists and restricting access. - DTOs: Data Transfer Objects (DTOs) were created (
SubmitEmailDtoandVerifyCodeDto) to enforce data validation using class-validator.AuthResponseDtodefines the structure of the successful authentication response. This improves API data consistency and reduces errors. - Testing: Unit tests were added for
AuthServiceto validate core logic and interaction with repositories and email services, improving confidence in the authentication system’s correctness. These tests mock dependencies for isolated unit testing.
UI (Documentation):
- New Script Editor Page: A new page in the documentation was added to detail the features of the Script Editor including the UI, real-time features, importing options, and other features.
- Updated Navigation: The documentation navigation was updated to reflect the new Script Editor page and to remove the Scene Map page from the navigation list.
- Updated Homepage: The Homepage was updated to reflect the new Script Editor page and to move the Call Sheets page in the order of the new features.
Other:
- Main Application File: A
main.tsfile was added for the NestJS API application, including the setup for global security (helmet), CORS configuration, validation pipe, API prefix, and Swagger documentation. - Seed File: A
seed.tsfile was added to seed the database with example invitation emails for development. This is only run in development and improves setup convenience.