This is a webapp made with SvelteKit and OOP that helps you keep tracks of you generative AI prompts. You can see a of all your prompts and add and delete from the table to your heart's content. Unfortunately, you cannot upload any actual files as that would be too costly to maintain. As there is no backend due to being out of scope for this homework assignment, all the data is stored in the browser's localStorage API which is not reliable for long term storage as it can be overwritten very easily.
The PromptStorageService class is the "creative addition" for the rubric. It implements the duties of a prompt manager using the localStorage API. I didn't write the tests for this class because I would have to mock the localStorage API.
I used GitHub Copilot to generate some repetitive unit tests. They are marked with a comment above them in each test file in src/tests/solution/.
- Update IPromptManager and all its users to include a text search on the inputted prompt on getFilteredPrompts.
- Implement a search bar in the UI to filter prompts by text on all fields.
-
Clone Repo
-
Make sure you are using the latest Node LTS version at the time of the last commit [v22.x].
-
Run
npm i -g pnpm@latest-10
to install pnpm. -
Run
pnpm i
to install the dependencies.
To create a production version of the app:
-
Run
pnpm build
to create an optimized production build of the app. -
You can preview the production build with
pnpm preview -- open
and open the app in a new browser tab.
- Run
pnpm dev --open
to start the development server and open the app in a new browser tab.
- Run
pnpm t
to run the unit tests.
-
Run
pnpm lint
to run prettier and eslint. -
Run
pnpm format
to format with prettier.