An interactive story/game engine for a choose-your-own adventure experience introducing technical topics and innovative products.
- Interactive Storytelling: Navigate through story pages with custom components
- Inventory System: Collect and manage items throughout the adventure
- Responsive Design: Works on desktop and mobile devices
- Modern Tech Stack: Built with Astro, Vue and Tailwind CSS
- Node.js (version 16 or higher)
- npm or yarn
- Clone the repository:
git clone https://github.com/jlooper/clara-denari.git
cd clara-denari- Install dependencies:
npm install- Start the development server:
npm run dev- Open your browser and navigate to
http://localhost:4321
src/
├── components/ # Reusable Astro components
│ ├── Nav.astro # Navigation component
│ ├── Inventory.astro # Inventory management
│ ├── Page.astro # Page navigation component
│ ├── Item.astro # Interactive item component
│ └── Footer.astro # Footer component
├── layouts/ # Page layouts
│ └── Layout.astro # Main layout with backdrop support
├── pages/ # Story pages
│ ├── index.astro # Home page
│ ├── 1.astro # Story page 1
│ └── 2.astro # Story page 2
├── data/ # Game data
│ └── items.json # Item definitions
└── utils/ # Utility functions
└── helpers.js # Inventory management helpers
Used for navigation between story pages:
<Page url="1" instructions="" action="Press the button" condition="none" />Used for interactive items that can be collected:
<Item id="1" />npm run buildThe built files will be in the dist/ directory.
To enable Google Analytics tracking:
-
Create a Google Analytics Account:
- Visit Google Analytics
- Create a new GA4 property for your website
-
Get Your Tracking ID:
- In Google Analytics, go to Admin → Data Streams
- Select your web stream
- Copy the Measurement ID (format: G-XXXXXXXXXX)
-
Set Environment Variable:
- Create a
.envfile in your project root - Add your tracking ID:
PUBLIC_GA_TRACKING_ID=G-XXXXXXXXXX
- Create a
-
Deploy:
- The Google Analytics script will automatically be included on all pages
- Analytics will start tracking once deployed
- Astro: Static site generator
- Tailwind CSS: Utility-first CSS framework
- JavaScript: Client-side interactivity
- Local Storage: State persistence
MIT License - see LICENSE file for details.