Skip to content

84 task change the database architecture#85

Merged
maneeshaxyz merged 7 commits intomainfrom
84-task-change-the-database-architecture
Nov 2, 2025
Merged

84 task change the database architecture#85
maneeshaxyz merged 7 commits intomainfrom
84-task-change-the-database-architecture

Conversation

@Aravinda-HWK
Copy link
Copy Markdown
Collaborator

📌 Description

This PR is to change the database architecture in the Raven and change the LMTP, IMAP implementations.


🔍 Changes Made

✅ Checklist (Email System)

  • Core IMAP commands tested (LOGIN, CAPABILITY, LIST, SELECT, FETCH, LOGOUT).
  • Authentication is tested.
  • Docker build & run validated.
  • Configuration loading verified for default and custom paths.
  • Persistent storage with Docker volume verified.
  • Error handling and logging verified
  • Documentation updated (README, config samples).

🧪 Testing Instructions

To test the server, use the instructions in the README in the test directory.


📷 Screenshots / Logs (if applicable)


⚠️ Notes for Reviewers

- Updated IMAPServer to utilize a database manager for handling user-specific databases.
- Modified various handler functions to retrieve user databases and perform operations on them.
- Replaced direct database calls with user-specific methods in the database layer.
- Ensured that default mailboxes are created when a new user is initialized.
- Updated tests to expose the database manager for better testing practices.
- Updated test files in `status_test.go`, `store_test.go`, `subscribe_test.go`, and `uid_test.go` to replace direct database access with helper functions.
- Removed direct usage of `server.GetDB().(*sql.DB)` and replaced it with `helpers.GetDatabaseFromServer(server)` for better abstraction and maintainability.
- Simplified user and mailbox creation in tests by utilizing `helpers.CreateTestUser` and `helpers.CreateMailbox`.
- Improved error messages in `subscribe_test.go` for clarity.
@Aravinda-HWK Aravinda-HWK linked an issue Oct 30, 2025 that may be closed by this pull request
@Aravinda-HWK Aravinda-HWK marked this pull request as draft October 30, 2025 03:52
@Aravinda-HWK Aravinda-HWK self-assigned this Oct 30, 2025
@Aravinda-HWK Aravinda-HWK marked this pull request as ready for review October 31, 2025 18:08
@maneeshaxyz maneeshaxyz merged commit e736026 into main Nov 2, 2025
3 checks passed
@Aravinda-HWK Aravinda-HWK deleted the 84-task-change-the-database-architecture branch November 2, 2025 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TASK] Change the database architecture

2 participants