Add auth service, storage service, types, and logging middleware

- Auth service: hashPassword/verifyPassword via bcrypt
- Storage service: saveFile, getFilePath, deleteStoredFile with ENOENT handling
- Types: JwtPayload interface
- Logging middleware: createLogger writing AUTH_FAILURE, AUTH_SUCCESS, FILE_NOT_FOUND
- 27 tests passing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-03 15:49:22 -08:00
parent b6aa6211a9
commit 157d1e8230
6 changed files with 178 additions and 0 deletions

4
src/types.ts Normal file
View File

@@ -0,0 +1,4 @@
export interface JwtPayload {
sub: number;
username: string;
}