feat(story): add story typing mode with flash, short, and epic length tiers (@albindavidc)#7657
feat(story): add story typing mode with flash, short, and epic length tiers (@albindavidc)#7657albindavidc wants to merge 18 commits intomonkeytypegame:masterfrom
Conversation
…and configure it.
|
Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes. |
|
Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes. |
|
hi @albindavidc , thank you for your contribution. How does story mode differ from quotes? |
|
Hello @fehmer , Thankyou for reviewing my code. The key difference is In quotes mode, the typing content consists of short, standalone quotes. These are typically brief sentences that convey wisdom or ideas, intended for quick typing tests, with a maximum length of a paragraph. In story mode, the content is longer and more continuous. Instead of isolated quotes, users type passages from stories that describe a sequence of events, providing a more sustained typing experience and better simulating real-world text such as articles or books. So the main difference is the structure and purpose of the text:
|
|
hi @Abdulbasit0123 , quotes are not limited to a short length and can have multiple paragraphs. There is already a filter for different quote length, so the user can pick from short to very long quotes. There is already content of books in the quotes. |
|
Hello @fehmer, My name is @albindavidc Yes its true that there are quotes that is longer. It would be great if we have a flow like stories. If we have implemented stories, then we will be able to learn and enjoy stories while typing. Not every quotes are stories. By seperating will really help us to clearly enjoy typing. |
|
Hi |
sorry, picked the wrong entry from the autocomplete :D |
Hi @albindavidc, i feel the use case is very limited compared to the required changes. If we would add like tags to existing quotes we could let the user filter for like |
|
Hello @fehmer, My name is @albindavidc Perhaps we could also consider introducing tags to help categorize and filter the content more easily. For example, in quotes, tags such as wisdom, inspirational, humorous, and leadership could be used to reflect the tone or theme. Similarly, for stories, we might include tags like fiction, poetry, religious, political, music, and others depending on the type of narrative. This might make it easier for users to discover and filter content based on their interests. |
|
Hello @fehmer, My name is @albindavidc If it would be helpful, I’d be happy to assist with classifying the 7,700+ quotes and adding appropriate tags. |
Description
Hi MonkeyType team! 👋
I'm a long-time user of MonkeyType and I've always loved how the different modes each bring a distinct feel to the typing experience. I wanted to contribute something that adds a new dimension to that — so I built story mode.
In addition to our existing words, quotes. Story mode lets users type short/medium/long stories — narratives with flow, punctuation, and meaning. It feels different from any existing mode: you're reading something as you type it. It rewards focus.
Users can choose a length tier:
A random story is selected each session within the chosen tier, avoiding immediate repeats. The initial content ships with English stories across all three tiers, following the same static JSON pattern used by quotes and languages — so adding more languages is straightforward.
Files changed:
packages/schemas/src/shared.ts— addedstorytoPersonalBestsSchemapackages/schemas/src/configs.ts— addedStoryLengthSchemaandstoryLengthtoConfigSchemapackages/schemas/src/stories.ts— new:StorySchema,StoryFileSchema,StoryLengthSchemapackages/schemas/src/index.ts— exported stories schemapackages/contracts/src/stories.ts— new contract forGET /stories/:languagepackages/contracts/src/index.ts— registered stories contractpackages/contracts/src/util/api.ts— added"stories"toOpenApiTagpackages/contracts/src/rate-limit/index.ts— addedstoriesGetrate limitfrontend/src/ts/constants/default-config.ts— addedstoryLength: "flash"defaultfrontend/src/ts/config.ts— addedsetStoryLength()frontend/src/ts/config-metadata.ts— addedstoryLengthmetadata entryfrontend/src/ts/test/story.ts— new: story engine (fetch, cache, parse, pick, build word list)frontend/src/ts/test/test-config.ts— story mode UI, active button state, animationfrontend/src/ts/test/words-generator.ts— integrated story words intogenerateWords()frontend/src/ts/test/test-logic.ts—areAllTestWordsGenerated()and config change restartfrontend/src/ts/test/result.ts— story length inupdateTestType()frontend/src/ts/event-handlers/test.ts— click handlers for mode and length buttonsfrontend/src/html/pages/test.html— story mode button andstoryLengthselectorfrontend/src/styles/test.scss— styles for.storyLengthfrontend/static/stories/english.json— initial English story contentbackend/src/dal/story.ts— new DAL: disk read, in-memory cache, English fallbackbackend/src/api/controllers/story.ts— new controllerbackend/src/api/routes/stories.ts— new routebackend/src/api/routes/index.ts— registered stories routeI've tried to follow MonkeyType's existing patterns as closely as possible throughout — the schema structure, contract style, config metadata approach, DAL pattern, and UI conventions all mirror what's already in the codebase. I'm happy to make any changes the team feels are needed, whether that's content adjustments, naming, or anything else. Thank you for the time reviewing this — MonkeyType is a genuinely great project and I hope this is a worthwhile addition. 🙏
Checks
Reference Images