Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions renderers/lit/src/0.8/ui/surface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export class Surface extends Root {
.childComponents=${this.surface?.componentTree
? [this.surface.componentTree]
: null}
.enableCustomElements=${this.enableCustomElements}
></a2ui-root>`;
}

Expand Down
64 changes: 64 additions & 0 deletions samples/personalized_learning/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Docker build ignore file
# These files are not needed in the container

# Python
.venv/
__pycache__/
*.pyc
*.pyo
*.egg-info/

# Node (we install fresh in container)
node_modules/
package-lock.json

# Build artifacts (we build fresh)
# Use /dist/ to only exclude root-level dist, not a2ui-web-lib/dist/
/dist/
/build/

# IDE and editor files
.idea/
.vscode/
*.swp
*.swo
.DS_Store

# Git
.git/
.gitignore
.gcloudignore

# Local config (but NOT .env - needed for Vite build to get VITE_FIREBASE_* vars)
.env.local
*.log

# Test files
tests/

# Documentation (except README)
REVIEW.md
*.md
!README.md

# Jupyter
*.ipynb
.ipynb_checkpoints/

# Firebase config
.firebase/
.firebaserc
firebase.json
firebase-debug.log

# Agent files (not needed for frontend)
agent/
learner_context/
deploy.py
deploy_hosting.py

# ADK local files
.adk/

# Demo log
demo-message-log.json
45 changes: 45 additions & 0 deletions samples/personalized_learning/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Personalized Learning Demo - Environment Configuration
# Copy this file to .env and fill in your values

# =============================================================================
# REQUIRED - Google Cloud Configuration
# =============================================================================

# Your Google Cloud project ID
GOOGLE_CLOUD_PROJECT=your-project-id

# =============================================================================
# REQUIRED (after agent deployment) - Agent Engine Configuration
# =============================================================================

# These values are output when you deploy the agent (see QUICKSTART.md)
# You can find them in the Google Cloud Console under Vertex AI > Agent Engine

# Your GCP project NUMBER (not ID) - find at https://console.cloud.google.com/home/dashboard
AGENT_ENGINE_PROJECT_NUMBER=

# The resource ID of your deployed agent (output from deploy.py)
AGENT_ENGINE_RESOURCE_ID=

# =============================================================================
# OPTIONAL - Customization
# =============================================================================

# API server port (default: 8080)
# API_PORT=8080

# GCP region (default: us-central1)
# GOOGLE_CLOUD_LOCATION=us-central1

# Gemini model to use (default: gemini-2.5-flash)
# GENAI_MODEL=gemini-2.5-flash

# =============================================================================
# OPTIONAL - Context Data Storage
# =============================================================================

# By default, context data is loaded from local learner_context/ directory.
# Optionally, you can load from Google Cloud Storage:

# GCS_CONTEXT_BUCKET=your-bucket-name
# GCS_CONTEXT_PREFIX=learner_context/
5 changes: 5 additions & 0 deletions samples/personalized_learning/.firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "your-project-id"
}
}
55 changes: 55 additions & 0 deletions samples/personalized_learning/.gcloudignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This file specifies files that are *not* uploaded to Google Cloud
# using gcloud. It follows the same syntax as .gitignore.

# Python
.venv/
__pycache__/
*.pyc
*.pyo
*.egg-info/

# Node
node_modules/

# Build artifacts (we build fresh in container)
# Use /dist/ to only exclude root-level dist, not a2ui-web-lib/dist/
/dist/
/build/

# IDE and editor files
.idea/
.vscode/
*.swp
*.swo
.DS_Store

# Git
.git/
.gitignore

# Local config (but NOT .env - needed for Vite build to get VITE_FIREBASE_* vars)
.env.local
*.log

# Test files
tests/

# Documentation
*.md
!README.md

# Jupyter
*.ipynb
.ipynb_checkpoints/

# Firebase (not needed for Cloud Run build)
.firebase/
firebase-debug.log

# Agent deployment files (separate from frontend)
agent/
learner_context/
deploy.py

# ADK local files
.adk/
44 changes: 44 additions & 0 deletions samples/personalized_learning/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Dependencies
node_modules/
package-lock.json

# Build output
dist/

# Python
__pycache__/
*.pyc
*.pyo
.venv/
venv/
*.egg-info/
build/

# ADK local runtime
.adk/

# Environment
.env

# Runtime files
demo-message-log.json

# OS files
.DS_Store
Thumbs.db

# Large media assets (generate via NotebookLM - see NOTEBOOKLM_GUIDE.md)
public/assets/*.m4a
public/assets/*.mp4

# IDE
.idea/
.vscode/
*.swp
*.swo

# Firebase cache
.firebase/

# Temporary A2UI copy for Cloud Run deployment
a2ui-web-lib/
36 changes: 36 additions & 0 deletions samples/personalized_learning/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Personalized Learning Demo - Cloud Run Dockerfile
# Serves both the Vite frontend and the API server

FROM node:20-slim

WORKDIR /app

# Copy everything first
COPY . .

# Update package.json to point to the local copy instead of ../../renderers/lit
RUN sed -i 's|file:../../renderers/lit|file:./a2ui-web-lib|g' package.json

# Rename the package from @a2ui/lit to @a2ui/web-lib so imports resolve correctly
# (the source code imports from @a2ui/web-lib but the actual package is @a2ui/lit)
RUN sed -i 's|"name": "@a2ui/lit"|"name": "@a2ui/web-lib"|g' a2ui-web-lib/package.json

# Remove prepack script to prevent rebuild during npm install
# (we copy pre-built dist/; the wireit build references ../../specification/ which doesn't exist)
RUN sed -i '/"prepack":/d' a2ui-web-lib/package.json

# Install dependencies using public npm registry
RUN npm install --registry https://registry.npmjs.org/

# Build the Vite frontend
RUN npm run build

# Set production environment
ENV PORT=8080
ENV NODE_ENV=production

# Expose port
EXPOSE 8080

# Run the API server (serves both API and static files in production)
CMD ["npx", "tsx", "api-server.ts"]
Loading