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.

Tower Defense

Lives: 3 Coins: 100 Wave: 1/20 Timer: 00:30

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 *-- 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.
More Posts