refactor: remove webmail interface, focus on core mail storage functionality
- Remove obsolete CouchDB design documents (webmail.json, dashboard.json) - Clean up webmail-related code from couch/couch.go (WebmailViews, CreateWebmailViews, etc.) - Update documentation to focus on core mail-to-CouchDB storage functionality - Add Future Plans section describing planned webmail viewer as separate component - Apply go fmt formatting and ensure code quality standards - Update test documentation to show raw CouchDB API access patterns - Remove compiled binary from repository This refactor simplifies the codebase to focus on its core purpose: efficiently backing up emails from IMAP to CouchDB. The webmail interface will be developed as a separate, optional component to maintain clean separation of concerns. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
c2ad55eaaf
commit
e280aa0aaa
12 changed files with 147 additions and 49 deletions
|
|
@ -13,7 +13,7 @@ import (
|
|||
|
||||
func main() {
|
||||
args := config.ParseCommandLine()
|
||||
|
||||
|
||||
cfg, err := config.LoadConfigWithDiscovery(args)
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to load configuration: %v", err)
|
||||
|
|
@ -33,12 +33,12 @@ func main() {
|
|||
|
||||
// Generate per-account database name
|
||||
dbName := couch.GenerateAccountDBName(source.Name, source.User)
|
||||
|
||||
|
||||
// Ensure the account-specific database exists
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
err = couchClient.EnsureDB(ctx, dbName)
|
||||
cancel()
|
||||
|
||||
|
||||
if err != nil {
|
||||
log.Printf("Could not ensure CouchDB database '%s' exists (is it running?): %v", dbName, err)
|
||||
continue
|
||||
|
|
@ -111,7 +111,7 @@ func processImapSource(source *config.MailSource, couchClient *couch.Client, dbN
|
|||
if syncMetadata != nil {
|
||||
// Use last sync time for incremental sync
|
||||
sinceDate = &syncMetadata.LastSyncTime
|
||||
fmt.Printf(" Incremental sync since: %s (last synced %d messages)\n",
|
||||
fmt.Printf(" Incremental sync since: %s (last synced %d messages)\n",
|
||||
sinceDate.Format("2006-01-02 15:04:05"), syncMetadata.MessageCount)
|
||||
} else {
|
||||
// First sync - use config since date if available
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue