diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..628b6ce
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,20 @@
+# Use Node.js LTS version
+FROM node:20-bookworm-slim
+
+# Set working directory
+WORKDIR /app
+
+# Copy package files
+COPY package*.json ./
+
+# Install dependencies
+RUN npm install
+
+# Copy project files
+COPY . .
+
+# Expose the port Vite runs on
+EXPOSE 3000
+
+# Start the development server
+CMD ["npm", "run", "dev"]
diff --git a/README.md b/README.md
index 0e8cd9c..21da801 100644
--- a/README.md
+++ b/README.md
@@ -2,43 +2,19 @@
-# Aura Craft Studio: Shared UI Framework
+# Run and deploy your AI Studio app
-This repository provides a reusable UI skeleton with integrated Authentication, Theme management, and AI Connection services. It is designed to work seamlessly both in Google AI Studio (Studio Mode) and in standard deployed environments.
+This contains everything you need to run your app locally.
-## 🌟 High-Level Overview
+View your app in AI Studio: https://ai.studio/apps/9f4101c2-8730-451b-9134-3b46f26726c6
-Aura Craft Studio is a modular foundation for building AI-powered applications. It abstracts away the complexities of:
-- **Authentication & RBAC:** Seamless user identity management across different hosting modes.
-- **AI Connectivity:** Pre-wired access to Google Gemini models via a secure proxy.
-- **Theming:** A robust light/dark mode system powered by Tailwind CSS.
-- **Cloud Storage:** Standardized operations for R2 storage (upload, download, list).
-- **Architecture:** A strict Container/View pattern that ensures long-term scalability and code quality.
+## Run Locally
-## 📖 Critical Documentation
+**Prerequisites:** Node.js
-### 🚀 [instructions.md](./instructions.md)
-The essential "Getting Started" guide. It details the initial setup of `metadata.json` and provides the **Mandatory Prompt Template** required for AI-accelerated feature development.
-### 📜 [rules.md](./rules.md)
-The "Source of Truth" for development boundaries. It defines which parts of the system are immutable (the "Wiring") and establishes coding standards like the 200-line file limit and modular feature grouping.
-
----
-
-## 💻 Run Locally
-
-**Prerequisites:** Node.js
-
-1. **Install dependencies:**
+1. Install dependencies:
`npm install`
-2. **Set the API Key:**
- Set the `GEMINI_API_KEY` in [.env.local](.env.local) to your Gemini API key.
-3. **Run the app:**
+2. Set the `GEMINI_API_KEY` in [.env.local](.env.local) to your Gemini API key
+3. Run the app:
`npm run dev`
-
----
-
-## 🛠️ Project Links
-
-- **AI Studio App:** [https://ai.studio/apps/drive/1eaFbkjczgCmq_TXULG7_eSOgkyaGX1Yk](https://ai.studio/apps/drive/1eaFbkjczgCmq_TXULG7_eSOgkyaGX1Yk)
-- **Organization:** HumanizeIQ
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..99b5f3b
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,17 @@
+version: '3.8'
+
+services:
+ aura_central:
+ build:
+ context: .
+ dockerfile: Dockerfile
+ command: sh -lc "if [ ! -d node_modules ] || [ -z \"$(ls -A node_modules 2>/dev/null)\" ] || [ ! -d node_modules/@rollup/rollup-linux-arm64-musl ]; then npm ci --include=optional; fi; npm run dev"
+ ports:
+ - "3000:3000"
+ volumes:
+ - .:/app
+ - /app/node_modules
+ environment:
+ - GEMINI_API_KEY=${GEMINI_API_KEY}
+ stdin_open: true
+ tty: true
diff --git a/docs/blueprint.md b/docs/blueprint.md
new file mode 100644
index 0000000..fbd328e
--- /dev/null
+++ b/docs/blueprint.md
@@ -0,0 +1,24 @@
+# Aura Central App Blueprint
+
+## Overview
+Aura Central is a "Central Nervous System" application designed to be a personal AI assistant and productivity dashboard. It features a modern, high-density interface with real-time updates and multi-modal interaction (Chat, Voice, Meet).
+
+## Core Features
+- **Multi-step Authentication**: A secure, invite-only onboarding process with email, phone, and 2FA (TOTP) verification.
+- **Subscription Management**: A billing flow for managing AI credits and plan levels.
+- **Intelligent Dashboard**: A centralized hub for tasks, schedule, files, and recent communications.
+- **Multi-modal Assistant (Ask Aura)**:
+ - **Chat**: Text-based interaction with Gemini AI.
+ - **Voice**: Real-time voice interaction.
+ - **Meet**: Meeting transcription and summarization.
+- **Contextual View Modes**: Toggle between "Professional" and "Personal" modes to filter relevant tasks and information.
+
+## Technical Stack
+- **Frontend**: React with TypeScript.
+- **Styling**: Tailwind CSS with custom theme variables.
+- **Animations**: Framer Motion (motion/react).
+- **Backend/Database**: Firebase (Firestore & Authentication).
+- **AI Integration**: Google Gemini API via `@google/genai`.
+
+## Architecture
+The app follows a Single Page Application (SPA) architecture. The main `App.tsx` handles the core layout and state management, while specialized components handle the authentication and subscription flows. Styling is modularized into several CSS files to separate concerns (theme, layout, components, etc.).
diff --git a/docs/filespec.md b/docs/filespec.md
new file mode 100644
index 0000000..6c86a93
--- /dev/null
+++ b/docs/filespec.md
@@ -0,0 +1,32 @@
+# Aura Central File Specification
+
+## Root Directory
+- **.env.example**: Template for environment variables (e.g., Gemini API Key).
+- **.gitignore**: Specifies files and directories to be ignored by Git.
+- **firebase-applet-config.json**: Configuration for the Firebase project (API keys, project IDs).
+- **firebase-blueprint.json**: Intermediate representation of the Firestore data structure.
+- **firestore.rules**: Security rules for the Firestore database.
+- **index.html**: The main entry point for the browser.
+- **metadata.json**: Application metadata (name, description, permissions).
+- **package.json**: Manages npm dependencies and scripts.
+- **tsconfig.json**: TypeScript compiler configuration.
+- **vite.config.ts**: Configuration for the Vite build tool.
+
+## /src Directory
+- **App.tsx**: The main application component. It handles the core dashboard layout, state management, and view mode toggling.
+- **firebase.ts**: Initializes the Firebase SDK and exports the database and authentication instances.
+- **index.css**: The main entry point for CSS, importing all modular style files.
+- **main.tsx**: The entry point for the React application, rendering the `App` component.
+
+## /src/components Directory
+- **AuthFlow.tsx**: Implements the multi-step onboarding process (Welcome, Invite Code, Email, Phone, 2FA).
+- **SubscriptionFlow.tsx**: Handles the billing and credit top-up process for Aura Pro subscriptions.
+
+## /src/styles Directory
+- **aura.css**: Styles specific to the "Ask Aura" assistant (chat bubbles, suggestion pills, voice/meet circles).
+- **auth.css**: Styles for the authentication and onboarding flow.
+- **base.css**: Global base styles, resets, and custom scrollbar styling.
+- **components.css**: Reusable UI component styles (cards, inputs, buttons, badges) defined as Tailwind utilities.
+- **layout.css**: Styles for the main dashboard grid, header, and toolbar.
+- **theme.css**: Defines the color palette, CSS variables, and dark mode configuration.
+- **utilities.css**: Additional custom utility classes for the application.
diff --git a/firebase-applet-config.json b/firebase-applet-config.json
new file mode 100644
index 0000000..e5498e2
--- /dev/null
+++ b/firebase-applet-config.json
@@ -0,0 +1,10 @@
+{
+ "projectId": "gen-lang-client-0408711807",
+ "appId": "1:1099064516953:web:2f3d7fa475bd4194546c48",
+ "apiKey": "AIzaSyB28OqUKvw94yNEbkHhSSPn43qdPce-1t4",
+ "authDomain": "gen-lang-client-0408711807.firebaseapp.com",
+ "firestoreDatabaseId": "ai-studio-9f4101c2-8730-451b-9134-3b46f26726c6",
+ "storageBucket": "gen-lang-client-0408711807.firebasestorage.app",
+ "messagingSenderId": "1099064516953",
+ "measurementId": ""
+}
\ No newline at end of file
diff --git a/firebase-blueprint.json b/firebase-blueprint.json
new file mode 100644
index 0000000..5ec23b6
--- /dev/null
+++ b/firebase-blueprint.json
@@ -0,0 +1,73 @@
+{
+ "entities": {
+ "User": {
+ "title": "User",
+ "description": "A user of the Aura platform.",
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The user's full name."
+ },
+ "email": {
+ "type": "string",
+ "format": "email",
+ "description": "The user's email address."
+ },
+ "phone": {
+ "type": "string",
+ "description": "The user's phone number."
+ },
+ "uid": {
+ "type": "string",
+ "description": "The user's unique Firebase Auth ID."
+ },
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "When the user account was created."
+ }
+ },
+ "required": ["name", "email", "phone", "uid", "createdAt"]
+ },
+ "Subscription": {
+ "title": "Subscription",
+ "description": "A user's subscription and credit settings.",
+ "type": "object",
+ "properties": {
+ "plan": {
+ "type": "string",
+ "description": "The selected Aura plan."
+ },
+ "topUpAmount": {
+ "type": "number",
+ "description": "The amount to top up."
+ },
+ "rechargeLevel": {
+ "type": "number",
+ "description": "The balance level at which to auto-recharge."
+ },
+ "uid": {
+ "type": "string",
+ "description": "The user's unique Firebase Auth ID."
+ },
+ "updatedAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "When the subscription was last updated."
+ }
+ },
+ "required": ["plan", "topUpAmount", "rechargeLevel", "uid", "updatedAt"]
+ }
+ },
+ "firestore": {
+ "/users/{uid}": {
+ "schema": "User",
+ "description": "User profile data."
+ },
+ "/subscriptions/{uid}": {
+ "schema": "Subscription",
+ "description": "User subscription data."
+ }
+ }
+}
diff --git a/firestore.rules b/firestore.rules
new file mode 100644
index 0000000..cd8d81a
--- /dev/null
+++ b/firestore.rules
@@ -0,0 +1,89 @@
+rules_version = '2';
+service cloud.firestore {
+ match /databases/{database}/documents {
+ // ===============================================================
+ // Assumed Data Model
+ // ===============================================================
+ //
+ // Collection: users
+ // Document ID: {uid} (Firebase Auth UID)
+ // Fields:
+ // - name: string (required, 1-100 chars)
+ // - email: string (required, valid email format)
+ // - phone: string (required, 1-20 chars)
+ // - uid: string (required, matches document ID)
+ // - createdAt: string (required, ISO 8601 format)
+ //
+ // Collection: subscriptions
+ // Document ID: {uid} (Firebase Auth UID)
+ // Fields:
+ // - plan: string (required, enum: ['Aura Pro'])
+ // - topUpAmount: number (required, positive)
+ // - rechargeLevel: number (required, positive)
+ // - uid: string (required, matches document ID)
+ // - updatedAt: string (required, ISO 8601 format)
+ //
+ // ===============================================================
+
+ // ===============================================================
+ // Helper Functions
+ // ===============================================================
+
+ function isAuthenticated() {
+ return request.auth != null;
+ }
+
+ function isOwner(userId) {
+ return isAuthenticated() && request.auth.uid == userId;
+ }
+
+ function isValidEmail(email) {
+ return email is string && email.matches("^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$");
+ }
+
+ function isValidDateString(dateStr) {
+ return dateStr is string && dateStr.matches("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.*Z?$");
+ }
+
+ function hasOnlyAllowedFields(fields) {
+ return request.resource.data.keys().hasOnly(fields);
+ }
+
+ // Domain Validators
+
+ function isValidUser(data) {
+ return hasOnlyAllowedFields(['name', 'email', 'phone', 'uid', 'createdAt']) &&
+ data.name is string && data.name.size() > 0 && data.name.size() <= 100 &&
+ isValidEmail(data.email) &&
+ data.phone is string && data.phone.size() > 0 && data.phone.size() <= 20 &&
+ data.uid == request.auth.uid &&
+ isValidDateString(data.createdAt);
+ }
+
+ function isValidSubscription(data) {
+ return hasOnlyAllowedFields(['plan', 'topUpAmount', 'rechargeLevel', 'uid', 'updatedAt']) &&
+ data.plan in ['Aura Pro'] &&
+ data.topUpAmount is number && data.topUpAmount > 0 &&
+ data.rechargeLevel is number && data.rechargeLevel >= 0 &&
+ data.uid == request.auth.uid &&
+ isValidDateString(data.updatedAt);
+ }
+
+ // ===============================================================
+ // Rules
+ // ===============================================================
+
+ match /users/{uid} {
+ allow read, write: if true;
+ }
+
+ match /subscriptions/{uid} {
+ allow read, write: if true;
+ }
+
+ // Default deny
+ match /{path=**} {
+ allow read, write: if false;
+ }
+ }
+}
diff --git a/index.html b/index.html
index 2ec10b3..282c624 100644
--- a/index.html
+++ b/index.html
@@ -1,57 +1,13 @@
-
+