Flashcard Fortress
Overview
Flashcard Fortress is a Cordova mobile app that combines flashcard study with tower defense gameplay. Users create flashcard sets, pick a set to practice, then answer questions to earn in-game currency for towers and upgrades.
This project shows full-stack mobile work: Cordova for the app shell, PHP endpoints for the backend, MySQL for persistence, and a game loop that ties study mechanics directly to tower defense gameplay. The interesting part is that study mechanics aren't just attached to a game; they drive the gameplay economy.
The App in Action
Below is a playable slice of the tower defense loop where correct answers translate directly into resources.
What is the definition of: Mitochondria?
Select a tower, then place it on a highlighted non-path tile.
The Game Loop: answer flashcards to earn coins, spend those coins on towers, then run enemy waves across the map. This inline demo is intentionally small, but it mirrors the core loop from the Cordova app.
Architecture
Logical Class View
CordovaWebViewShell
- + attachPlugins()
- + resumeWebApp()
StudyAndGameUI
- - root: HTMLElement
- + renderDashboard()
- + bindTowerDefenseCanvas()
StudyFlowController
- + openSet(id)
- + gradeAnswer()
- + syncProgressSnapshot()
MySqlPersistenceStore
- - dsn: string
- + query(sql, params)
- + executeTx(ops)
PhpStudyService
- - session: ServerSession
- + handleAuth()
- + flashcardsCRUD()
- + persistGameState()
PhpApiClient
- + post(path, body): Promise
- + get(path): Promise
- CordovaWebViewShell *-- StudyAndGameUI
- StudyAndGameUI --> StudyFlowController
- StudyFlowController ..> PhpApiClient
- PhpApiClient ..> PhpStudyService HTTPS/JSON
- PhpStudyService ..> MySqlPersistenceStore SQL
Conceptual names map to the Cordova app layout: www holds the UI and controllers; PHP scripts and schema-backed SQL live on the host that serves the API.
- Frontend: HTML5, Cordova, Vanilla JavaScript, Bootstrap 5 for responsive layouts.
- Backend: PHP + MySQL for account management, flashcard CRUD, and game state persistence.
- Plugins: Camera, screen orientation, dialogs, and photo library integration for camera access and native UI dialogs.
- State: LocalStorage for game-state caching + remote database synchronization.
What It Shows
- Full-stack mobile development from UI design through database-backed persistence.
- Product thinking: study mechanics drive the gameplay economy, not just sit alongside it.
- Cross-platform deployment via Cordova to Android (APK).
- Authentication flows, content management, and game logic working together.