# Audible3 Production Launch Package

This package is the production server + latest Audible3 interface. It contains no seeded member accounts or dummy member login.

## Before first launch
1. Upload this folder to the Node.js application root for audible3.com.
2. Run `npm install --omit=dev` on the server.
3. Copy `.env.example` to `.env` and replace every placeholder.
4. Use MySQL for production. The app creates its tables and adds the new profile/credits/collection columns automatically.
5. Set `BOOTSTRAP_ADMIN_EMAIL` and `BOOTSTRAP_ADMIN_PASSWORD` for the first successful startup. The password must be at least 12 characters.
6. After the administrator can sign in, REMOVE `BOOTSTRAP_ADMIN_PASSWORD` from `.env` and restart the application. This prevents the bootstrap password from resetting the admin password on every restart.
7. Configure Stripe live Price IDs for Plus and Unlimited, then point the Stripe webhook to `https://audible3.com/api/stripe/webhook`.
8. Configure SMTP so forgot-password emails can be delivered.
9. Ensure the application user can write to `server-data/uploads/` and `server-data/`.

## Launch verification
- Guest navigation: Login + Sign Up only.
- Member navigation: Home, Library, My Collection, plus a Profile menu for Dashboard, Account, Membership, Billing, Contact, and Sign Out. No Admin tab is shown to members.
- Administrator: Admin tab and protected admin API routes, plus a Preview as Member mode that hides editing/admin controls until exited.
- Sign Up creates a real server account.
- Login uses JWT server authentication.
- Profile, password, preferences, collection, credits, reading/listening progress persist on the server/MySQL.
- Billing and card management redirect to Stripe; Audible3 does not collect raw card numbers.
- Book creation supports Series Name + Series Part.
- Public catalog can expose covers/metadata and an optional public preview audio sample; protected full audio/readable assets remain token-protected.
- Page-builder state is persisted to server settings by administrators.


## Member experience included in this release
- Personalized signed-in Home with Continue Listening, Continue Reading, Next in Your Series, and Recently Added shelves.
- Cover-first book cards with a subtle progress strip; title/details appear only on interaction.
- Smart Library search across title, series, topic/description, author, category, and publisher.
- Quick filters for All, Audiobooks, Series, Recently Added, and In My Collection.
- Persistent mini audio player that survives page changes.
- Full-book progress calculations and server sync during playback.
- Automatic reading-progress tracking while scrolling readable chapter text.
- Completion screen with Next in Series/related teaching and Favorite action.
- First-account welcome flow, loading skeletons, improved empty/error states, and live forgot/reset-password screens.
- Mobile-first navigation/player/touch improvements.
- Live production catalog covers and protected server audio URLs are supported directly by the frontend.

## Important Stripe note
A live checkout cannot complete until real Stripe live keys and Price IDs are placed in `.env`. No live Stripe secrets are included in this ZIP.

## Admin login recovery / IP block fix
This revision prevents the old global IP block from locking the login endpoints. Authentication has its own rate limiting and a successful login clears an older persisted block.

If this server already has an old blocked-IP record, run:
`npm run security:clear`
Then restart the Node application.

To create or reset the administrator without editing the database manually, run:
`npm run admin:reset -- --email iamking@audible3.com --password 'YOUR-NEW-SECURE-PASSWORD'`
The password must be at least 12 characters. Restart the Node application after the command finishes.

The app accepts either `DB_HOST/DB_USER/DB_NAME` or `MYSQL_HOST/MYSQL_USER/MYSQL_DATABASE` environment-variable naming.

## Audible3 3.0 reader experience

This package also includes My Journey, private bookmarks and notes, Favorites, Recently Played, ordered Series pages, Topic collections, transcript-aware search, playback speed, sleep timer, offline member downloads, PWA/install support, Coming Soon and New Release states, announcements, member activity analytics, scheduled publishing, release email alerts, staging mode, and automatic backups.

The `/admin` URL now opens the same production application and routes authenticated administrators into the current Admin experience, so the live editor and the newest admin tools are not split across two different interfaces.

See `DEEPER-EXPERIENCE-README.md` for the new configuration values and feature notes.
