Functional Design Specification
Implemented behavior, learning rules, browser storage and acceptance criteria for Easy Spanish.
1. Purpose and scope
Easy Spanish helps German-speaking beginners acquire practical European Spanish for recurring stays in Spain. The product prioritizes language learners can use in everyday situations.
1.1 Product objectives
- Prioritize high-frequency expressions for greetings, requests, questions, shopping, restaurants, neighbors, family and mobility.
- Support recognition, independent recall, listening, sentence construction and contextual application with manageable practice sessions.
- Adapt repetition to the learner's recorded evidence without mandatory self-rating.
- Allow operation on static web hosting without a user account, application backend or server-side learning database.
1.2 Content baseline
563 vocabulary entries, 206 phrases, 37 interactive conversations, 37 guided audio episodes and 108 sentence-construction tasks in 12 groups. The 100 core expressions are a prioritized selection of the full content, including new communicative building blocks. The five overlapping areas are contact and comprehension, sentence building blocks, questions/numbers/quantities, everyday vocabulary, and everyday conversations. Early introductions interleave greetings, usable verb forms, requests and typical replies. Focus collections and the full collections retain established learning identifiers. Dialogue prices and scenarios are illustrative.
1.3 Out of scope
Cloud synchronization, user accounts, generative conversation, objective pronunciation assessment, CEFR certification and guaranteed availability of every audio clip offline are not part of this baseline.
2. Views and navigation
The four main destinations are Start, Training, Audio and Wortschatz. Back arrows return from practice views to Training.
| View | Purpose | Main behavior |
|---|---|---|
| Start | Orientation and progress | Introduction, personal training shortcut, learning statistics where available, records and backup. |
| Training | Personal and targeted practice | Mixed session; word and phrase cards under Grundlagen lernen; six targeted exercises including dialog; optional trip date and daily goal. |
| Audio | Screen-free learning | Four modes, episode choice, duration, thinking pause, audio playback and download. |
| Wörter (Training) | Vocabulary cards | Focus/full pool, recommended or manual level and category, direction, reveal, audio, microphone and manual status. |
| Phrasen (Training) | Phrase cards | Same core interaction as words, adapted to complete expressions. |
| Dialog (Training) | Contextual response practice | Scene selection, scripted turns, choice or speech, delayed translation, restart. |
| Wortschatz | Search and maintenance | Combined catalogue or word/phrase filters, German or Spanish search, pronunciation, favorites, direction and status filters, manual status changes. |
Documentation, legal notice and privacy information are linked separately. Content scrolls in the document; bottom navigation is reserved in the application layout.
3. Functional specifications
FDS-UI-01Home and onboarding
- Start offers shortcuts to personal training and audio. The introduction remains available. Progress and unused records stay hidden until relevant learning data exists.
- The expandable learning path shows connected skill areas. Each area reports practiced and secure core expressions. Training shows the topic of the next task separately.
- An evaluated response on any skill track counts as practice in the path. Secure requires successful active recall at Secure or Mastered. Unscored exposure and scheduled tasks do not advance either count.
- Separate expandable sections explain the learning routine and methodology, with links to GER A1, Cervantes and vocabulary-learning research.
FDS-CARD-01Words and phrases
- Choose focus or full content, level, category and direction (ES → DE or DE → ES). Recommended is the initial level. Manual filters remain available.
- Revealing the hidden side records presentation separately from a correct response. Passing over a card without revealing leaves presentation unchanged.
- Words, phrases and sentence tasks include approximate, German-readable Spanish pronunciation. Playback uses installed recordings or browser synthesis.
- Favorites and manual status changes are optional.
FDS-TRN-01Personal training
Session and controls
- Mixed and targeted sessions continue until explicitly ended. Mixed training recalculates a lookahead of up to ten tasks after each completion or skip and keeps recent-item history within the session.
- An unknown expression first appears as Neu · Kennenlernen when there is no confirmed bilingual presentation or successful review. This also applies to targeted word or phrase tasks and quiz questions. A legacy skip establishes no presentation or recall credit.
- A correct spoken answer automatically advances to the next task after three seconds when the training view stays visible and audio playback is idle. Incorrect, ambiguous and typed answers stay on the current task. Short tasks share prompt, input and feedback geometry. Pronunciation stays centered and the input uses the full width. Long content or microphone diagnostics can increase card height.
- Navigation and the back arrow pause the session and stop speech and playback. Training resumes the task, draft and response state from memory. Explicit exit ends the session without confirmation. Scored work stays saved after exit, refresh or a switch to targeted practice.
Task selection
Mermaid source
flowchart TD
accTitle: How personal training selects a task
accDescr: The planner reads progress and session history and builds practice candidates. A new expression can enter the plan when the introduction rules allow it. It then competes with the other candidates. Review pressure increases review priority and reduces introduction priority.
A["Read progress and session"] --> B["Build practice candidates"]
B --> C["New expression eligible?"]
C -->|"Yes"| D["Add one new expression"]
C -->|"No"| P["Practice candidates only"]
D --> E["Rank candidates"]
P --> E
E --> F["Select the next task"]
class C decision
classDef decision stroke-dasharray:4 3
Mixed training has no fixed daily introduction limit. The current review evidence determines the minimum spacing and the maximum number of recent expressions still awaiting active recall.
| Recent review evidence | Minimum completed tasks between introductions | Maximum recent expressions awaiting active recall |
|---|---|---|
| Strong | 3 | 9 |
| Standard | 4 | 6 |
| Struggling | 6 | 4 |
While fewer than three expressions are known, the minimum spacing is two tasks. Travel within seven days adds two tasks. The first expression can be offered immediately.
- Prefer due tracks and core expressions. More or older eligible reviews, including sentence tasks, reduce introduction priority. When the backlog is manageable, longer waits favor the next core expression.
- Mix free recall, listening, receptive practice, recognition and sentence tasks. Successful free recall makes choice in the same direction optional. Choice maintains its own evidence.
- An active-recall lapse can prioritize a supporting recognition task. New sentence tasks need at least two links to successfully recalled lexical items using supported forms.
- Schedule a failed task again after three intervening tasks where possible. Keep up to three pending retries in the mixed session. A retry cannot schedule another retry.
Which task appears next
Mermaid source
flowchart TD
accTitle: Priority order for the next personal-training task
accDescr: After replanning, a pending dialog takes priority over a ready retry, which takes priority over starting an eligible dialog. If none applies, take the highest-ranked available candidate, avoiding a direct repeat where possible.
A["Replan after task"] --> B["Pending dialog?"]
B -->|"Yes"| C["Continue dialog"]
B -->|"No"| D["Retry ready?"]
D -->|"No"| F["Dialog eligible?"]
D -->|"Yes"| E["Serve retry"]
F -->|"Yes"| G["Start dialog"]
F -->|"No"| H["Use ranked plan"]
class B,D,F decision
classDef decision stroke-dasharray:4 3
The ranked plan favors the highest-ranked candidate that differs from the current item, when possible. If the next turn of a pending dialog has been excluded, fall back to that plan for this step.
FDS-TRN-02Targeted practice and quiz
- Offer speaking, writing, listening and sentence construction, a dialog entry, and a classic quiz based on deduplicated words and phrases.
- Targeted practice can exceed the recommended card introduction budget. Score choice and free recall independently. In mixed training, the learner can speak a displayed Spanish answer in a German-to-Spanish choice task. Ambiguous recognition leaves the question open. A skip or reveal gives no independent answer credit.
FDS-SENT-01Sentence construction
- Show a German prompt and shuffled Spanish chunks. Allow edits, checking, hints, reveal and skip. Keep the primary action stable and put the hint next to the instructions, apart from exit.
- Give short feedback and accept curated alternative orderings where supported. The 12 structure groups span requests, needs, ability, possession, availability, questions, state, negation, quantities, present, past and future.
- Use a separate history for due tasks and weaker groups. The level increases after 8 and 24 distinct correctly solved tasks. Hint-assisted success schedules further practice without independent mastery credit.
FDS-DLG-01Interactive conversation
- Play an authored scene with response branches. New Spanish turns and choices start with translations hidden. Tap or hold to reveal a translation. After answering, earlier turns become translated. All are visible at the end. Restart resets the scene.
- Mixed training may include two consecutive response turns from a guided audio episode once both exact expressions have positive active-recall evidence. The learner gets the original audio, optional translation and a German response cue.
- Offer each segment once per session and space segments by at least eight completed tasks. Speech input matches defined alternatives and reuses the relevant expression progress.
FDS-LST-01Content lookup
Search the word or phrase collection, filter by directional learning status or marked items, and apply manual status changes. List display avoids duplicate entries. Changes affect shared progress, not the underlying content.
FDS-STAT-01Progress and goals
Measures
- Show estimated time for today and the last seven days, learning and quiz streaks, available skills, sentence practice and progress by topic. The two record cards appear together once either has a record.
- Each skill reports practiced items and items classified Secure or Mastered. Practice counts scored responses in that skill. Sentence practice includes evaluated, hint-assisted responses. Manual status can contribute to the secure count. The core summary counts productive recall of the prioritized expressions.
Time and goals
- Measure time from relevant actions in visible learning views and observed audio playback. Filters, settings, audio preparation, hidden tabs and long gaps are excluded. Inactivity stops accumulating after 30 seconds. Past time is retained as recorded.
- Count a learning day after 60 seconds of observed interactive and audio activity. Preserve existing streak records.
- The goal defaults to 15 minutes. Options are off, 5, 10, 15, 20 and 30 minutes. Existing explicit preferences are preserved. An optional trip date slows introductions before travel.
4. Learning engine and process flow
4.1 Independent evidence tracks
| Track | Evidence | Key |
|---|---|---|
| Productive recall | Free German-to-Spanish response | active |
| Receptive recall | Free Spanish-to-German response | passive |
| Productive recognition | German-to-Spanish choice | choiceActive |
| Receptive recognition | Spanish-to-German choice | choicePassive |
| Listening | Audio prompt with answer choices | listening |
| Sentence construction | Assembled sentence, separate history | Sentence ledger |
4.2 Selection and scheduling FDS-LRN-01
Recommended cards and quiz
- Use stable IDs and separate tracks. Omit excluded items. Rank by due state, lateness, past lapses and priority.
- For recommendations, target four previously unknown expressions per day across modes, or two if errors dominate or travel is within seven days. The separate per-track planning target is eight. Mixed training uses the session rules in FDS-TRN-01.
- Recommended card queues can insert up to two introductions after the first six due tasks. At the target, prefer familiar practice in less recently reviewed tracks. Offer a small extra batch if otherwise empty.
- For repeated overdue exposure-only tracks, reschedule viewing by two days without changing recall evidence, streak or interval. A live queue can add up to three retries after three intervening cards where possible.
After a scored response
- An incorrect response resets the streak and schedules a review after ten minutes.
- Correct due reviews increase the interval up to 365 days. Early correct reviews add evidence while keeping the existing due time.
- Secure requires at least two consecutive successful reviews and an interval of at least three days. Mastered requires at least four and an interval of at least 30 days. Manual status changes can set these values. The scheduler uses local heuristics.
4.3 Response processing FDS-LRN-02
Mermaid source
flowchart TD
accTitle: How training actions are recorded
accDescr: Free or multiple-choice answers update the corresponding track. Introduction or help records only supported evidence. Skipping adds no correct response. The planner selects the next task.
A["Show task"] --> B["Scored answer?"]
B -->|"Yes"| C["Update track"]
B -->|"No"| D["Record exposure or skip"]
C --> E["Replan task"]
D --> E
class B decision
classDef decision stroke-dasharray:4 3
Answer matching
- Normalize case, punctuation, whitespace and Spanish vowel accents. Accept missing Spanish ñ/ü keyboard marks and show the correct spelling. German umlauts stay distinct.
- For supported German answers, match unsigned integers from 0 to 9999 in digits or words. Spanish productive answers still require Spanish words where applicable. Signed and decimal forms are distinct.
- Compare the full normalized answer with supported variants. Mixed training also accepts curated variants and selected optional subject pronouns.
- Accept authored slash-separated alternatives and common equivalent responses such as OK and in Ordnung. Free recall also permits one adjacent transposition or an accidentally doubled letter in a longer unknown spelling. Keep word order, negation and number meaning intact.
- Give corrective feedback for recognized article near misses and the dos café / dos cafés case without credit. Recognition failures alone leave language scoring untouched.
5. Speech and audio
FDS-AUD-01Interactive speech
Playback
- Prefer the matching installed recording, with browser synthesis as a fallback. Offer normal and slow Spanish playback where supported.
- Provide pronunciation controls for word and phrase cards, personal training, quiz feedback, the list and visible conversation turns. Keep a concealed answer unavailable until evaluation or reveal.
Recognition and recovery
- Use one controller for cards, free recall, quiz and conversation. Cards and training share a preference. Quiz and conversation have their own input controls.
- Start recognition directly from a user gesture in the expected answer language. After a successful start, try it on subsequent eligible tasks. In Training, reopen short silent captures within one 25-second window while the same exercise is active. Score final text only. Mixed and targeted recall can display interim text.
- Stop on navigation, hidden document or audio playback and discard stale callbacks. A recognition error pauses automatic attempts and offers direct retry. Text, keyboard dictation or answer selection remain available where applicable.
- Observe browser permission separately. Optional microphone diagnostics release all returned tracks, support cancellation and time out at twelve seconds. Recognition start times out at fifteen seconds.
- Where browser events permit, distinguish lack of audio/text from denial. On Android check Chrome website permission and Google voice typing. Browser compatibility and external recognition services vary.
FDS-AUD-02Audio sessions
Session options
- Four modes cover recommended mix, speaking, listening and guided everyday conversations. Legacy dialog preferences map to everyday conversations.
- Duration options are 5, 15 and 30 minutes. Denkpausen are 3, 5, 8 or 10 seconds, saved per mode. Defaults are 8 seconds for everyday conversations and 5 for other modes. Slow and normal model answers are optional.
- Choose a topic or specific episode. A selected episode plays in full and hides duration. In automatic all-topic sessions, short dialogs can fill remaining time.
Episode sequencing and history
- Show a German context, Spanish turns, translations, active response prompts and a final comprehension question. Omit the optional full Spanish replay when necessary to fit the budget.
- Rotate by least recently played, then easier levels. Mark episodes in history only after actual playback of their assembled range within 0.5 seconds. Seeking across the range gives no credit. Legacy timestamps aid rotation. Playback in external players is outside the measured session.
FDS-AUD-03Preparation and playback
- Resolve role/text keys in the manifest and fetch MP3 or compatible PCM WAV clips. Assemble one 24 kHz mono PCM WAV with pauses in the browser.
- Trim MP3 edge silence with 100 ms and 180 ms guards, match levels gently (±3 dB) and protect against clipping. Normal-speed replay uses a 0.38 s inter-turn pause in addition to the retained guards.
- Use measured optimized clip duration for planning when available. Show progress and the actual prepared length. Distinguish missing manifest, missing/invalid clips, HTTP failures and playback errors. Allow cancellation.
- Use native controls and offer the assembled WAV for download. Playback requires neither microphone input nor new synthesis requests. Background and lock-screen playback depend on the device.
6. Data and persistence
6.1 Domain and storage model
| Entity | Responsibility / relationship | Persistence |
|---|---|---|
| Content item | ID, Spanish/German text, optional pronunciation and metadata. One item has one progress record and five independent tracks. | Static scripts |
| Scene / guided conversation | Authored nodes and options, or ordered turns and comprehension prompt. | Static scripts |
| Sentence task | Prompt, chunks, group and explanation; independent review state. | Static scripts + Local Storage ledger |
| Progress record | Item ID, legacy counters, flags, track timestamps, interval, success/error counters and streak. | IndexedDB progress store |
| Preferences / statistics | View filters, language direction, settings, streaks, learning-time ledger, trip date and backup metadata. | Local Storage |
| Runtime session | Current view, card index, pending dialog, training plan, response state, audio URL and recognition. | Memory; selected preferences saved |
| Audio manifest | Role/text key to hashed clip filename and duration; source clips shared by sessions. | Static manifest and media files |
FDS-DAT-01Local data ownership
- Keep learning data local to the same origin and browser profile. Use established item IDs. The optional
presentedAtfield stores confirmed introduction separately from review tracks. - Handle legacy evidence conservatively. Reject malformed preferences and skip invalid progress records. Report storage failures in the UI.
- The early-stage compatibility policy permits a justified future reset of unusable records if startup remains functional.
FDS-DAT-02Backup and restore
File and merge rules
- Export JSON format 2 and accept formats 1 and 2. Validate identity, known IDs, records and the 2 MB import limit.
- Prefer the newer aggregate and newer state of each track independently. Keep local values on ties and preserve unrelated progress. Undirected legacy history carries no directional credit.
- Merge sentences by timestamp and learning time by the maximum per day and type. Restore missing preferences and records without overwriting existing ones. Use the maximum timestamp for audio-scene history.
Reminders and verification
- Show backup reminders on Start after the first 100 learning actions, a further 250 actions, or 14 days with new activity since export, import or dismissal.
- The native transfer test covers a downloaded JSON file, import into an empty profile, reload and repeat import. The existing browser fixture simulates persistence.
7. System architecture and interfaces
Static presentation and client-side application logic run in the browser. Classic scripts load in dependency order; content populates the shared data object, and the app initializer binds views after loading persistence. No server API or build step is required for normal use. A release packaging step generates the SHA-256 integrity table for the service worker.
| Component / interface | Functional responsibility |
|---|---|
index.html, css/ | View structure, responsive cards, navigation, semantic controls and status feedback. |
data/ | Words, phrases, conversations, guided audio scenes, sentence tasks, metadata and audio manifest. |
js/core.js, js/app.js, js/ui.js | Shared state, helpers, initialization, view routing and bindings. |
js/learning.js, js/training.js, js/sentences.js | Scheduling, training plan, sentence progress and answer handling. |
js/words.js, js/phrases.js, js/conversation.js, js/quiz.js, js/list.js | View-specific interaction, response handling and display. |
js/home.js, js/stats.js | Home state, recommended entry, time measurement and summaries. |
js/storage.js, js/backup.js | Browser persistence, validation, merge and transfer of backups. |
js/speech.js, js/audio.js | Browser speech, static clip resolution, decoding, assembly and playback. |
| External developer tool | Optional generation of speech assets using Azure Speech; credentials stay outside deployed web files. Not a runtime dependency. |
7.1 Deployment boundary
Deploy to the same HTTPS origin. Upload assets before replacing the main HTML; versioned references reduce stale caching. For the existing audio generator package, install only audio/ and data/audio-manifest.js when authorized; never copy its obsolete application HTML or player code over a newer release. Preserve an installed manifest when updating application files. Load an optional separate audio-extension.js manifest (absence is permitted) and merge only absent keys; extension ZIP contains only new MP3s and this separate manifest. Preserve an installed extension in future ordinary application updates. The documentation and legal pages are standalone static pages.
FDS-PWA-01Installability and offline operation
Installation and offline shell
- Provide manifest, standalone display, app icons and installation guidance appropriate to the browser. Hide installation guidance in standalone mode.
- Verify the complete release shell with SHA-256 using network fetches that bypass the browser HTTP cache. Keep the active release usable if verification fails.
- Cache core learning views for offline use. Cache audio clips on demand within a bounded cache. Browser storage, permissions and device behavior affect offline availability.
Updates
- Check for updates at registration, on return to the app and when back online. A manual check is available below the version on Start.
- Offer a verified waiting update there, with the target version if available. The user can activate or defer it. Closing all clients also lets a waiting worker activate.
- Reload after explicit activation. When another tab activates, offer reload when the user is ready.
Mermaid source
flowchart TD
accTitle: Verified app update
accDescr: An incomplete release leaves the current release active. A verified release waits. The user can activate it to reload or can close all clients so the browser activates it on its own.
A["Fetch release"] --> B["Files verified?"]
B -->|"No"| C["Keep current release"]
B -->|"Yes"| D["Update waits"]
D -->|"Accept or close tabs"| E["Activate update"]
class B decision
classDef decision stroke-dasharray:4 3
8. Quality and acceptance criteria
The following acceptance baseline defines observable behavior. It is not a certification or a claim that every criterion has been verified on every device. Tests use disposable browser storage and controlled fixtures; actual device and audio checks supplement automation.
| Reference | Acceptance criterion | Verification |
|---|---|---|
| FDS-UI-01 | All four primary destinations and all training subviews work; fresh profile hides empty progress; introduction remains available; consistent turquoise back arrows navigate to Training without discarding a live task, and the explicit end action is separate. All six targeted practice tiles and two card views are present. | Browser UI |
| FDS-CARD-01 | Recommended selection works in both views; reveal does not increment recall success; filters and direction operate correctly. | Browser / state |
| FDS-TRN-01/02 | Core items and due reviews are preferred; soft introduction targets, continuous practice and bounded retries hold; choice does not promote free recall. | Deterministic fixtures |
| FDS-SENT-01 | Correct ordering receives feedback; hints do not award independent recall; sentence review is saved separately. | Browser / state |
| FDS-DLG-01 | New translation stays hidden, manual reveal works, history becomes translated and restart clears the scene. | Browser UI |
| FDS-LST-01 | Search, filtering and status changes use shared IDs without duplicate list entries. | Browser UI |
| FDS-STAT-01 | Known time/track fixtures display correctly; hidden interactive activity and audio preparation do not inflate measured time. | Clock / media fixtures |
| FDS-LRN-01/02 | Track independence, wrong-answer delay, early review behavior and supported response variants remain consistent. | Unit-style checks |
| FDS-AUD-01/02/03 | Manifest references resolve; missing assets fail safely; four user-facing modes assemble valid playable audio; lock-screen playback checked separately. | Audio fixtures / device |
| FDS-DAT-01/02 | Reload retains progress; backup merge preserves newer and unrelated records; invalid backup is rejected; storage errors are visible. | Browser / import fixtures |
| FDS-NFR-01 | At mobile and desktop widths, documentation tables stay within their parent; text and controls remain readable; no document-wide horizontal overflow. | Responsive browser check |
| FDS-TRN-01 | Switching main views retains draft text, answered state, scoring and next task; explicit exit has no browser confirmation. | Browser UI |
| FDS-AUD-01 | Shared toggle starts recognition in the expected language; permission/service failure is visible, preference stays set, retry and text fallback remain possible. | Simulated recognition + physical devices |
| FDS-SENT-01 | For a typical short sentence at 320/390 px, answer area and primary action stay in place from selection through feedback; longer content may scroll. | Browser geometry |
| FDS-STAT-01 | No credit for setup alone; inactivity cap 30 seconds; default goal 15 minutes; previous explicit goal retained. | Controlled clock / UI |
| FDS-AUD-03 | All original clip keys remain compatible; edge trimming preserves internal pauses and prevents clipping; prepared audio is playable. | Signal / browser playback |
| FDS-PWA-01 | Install manifest and icons valid; successful complete shell cache, partial update rejected, previous shell retained, offline shell navigation, bounded on-demand media cache, no audio manifest overwrite. Verify the waiting-release information, deferred action and explicit reload. Verify real install/update/standalone behavior on devices separately. | Service worker harness / native browser / devices |
Release evidence
- Record results in the test report. Simulate different answer patterns, practice frequencies and breaks over eight and twenty-four weeks. Measure core coverage, productive recall, track activity and overdue reviews.
- Check a same-origin upgrade, reload persistence, real JSON transfer and repeated import separately from simulated storage.
- Verify that the update preserves stored data and leaves both audio manifests and the audio directory intact.
9. Limitations and release boundaries
- Recommended modes share the core priority and soft new-item target. Specific practice modes retain distinct task types and rules.
- Interactive time is approximate; even genuine learning-view interactions performed for testing count. The browser cannot infer attention; previously recorded time is not recalculated.
- Written pronunciation hints are complete for the existing learning catalog, but are approximate German-readable guides, not a linguistic or native-speaker certification.
- Speech matching is rule-based. Legitimate unexpected answers can be rejected, and recognized text does not measure pronunciation quality.
- Native mobile microphone and locked-screen playback depend on permissions, browser and OS behavior. Physical device validation remains outstanding.
- Original neural recordings are provided separately. Public deployment of free-tier recordings requires confirmed usage rights.
Update the relevant requirement and acceptance criterion when functional behavior changes. Record the release history in the changelog.