Application README

Next steps, required secrets, and testing guide for the Pleading Sanity AI prototype.

Required Environment Variables
Create a `.env.local` file in the root of the project and add the following keys.
PAYHIP_API_KEY
TIKTOK_SHOP_KEY
SPOTIFY_CLIENT_ID
SPOTIFY_CLIENT_SECRET
YT_API_KEY
NEXT_PUBLIC_FIREBASE_API_KEY
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN
NEXT_PUBLIC_FIREBASE_PROJECT_ID
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID
NEXT_PUBLIC_FIREBASE_APP_ID
FIREBASE_CLIENT_EMAIL
FIREBASE_PRIVATE_KEY
GEMINI_API_KEY
Prototype Test Steps
Follow these steps to test the implemented UI modules.

Auth & Profiles

Navigate to /login. Attempt to sign up, sign in, and continue as a guest. Visit /profile to see mock data.

Sanity Feed AI

Go to /feed to see mock, auto-generated posts. The layout and components are ready for the generation function.

Podcast Portal AI

Visit /podcast. The UI for uploading audio or pasting text is present. Backend function stubs need to be implemented.

Mindful Games & Journal AI

Explore /games for mindful activity cards. On /journal, the UI for writing entries and seeing AI prompts is ready.

Frequency Resonance Engine

On the /audio page, see the grid of playable frequencies and ambient sounds. Playback logic needs wiring.

Admin Console

Go to /admin. The tabbed interface shows approval queues for feed, merch, and reports with mock data.

Arron AI Chat

Click the 'Chat with Arron' button or go to /chat. The chat interface is built and ready for the AI logic to be connected.

Search

The search bar in the header is a UI placeholder. The /search page is also ready for the search implementation.

Next Steps
Key development tasks to move the prototype forward.

1. Connect Firebase services (Auth, Firestore, Storage).

2. Implement server-side logic in Cloud Functions for all AI flows (e.g., `podcast/summarize`, `cron/feedGenerate`).

3. Wire up the AI chat (Arron) to the Gemini SDK.

4. Build out the backend for the admin approval queues.

5. Implement audio playback logic for the Frequency Resonance Engine.

6. Create the semantic search function and generate embeddings for content.

7. Set up PWA/Workbox for offline capabilities.