VELORA DATING PLATFORM - LOCAL XAMPP INSTALLATION
================================================

1. Extract the folder into:
   C:\xampp\htdocs\velora-dating-platform

2. Start XAMPP:
   - Apache: START
   - MySQL: START

3. Open phpMyAdmin:
   http://localhost/phpmyadmin/

4. Import database/velora.sql (single file). This creates the database, all tables, and demo data.
   Optional legacy files schema.sql / seed.sql / repair_existing.sql remain for reference only.

6. Open:
   http://localhost/velora-dating-platform/public/

MAIN URLS
---------
/public/discovery
/public/matches
/public/premium
/public/profile
/public/chat?user=ID
/public/safety
/public/settings
/public/admin

DEMO LOGIN
----------
Admin: admin@velora.local / password
User:  amina@example.com / password
User:  brian@example.com / password
User:  chloe@example.com / password
User:  david@example.com / password

FUNCTIONAL LOCAL FEATURES
-------------------------
- Adult-only registration gate (18+)
- Login/logout/password hashing
- Profile editing
- Profile photos with upload/delete
- Interests and prompts
- Discovery preferences
- Discovery feed
- Like/pass/super-like
- Mutual matching
- Rewind for Plus+
- Matches
- Real persisted chat
- Read status
- Block/unmatch/report
- Safety Center
- Notification records
- Free/Plus/Gold/VIP access
- Local demo subscription transactions
- Subscription expiry dates
- Boost activation for Gold/VIP
- Admin dashboard
- User status and role controls
- Credit adjustments
- Report moderation
- Subscription-plan pricing controls
- Payment history
- Admin activity logging

IMPORTANT FOR PRODUCTION
------------------------
The local payment flow is intentionally a DEMO. Do not accept real money until a real payment provider is integrated with server-side callback/signature verification. M-PESA/card credentials, email/SMS providers, WebSockets, maps/geocoding, identity verification and production moderation services require provider accounts and secure deployment configuration.

If clean URLs do not work, enable Apache mod_rewrite and AllowOverride All in the Apache configuration, then restart Apache.


Also see DEPLOY.md for production checklist and recent fixes.


If Premium / payment history errors appear on an older install, import database/migrate_payments.sql

MANDATORY SUBSCRIPTION / M-PESA (new)
------------------------------------
1. After importing velora.sql, also import:
   database/migrate_mandatory_subscription.sql
   (Ignore "Duplicate column" errors if re-run.)

2. Admin > Payment integrations:
   - Paste Daraja Consumer Key, Secret, Shortcode, Passkey
   - Set environment Sandbox or Live
   - Optional: Callback URL (defaults to /premium/mpesa/callback)
   - Stripe (or other) publishable + secret keys for cards
   - Monthly price (default 500 KES) and trial hours (default 72)

3. New users get 72 hours free full access, then must pay Monthly Access.
   Successful payment grants a blue verified badge for 30 days.

4. Without Daraja credentials, M-Pesa form still works in DEMO mode (marks paid locally).

