Skip to content

Latest commit

 

History

History
54 lines (39 loc) · 1.77 KB

File metadata and controls

54 lines (39 loc) · 1.77 KB

Recorder App Refactoring

Notes Feature Removal

In this refactoring, we have removed the notes feature from the server side of the application. The notes feature was part of an older version of the app but is no longer needed.

Files Deleted

  • /src/api/notes.api.ts: API endpoints for notes
  • /src/services/notes.service.ts: Service layer for notes

Files Modified

  1. Database Models

    • Removed Note schema from db.models.ts
    • Removed NoteDocument interface
  2. Database Service

    • Removed all note-related methods from database.service.ts
    • Removed note import and conversion functions
  3. Recordings API

    • Removed /:id/notes endpoint from recordings.api.ts
  4. Recordings Service

    • Removed createNoteFromRecording method from recordings.service.ts
    • Removed NoteI import
  5. In-Memory Store

    • Removed notes collection and all note operations
    • Updated exports to only include recordings

Files Left Unchanged

  • /src/types/notes.types.ts: Left for potential frontend references

MongoDB and R2 Integration

We have also integrated MongoDB for metadata storage and Cloudflare R2 for file storage.

MongoDB Integration

  • Created schemas and models for recordings
  • Implemented database service with CRUD operations
  • Added fallback to in-memory store when database is unavailable

R2 Storage Integration

  • Enhanced storage service to support Cloudflare R2
  • Implemented dual storage (local filesystem + R2)
  • Added configuration options via environment variables

Recording Updates

  • Added API endpoint for updating recordings (rename)
  • Enhanced error handling and logging

Environment Configuration

  • Added environment variables for MongoDB and R2 configuration
  • Updated documentation with setup instructions