# TaraLook system review

Reviewed: 2026-11-03

## Scope

This review covers the Laravel 12 application, Inertia/Vue screens, route authorization, persistence, push and scheduled work, and the current feature tests. The app is an MVP neighborhood platform, not a payment marketplace or an emergency-dispatch service.

## 1. Web security risks

### Addressed in this pass

- **Unverified accounts could post and message neighbors.** Registration validated only email syntax. Accounts now receive signed verification links; posts, edits, likes, comments, saves, direct messages, reviews, event responses, saved searches, push enrollment, and group actions require a verified email. Reporting, blocking, account controls, and browsing remain available before verification.
- **Members had no account recovery path.** Added rate-limited reset-link requests and password resets through Laravel's password broker. Reset responses do not disclose whether an account exists; password reset rotates the remember token and deletes database-backed sessions.
- **Verification redirects could preserve an attempted write URL.** The verification gate redirects without saving the attempted mutation as the post-verification destination.
- **Admin routes are role checked.** Report viewing and resolution enforce `is_admin` in the controller, and reported actions are recorded. Do not replace those checks with navigation visibility alone.

### Remaining risks before a public launch

- **Admin MFA is absent (P1).** A compromised admin password grants moderation controls. Add MFA and recovery codes before inviting moderators.
- **No privacy policy or retention schedule exists (P1).** Publish what profile, location, message, report, and push-subscription data is retained; explain export/deletion exceptions and support contact details.
- **Email delivery is an external dependency (P1).** Verification and recovery are not usable if production mail is left on the log/array driver. Configure and monitor a real provider, sender domain, SPF/DKIM/DMARC, and delivery failures.
- **Public media is not scanned or transcoded (P2).** Accepted file types and size limits reduce risk, but production should add image re-encoding, malware scanning for video/document expansion risks, and upload rate limits.
- **Moderator actions are manual (P2).** There is no appeals workflow, moderator audit view, or abuse trend reporting beyond stored actions and open reports.

## 2. State and data integrity

- Relational constraints and uniqueness rules protect core likes, follows, memberships, saves, and event responses. Like/comment counters and review-derived reputation are maintained in transactional workflows and repaired on account deletion.
- Post map coordinates are optional, rounded before persistence, and only shown when the author opts in. Manually selected areas remain label-based when coordinates are unavailable.
- Browser-detected coordinates are kept in the server-side session to calculate nearby results and sent to OpenStreetMap for neighborhood lookup; they are not saved as profile coordinates. Set and document a short session lifetime, and disclose the external geocoding request in the privacy notice.
- **Geographic results are approximate.** Nearby filtering uses a bounded candidate scan and PHP distance calculation; posts with manually entered area labels use area equality. This is suitable for the MVP dataset but not a precise geospatial guarantee.
- **Saved-search alerts are a bounded scheduled scan (P2).** The job caps work per run and stores a last-alerted cursor; add pagination and delivery deduplication before neighborhoods or saved searches grow substantially.
- **Hard account deletion is immediate.** This is operationally simple but does not model legal holds, abuse evidence retention, or identity-preserving anonymization. Decide a retention policy before launch.
- Use a durable production database and backups. SQLite is intended for local development.

## 3. Web performance and UX

- The home feed bounds coordinate candidates, but calculates distance and relevance in PHP and paginates the filtered collection. At higher volume this can truncate candidates and make pagination expensive; move distance and scoring into a spatial database query or indexed geospatial service.
- Post cards and discovery results still perform some per-item lookups for event state, saved/liked state, comments, and review summaries. Batch those reads or use eager-loaded aggregates before increasing page sizes.
- Direct and group conversations are request/response based. There are no WebSocket updates, typing indicators, or delivery/read receipts beyond the current read cursor.
- Search and discovery are database `LIKE` queries. Add full-text or dedicated search indexing when content volume or language needs justify it.
- The app includes responsive layouts and location fallback, but perform keyboard, screen-reader, reduced-motion, and low-bandwidth checks before public launch.

## 4. Deployment readiness

The feature build is suitable for a production deployment rehearsal, but not ready to expose without environment configuration and operational ownership.

- Set `APP_ENV=production`, `APP_DEBUG=false`, HTTPS, a strong app key, and a persistent MySQL/PostgreSQL database. Never deploy seeded demo accounts.
- Configure only the actual reverse proxy addresses in `TRUSTED_PROXIES`; otherwise HTTPS URL generation and secure cookies can fail behind TLS termination.
- Configure real mail delivery for verification and password resets. Configure `SESSION_DRIVER=database` if password reset must revoke all server-side sessions.
- Configure the public storage/object store, enforce upload limits at the proxy, and verify that generated storage URLs use HTTPS.
- Keep a supervised queue worker running and invoke Laravel's scheduler every minute. Alert on failed jobs, queue age, mail failures, and push provider responses.
- Set VAPID keys and allowed push hosts. Browser push requires HTTPS and user permission; it is not a guaranteed emergency-alert channel.
- Add backups with tested restore procedures, error monitoring, health checks, log retention, security headers (including CSP where compatible), and a documented incident/moderation process.

## Most useful next features

1. Admin MFA, moderation audit filters, and an appeal path.
2. Privacy policy, location/data retention controls, and verified production email delivery.
3. Query batching and spatial indexing as feed volume grows.
4. Realtime message delivery and better offline/retry behavior.
5. Optional member-to-member identity checks for high-trust services; keep public map locations approximate.

## Re-test findings (2026-11-03)

- **Discover was returning HTTP 500 because migration `2026_10_01_000007_add_community_safety_and_discovery_features` had not been applied to the running SQLite database.** The migration was applied without resetting data. Discover, event filtering, group filtering, service search, and the Home feed then rendered on the public test tunnel. Run pending migrations as part of every deployment before opening the app.
- **The active mail driver is `log`.** Password reset and verification notifications are generated, but they are written to `storage/logs/laravel.log` rather than delivered. The auth screens now say this before the user submits a request and the post-submit messages no longer claim that inbox delivery occurred. Actual inbox delivery remains unverified until a real provider is configured.
- **The sample database has no neighborhood groups.** The Groups filter correctly renders its empty state; add sample groups if the public demo should showcase the group flow.
- **Validation completed:** the feature suite passed (18 tests, 284 assertions), the production Vite build completed, PHP syntax checks passed for the changed controllers/routes/tests, and `git diff --check` reported no whitespace errors. Live-browser smoke checks showed seven nearby seeded Home posts, seven general Discover results, one upcoming event, a valid garden-service result, and the empty groups state.
