This issue focuses on setting up a base database using better-sqlite3 as a lightweight database solution for local development. This setup will allow users who clone the repository to easily run the project with a local SQLite database, without the need for a full database server. This database is intended for use in the feature explorations (e.g. managing conversations, favorited responses, loading pre-made conversations, etc.) and will also lay the groundwork for future migration to a more robust database like PostgreSQL (e.g., CockroachDB) when the project is ready for deployment as a full-fledged demo website.
This work is tied to work done in the below issue:
10
Goal
Integrate better-sqlite3 to database interactions in a local environment. The implementation should allow users to run the project seamlessly with a local SQLite database and provide the ability to load pre-made conversations into the system.
Acceptance Criteria
[ ] Install better-sqlite3 as a dependency.
[ ] Set up an initial SQLite database schema to manage conversations and favorited responses:
Define tables for conversations, responses, and favorites.
Description
This issue focuses on setting up a base database using better-sqlite3 as a lightweight database solution for local development. This setup will allow users who clone the repository to easily run the project with a local SQLite database, without the need for a full database server. This database is intended for use in the feature explorations (e.g. managing conversations, favorited responses, loading pre-made conversations, etc.) and will also lay the groundwork for future migration to a more robust database like PostgreSQL (e.g., CockroachDB) when the project is ready for deployment as a full-fledged demo website.
This work is tied to work done in the below issue:
10
Goal
Integrate better-sqlite3 to database interactions in a local environment. The implementation should allow users to run the project seamlessly with a local SQLite database and provide the ability to load pre-made conversations into the system.
Acceptance Criteria
id
: INTEGER, PRIMARY KEYtitle
: TEXTcreated_at
: DATETIMEid
: INTEGER, PRIMARY KEYconversation_id
: INTEGER, FOREIGN KEY (references Conversations)response_text
: TEXTcreated_at
: DATETIMEid
: INTEGER, PRIMARY KEYresponse_id
: INTEGER, FOREIGN KEY (references Responses)db.js
ordb.ts
).npm run init-db
).