Skip to content

feat: implement persistent storage with SQLite #22

@anxkhn

Description

@anxkhn

Problem Description

The application uses in-memory storage which loses all data on restart.

Context

A persistent storage solution is needed for production use while maintaining the in-memory option for development.

Files to Investigate

  • src/lib/store.ts - Current store implementation
  • Create new src/lib/db.ts - Database connection

Expected Behavior

Events should persist across server restarts with SQLite database.

Acceptance Criteria

  • SQLite database integration
  • Migration system for schema changes
  • Environment variable to switch between in-memory and persistent storage
  • All existing tests still pass

Suggested Approach

Use better-sqlite3 or libsql for SQLite integration with a repository pattern.

Difficulty: Hard

Estimated time: 3-6 hours
Prerequisites: SQL, database design
Learning outcomes: Database integration, repository pattern

Metadata

Metadata

Assignees

No one assigned

    Labels

    advancedComplex challenge (3-6 hours)enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions