# Update Report – seoul-educamp-international-final

## Fixed
- **Application creation crash** `Undefined constant "SODIUM_CRYPTO_SECRETBOX_NONCEBYTES"` (`app/Core/Crypt.php`). Cause: the PHP Sodium extension is not enabled on the host and the code used it unconditionally. Fix: Sodium is used when present; otherwise OpenSSL AES-256-GCM (values prefixed `g1:`). Both formats are decrypted automatically. Encryption is never disabled, the key is never regenerated or hard-coded.
- Closed WhatsApp drawer leaked a faint shadow on the right edge on phones.
- Default bright-blue links on login pages now use the navy theme colour.

## Added / updated
- Homepage world map (`resources/views/components/world_map.php`, `config/world_map.php`, `public/assets/img/world-map.svg`, `public/assets/css/app.css`): labels UK, Canada, USA, Australia, plus Seoul / South Korea and Dhaka / Bangladesh; Bangla names for all labels.
- Navy / gold theme tokens applied site-wide (public site, student portal, admin).
- `scripts/upgrade_db.php` (safe, additive DB upgrade), `scripts/build-map.mjs` (map generator), README sections 12–13 (local run, data-safe migration, key handling).

## Preserved
No tables were dropped or renamed; no controllers, routes or admin/student features were removed. Database structure is unchanged except the additive column `appointments.reminder_sent_at` (already in `schema.sql`; `upgrade_db.php` adds it to older databases).

## Tested (local PHP 8.3 + MariaDB, curl + headless Chromium)
| Test | Sodium ON | Sodium OFF |
|---|---|---|
| Homepage 200 | pass | pass |
| Student registration + login | pass | pass |
| Profile page + save | pass | pass |
| New application creation | pass (sodium format) | pass (`g1:` format) |
| Appears in student list/dashboard, detail page | pass | pass |
| Document upload (PDF) linked to application | pass | pass |
| Admin: application list, detail, documents page | pass | pass |
Also: decrypting old Sodium-written records works with Sodium on; with Sodium off those (Sodium-only) values return empty (documented). Map labels checked in screenshots at 1440, 820 and 390 px. Final ZIP extracted to a clean folder, fresh DB imported from schema+seed, and smoke-tested.

## Not tested / limitations
- Your real database and real `.env`/`app.key` (not available to me) – follow README section 13 and keep a backup.
- Real SMTP sending, WhatsApp Cloud API, behaviour on your live cPanel PHP build, real phones.
- Submitting an application for review and the admin status-change flow were tested earlier in the project (README §10) but not re-run in this final pass.
- Sodium-encrypted values can only be read where Sodium is enabled.


---
# Update 2 - Country-wise management (admin + public)

**Added:** `countries` table + `universities.country_id` (additive migration via `scripts/upgrade_db.php`, `schema.sql`, `seed.sql`, `database/countries_seed.sql`); `Country` service; `CountryController`; `/study-destinations` pages; homepage country cards; nav dropdown; country filter/chips on directory and programs; shared filter bar; per-country currency formatting; admin Countries CRUD; country tabs and filters on Universities/Programs/Intakes/Scholarships/Students/Applications; country reports; apply form grouped by country; sitemap entries; EN/BN texts.

**Tested (curl + headless Chromium):** country isolation (Canada/Korea/UK/Australia/Japan pages and `/universities?country=` list only that country's universities); search, city, level, program, fee, intake filters; homepage cards counts (13 Korea, 3 others, real DB counts); Bangla heading; admin: add country (appeared instantly on home, menu, admin tabs, public page), add/edit(reassign country)/delete university, unpublish country (404 on public + gone from home); student applying to Korea+Canada+UK+Australia = 1 profile, appears once in each country section; counselor scope (200, scoped counts); reports + CSV export; mobile (390px) country page.
**Not tested / limitations:** your live data; programs/intakes admin forms were only opened (not saved) for the new country filter; sample international universities and country texts are unverified placeholders; fee bands are per-currency defaults.
