Table of Contents

Part I — Overview & Architecture
Part II — Using PLOCAL
Part III — Payments, Evaluation & Recognition
Part IV — Portals & Administration
Part V — Technical Foundations
Part VI — Production Deployment
Part VII — Operations & Maintenance
Part VIII — Quick Reference & Appendices
Part I — Overview & Architecture

1.Executive Overview

PLOCAL is a nationwide local business evaluation platform. It is built around one core model, repeated across every U.S. state, city, and category:

DIRECTORY
+
EVALUATION
+
RECOGNITION

PLOCAL helps customers find local businesses they can trust, and helps business owners understand how professional, credible, visible, and customer-ready their business appears online. Unlike a simple listing directory, PLOCAL does not just confirm that a business exists — it evaluates it against a structured, transparent standard, then presents the outcome publicly.

Who PLOCAL Serves

Customers

People searching for a trustworthy local provider — contractors, salons, restaurants, and other local service businesses — across any U.S. state or city.

Business Owners

Businesses that want a professional evaluation of their online presence, and the opportunity to be publicly recognized for strong performance.

Main System Areas

Public Directory

Nationwide search and browsing of evaluated businesses.

Business Evaluation

Structured Digital / Service / Trust assessment for every activated Business.

Public Voting

Community input that feeds qualification, not the final decision.

Recognition

Business of the Day, Month, and Year, awarded on evaluated merit.

Business Portal

Invitation-only account for an activated Business to view its own status.

Internal Administration

Staff workspace for reviewing submissions, evaluations, payments, and content.

Blog

Editorial content managed internally, published publicly.

Advertisers

A manually curated homepage sponsor carousel, unrelated to Evaluation or Recognition.

High-Level Flow

Visitor / Business
PLOCAL
Directory
Evaluation
Recognition
Core Trust Principle A Business pays PLOCAL for the Evaluation service. Payment never purchases ranking, score, votes, a badge, an Award, a recommendation, or placement. This principle governs every commercial and editorial decision described in this guide.
Part I — Overview & Architecture

2.System Architecture

PLOCAL is a single Laravel application. It is primarily server-rendered: pages are built on the server using Blade templates and returned as complete HTML, rather than relying on a separate single-page-application frontend framework. This keeps the system simple to operate, deploy, and reason about.

Browser
Laravel Routes
Controllers
Application Services
Domain Rules
Database
Stripe
Mail
Storage

Layer Responsibilities

LayerResponsibility
FrontendServer-rendered Blade templates, page-specific CSS/JS, and standard HTML forms. No separate frontend build is required to serve the site.
Routes / ControllersAccept an HTTP request, validate input, and hand off to the correct Application Service. Controllers stay thin.
Application ServicesCoordinate one specific use case end-to-end (for example, activating a Business after payment, or casting a public vote).
Domain RulesThe business rules that must always hold true regardless of caller — for example, how the PLOCAL Score is calculated, or what counts as a valid U.S. state code.
DatabaseMySQL. The single source of truth for every Business, Submission, Payment, Evaluation, Vote, and Award.
StripeHandles the Evaluation Checkout payment and is the sole authority on whether a payment succeeded.
MailSends invitation, notification, and transactional email through SMTP.
StorageHolds private submission evidence and public content media (Blog images, advertiser logos).
Part I — Overview & Architecture

3.Repository Structure

The Laravel application lives entirely inside the backend/ directory of the repository. The directories below are the ones an owner or developer will interact with most.

PathPurpose
backend/app/Http/ControllersRoute entry points, grouped by Public, Business, and Internal.
backend/app/ApplicationOne class per real use case (submitting a business, casting a vote, issuing an invitation).
backend/app/DomainPure business rules with no framework or database dependency (score calculation, state validation).
backend/app/InfrastructureRead-model implementations and integration-facing code.
backend/app/Console/CommandsArtisan commands — production bootstrap, verification, and local developer tooling.
backend/resources/viewsAll Blade templates: public/, business/, internal/, and shared layouts/ and partials/.
backend/routes/web.phpEvery public, Business, and Internal route.
backend/database/migrationsThe complete database schema history.
backend/database/seedersReference-data seeders, including the one production-safe bootstrap seeder.
backend/publicThe web server document root — the only directory that should be exposed directly to the internet.
backend/storagePrivate submission evidence, logs, and framework cache — never web-exposed directly.
backend/testsThe automated test suite covering the majority of product behavior.
assets/ (repository root)Shared CSS, JavaScript, images, and icon assets used by the public site.
Note This guide intentionally does not list every file — only the directories relevant to understanding, operating, or maintaining PLOCAL.
Part I — Overview & Architecture

4.Backend Architecture

Every request follows the same predictable path through the backend:

HTTP Request
Route
Controller
Validation
Application Service
Domain Rules
Persistence
Response

Routing

Routes are grouped into three clearly separated areas:

Validation & Authorization

Every state-changing request is validated before any Application Service runs. Internal routes are additionally protected by role-based permission checks (see Chapter 16 and Chapter 23), so a Reviewer account, for example, cannot perform an Administrator-only action even if it knows the correct URL.

Background Jobs

Notification delivery (invitation emails, activation confirmations, support-case acknowledgements) is queued rather than sent inline, so a slow mail provider never blocks a visitor-facing request. See Chapter 26 for the current queue configuration.

External Integrations

IntegrationPurpose
StripeEvaluation Checkout payment and signed webhook confirmation.
SMTP (Google Workspace)Transactional email delivery from info@plocal.com.
MySQLPrimary data store for every domain object in the system.
Part I — Overview & Architecture

5.Frontend Architecture

PLOCAL's frontend is server-rendered. Laravel's Blade templating engine builds each page on the server and returns finished HTML — there is no separate JavaScript framework driving page navigation, and no client-side routing to keep in sync with the backend.

Template Organization

AreaLocation
Shared layout & navigationresources/views/layouts, resources/views/public/partials
Public pagesresources/views/public
Business Portal pagesresources/views/business
Internal Portal pagesresources/views/internal

The public site's header and footer are each a single shared partial included on every public page, so a navigation change made once is reflected everywhere automatically.

Assets

CSS and JavaScript are organized by page and by shared concern under the repository's assets/ directory (bootstrap and vendor libraries, a shared custom stylesheet, and page-specific stylesheets/scripts). Pages are responsive down to common mobile widths.

Forms & Server Communication

Public forms (Submit Your Business, Contact, Support) post directly to a Laravel route. Where a form submits without a full page reload, it uses a plain JavaScript fetch request against the same route and displays the JSON result inline — there is no separate API layer or token-based authentication for these public forms.

Part II — Using PLOCAL

6.Public Website Navigation

The table below covers the primary pages a visitor encounters. Internal action-only endpoints are intentionally omitted — see Chapter 47 for a short reference of the most useful routes.

RoutePurpose
/Home — Business of the Day, featured Recognition, and entry points into the Directory.
/about.htmlAbout PLOCAL — what the platform is and why it exists.
/contact.htmlGeneral contact form.
/faq.htmlFrequently asked questions.
/support.htmlSupport request form (account, Profile, Evaluation, billing, accessibility, Trust & Safety).
/trust-and-safety.htmlTrust & Safety overview.
/protect-yourself-from-fraud.htmlFraud-awareness guide for customers.
/terms-and-conditions.htmlTerms & Conditions.
/accessibility-statement.htmlAccessibility statement.
/how-plocal-evaluation-works.htmlPublic explanation of the Evaluation model.
/submit-your-businessBusiness Submission form (see Chapter 9).
/find-businessesNationwide directory search (see Chapter 7).
/categories.htmlCurated category landing page.
/usaNational directory hub, branching into state and city hubs.
/{state}, /{state}/{city}, /{state}/{city}/{service}Geography-based discovery hierarchy.
/recognitionBusiness of the Day, Month, and Year (see Chapter 14).
/blog, /blog/{slug}Published editorial articles.
/pro/{businessSlug}An individual Business Profile (see Chapter 8).
Two Directory Layers /find-businesses is the current, primary nationwide search surface. The geography hierarchy under /usa is a complementary, SEO-oriented browsing path into the same underlying evaluated Businesses — both ultimately lead to the same Business Profile pages.
Part II — Using PLOCAL

7.Nationwide Directory & Find Businesses

PLOCAL supports all 50 U.S. states using canonical two-letter USPS state codes (for example, CA, TX, NY). A Submission is only accepted with a valid code from this canonical list — full state names or invalid codes are rejected at submission time. Cities are created automatically the first time a legitimately paid, activated Business reports that city — there is no need to pre-populate every city in the country in advance.

Find Businesses page

Find Businesses — nationwide search by category, state, city, and ZIP. Captured from the local development environment.

Search Filters

Result Ordering

Results are shown in a neutral order. Placement is not determined by payment, votes, Awards, or Evaluation score — every eligible Business receives equal presentation weight in the result list.

Visitor Journey

  1. Open Find Businesses.
  2. Select any combination of Category, State, City, or ZIP.
  3. Review the neutral-order result list.
  4. Open a Business Profile for full detail.
  5. Return to the exact same search results using the page's Previous/Next or Back-to-Results controls (see Chapter 8).
Publication Safety Only a Business that is active, published, and discovery-eligible can appear in search results — a suspended, unpublished, or ineligible Business is never shown publicly, regardless of filters applied.
Part II — Using PLOCAL

8.Business Profiles & Contextual Navigation

Every evaluated Business has a public profile at /pro/{businessSlug}.

Business Profile page

A live Business Profile, showing category, location, website screenshot, and Digital / Service / Trust result. Captured from the local development environment.

Profile Contents

Contextual Previous/Next Navigation

Profile pages remember how the visitor arrived, so browsing forward and backward stays inside the same context instead of jumping to an unrelated Business:

Arrived FromPrevious / Next Behavior
Newest NomineesChronological Nominee-to-Nominee navigation.
RecognitionChronological navigation within the same Day, Month, or Year level.
Find BusinessesNavigation within the exact search-result context (same filters and page).
Direct Profile visit (no context)Falls back to Find Businesses rather than fabricating an arbitrary neighbor.
Part II — Using PLOCAL

9.Business Submission

Submit Your Business form

Submit Your Business — the public Submission form. Captured from the local development environment.

Information Collected

Website Screenshot Requirement

RequirementValue
FormatJPEG
Exact dimensions1068 × 646 pixels
Maximum file size150 KB

Verified directly against the current Submission validation rules.

What Happens After Submission

A successful Submission creates a durable record and immediately proceeds to Evaluation Checkout (Chapter 10). The Submission itself does not create a public Business Profile — publication only happens after payment is confirmed and the Business is activated (Chapter 11).

No Pre-Payment Approval Step The current flow does not include a "wait for approval before payment" stage, and there is no legacy Claim/Accept step exposed on the public Submission flow. Checkout follows immediately after a valid Submission.
Part III — Payments, Evaluation & Recognition

10.Payments & Stripe

PLOCAL charges a fixed Evaluation service fee of $250 USD plus applicable taxes, collected through Stripe's hosted Checkout page.

Submission
Checkout Creation
Stripe Hosted Page
Card Payment
Signed Stripe Webhook
PLOCAL Reconciliation
Paid Activation
Payment Authority The browser's post-checkout success page is never treated as proof of payment. Only Stripe's signed server-to-server webhook event confirms that a payment succeeded and authorizes activation. This prevents a visitor from spoofing a successful payment by manipulating the browser.

What Payment Does and Does Not Buy

Payment purchases

  • The Evaluation service itself.

Payment never purchases

  • Ranking or placement
  • Evaluation score
  • Votes
  • A badge
  • An Award or Recognition
  • A recommendation

Other Payment Behavior

Stripe: Test vs. Production

EnvironmentDescription
Development / SandboxUses Stripe test-mode keys. No real card is charged.
Production / LIVEUses Stripe live-mode keys. Real cards are charged real money.
# .env — never commit real values
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=

Local Development

# Terminal 1
php artisan serve

# Terminal 2 — forwards Stripe test events to your local app
stripe listen --forward-to http://localhost:8000/webhooks/stripe
Stripe CLI Is Local-Only The stripe listen command is a local development convenience. Production never uses the Stripe CLI listener — it receives webhook events directly from Stripe over HTTPS at the production domain (see Chapter 32).
Part III — Payments, Evaluation & Recognition

11.Paid Activation

Once Stripe's signed webhook confirms payment, PLOCAL provisions everything the Business needs in a single, idempotent sequence:

Business
Business Profile
Nominee
Evaluation Window
Location / Discovery Reconciliation
Business Portal Invitation

Idempotency: replaying the same confirmed payment event does not create a duplicate Business or a duplicate Evaluation Window — activation is safe to retry.

If activation did not fully complete (for example, a transient failure between steps), an Administrator can trigger a safe retry from Internal Payment Operations rather than needing any direct database intervention (Chapter 18).

Part III — Payments, Evaluation & Recognition

12.Evaluation — Digital / Service / Trust

Every activated Business is assessed across three dimensions, each scored from 0 to 10:

Digital
Service
Trust

PLOCAL Score

Formula PLOCAL Score = (Digital + Service + Trust) ÷ 3, rounded exactly once to two decimal places.

Evaluation Window

Each Evaluation runs on a fixed window of 96 elapsed hours from the moment the Business is activated. This is wall-clock elapsed time, not 96 business hours.

Roles Involved

RoleResponsibility
EvaluatorPerforms the initial Digital / Service / Trust assessment for an assigned Nominee.
ReviewerReviews and can return an Evaluator's work for changes, or complete it.
AdministratorHolds full access, including the authority to make the Final Decision on Recognition.
Legacy Note An earlier, retired 100-point "ProScore" evaluation format exists only in historical/demo data and is not the current Evaluation model. The current, active model is Digital / Service / Trust as described above.
Part III — Payments, Evaluation & Recognition

13.Public Voting

While a Nominee's Evaluation Window is open, the public can cast a Vote across the same three dimensions: Digital, Service, and Trust.

Voting Rules

Public Ballot Cast
Qualification Count per Dimension
Candidate Eligibility
Administrator Final Decision
Votes Inform — They Do Not Decide Votes help establish qualification and public engagement signal. They do not directly select a winner. PLOCAL, through the Administrator Final Decision, retains final Recognition authority.
Part III — Payments, Evaluation & Recognition

14.Recognition

Recognition page

Recognition — Business of the Day, Month, and Year. Captured from the local development environment.

Recognition Hierarchy

Business of the Year
Business of the Month
Business of the Day

Lifecycle

A qualifying Nominee that reaches the Evaluation and voting thresholds becomes a Candidate. An Administrator's Final Decision determines the outcome — confirmed as a Nominee, granted Honors, awarded Business of the Day, or declined. Honors and Day/Month/Year Awards are drawn from qualifying Candidates on a chronological basis.

Historical Record

Past Recognition remains publicly viewable. If an Award is later revoked or replaced, that history is preserved for transparency rather than silently deleted — a revoked or inactive Award is not shown as currently valid, but the record of it having occurred is retained internally.

Part IV — Portals & Administration

15.Business Portal

Business Portal login

Business Portal sign-in at /business/login. Captured from the local development environment.

No Public Sign-Up There is no public Business registration page. A Business account only comes into existence through the invitation flow below.

Onboarding Flow

Paid Activation
Secure Email Invitation
Password Setup
/business/login

What a Business Account Can See

The dashboard is a read-only status view scoped strictly to the account's own Business:

A Business account cannot view or influence another Business's data, and cannot access the Internal Portal under any circumstance — the two systems use entirely separate authentication guards.

Part IV — Portals & Administration

16.Internal Portal & RBAC

Internal staff login

Internal Portal staff sign-in at /internal/login. Captured from the local development environment.

Roles

RoleAccess Level
AdministratorFull access, including Final Decisions, Payment Operations, Users, and content management.
ReviewerReviews assigned Evaluations, can return work for changes, confirms license/verification items.
EvaluatorPerforms and submits assigned Evaluation scoring.

Dashboard Areas

Every area is gated by role permission — a Reviewer or Evaluator account attempting an Administrator-only action (such as managing Internal Users) is denied regardless of the URL used.

Part IV — Portals & Administration

17.Internal Evaluation Workflow

  1. Staff logs in to the Internal Portal.
  2. Opens Nominees / Evaluations.
  3. Opens the assigned, current Nominee.
  4. Reviews the Business and submitted evidence (website, screenshot).
  5. Scores the Digital dimension.
  6. Scores the Service dimension.
  7. Scores the Trust dimension.
  8. Saves and submits the Evaluation for review.
  9. Candidate eligibility is evaluated once qualification thresholds are met.
  10. An Administrator makes the Final Decision.
  11. The Recognition outcome, if any, appears publicly on the Business Profile and Recognition page.
Verify Before Documenting UI Labels Exact on-screen button labels may be refined over time. This workflow describes the current functional sequence rather than pixel-exact wording.
Part IV — Portals & Administration

18.Payment Operations

Internal Payment Operations gives Administrators visibility and safe recovery tools over every payment:

No Manual Override Authority There is no "mark as paid" control that bypasses Stripe. Payment status must always remain tied to Stripe's verified, signed state — Internal Payment Operations can retry activation for an already-confirmed payment, but it cannot fabricate a payment.
Part IV — Portals & Administration

19.Support Cases

Current official contact channels:

ChannelValue
Emailinfo@plocal.com
Phone888-988-3213

Public Contact and Support forms submit into the same internal Support Case system. Every submission is durably recorded and reviewable by Administrators from Internal Support Cases, with a status workflow (for example, received → in review → resolved).

The Business Profile's "Report a concern" link routes a visitor to the official Contact page, which submits into this same Support Case system — there is a single, consistent path for any public concern or fraud report, rather than a separate parallel system.

Part IV — Portals & Administration

20.Blog CMS

Public Blog index

Public Blog index at /blog. Captured from the local development environment.

Internal Management Capabilities

Public Visibility

Only published articles are ever publicly reachable at /blog or /blog/{slug}. A draft or unpublished article is never exposed on the public site.

Part IV — Portals & Administration

21.Advertiser Management

Commercial Model Advertisers are recruited and contacted outside PLOCAL. There is currently no online advertiser self-service or payment system inside the platform — an Administrator manually adds each approved advertiser.

What an Administrator Configures

Active advertisers appear in the homepage sponsor carousel, linking only to their own website_url.

Strict Separation Advertising never affects ranking, Evaluation, Voting, or Recognition. An advertiser's logo on the homepage carries no evaluative meaning whatsoever.
Part V — Technical Foundations

22.Database Architecture

PLOCAL uses MySQL as its single source of truth. The conceptual relationships below matter more for day-to-day operation than the full column-level schema.

Business Submission
Evaluation Payment
Business
Business Profile
Nominee
Evaluation Window
Nominee → Voting Ballots
Evaluation → Final Decision / Recognition
Business → Awards

Other Core Tables

AreaHolds
Internal UsersStaff accounts and their assigned roles/permissions.
States / LocationsThe 50-state reference set and dynamically provisioned cities.
CategoriesThe current product category taxonomy.
Blog ArticlesEditorial content and publication status.
AdvertisersThe homepage sponsor carousel entries.

Migrations under backend/database/migrations are the authoritative schema history; they should be applied in order and never edited after being run against a live database.

Part V — Technical Foundations

23.Authentication & Security Model

Three Separate Authentication Systems

SystemWhoNotes
PublicAny visitorNo authentication required for browsing pages.
BusinessAn activated Business's authorized user/business/login, invitation-based onboarding only.
InternalPLOCAL staff/internal/login, role-based access control.

Keeping Business and Internal authentication completely separate ensures a compromised or misused Business account can never reach staff-only tooling, and vice versa.

Current Security Controls

Production Expectations Production must run with APP_DEBUG=false, HTTPS enabled, and secrets supplied only through environment configuration — never committed to the repository. PLOCAL does not claim a formal security certification and is not represented as immune to attack; the controls above reflect current, verified application behavior.
Part V — Technical Foundations

24.File Storage

ContentVisibilityNotes
Submission evidence (website screenshots)PrivateServed only through an authenticated/controlled Laravel route — never a direct public file path.
Blog cover imagesPublicServed through a dedicated media route.
Advertiser logosPublicServed through a dedicated media route.
Persistence on a VPS Uploaded files are stored on local disk under the application's storage directory. On a VPS, this directory must live on persistent storage and be included in the backup plan (Chapter 36) — a stateless or ephemeral deployment target will lose uploaded evidence and media on redeploy unless this is addressed.
Part V — Technical Foundations

25.Email

The current production design sends transactional email through Google Workspace SMTP, from info@plocal.com, using Laravel's standard Mailer.

# Production .env placeholders
MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=info@plocal.com
MAIL_PASSWORD=<GOOGLE_WORKSPACE_SMTP_CREDENTIAL>
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=info@plocal.com
MAIL_FROM_NAME=PLOCAL

Never place real credentials in source control. See Chapter 33 for the Google Workspace setup procedure.

Part V — Technical Foundations

26.Queues & Background Jobs

Local development may run with QUEUE_CONNECTION=sync, meaning queued work executes immediately, inline, with no separate worker process. This is convenient for development but has no retry/backoff behavior.

Production should use a persistent queue driver (the database driver is supported out of the box) together with a supervised worker process:

php artisan queue:work \
  --queue=default \
  --tries=3 \
  --backoff=60,300 \
  --max-time=3600

This worker command should run continuously under a process manager — systemd, Supervisor, or an equivalent tool already standard on the chosen server — so it is automatically restarted if it stops. The specific supervisor is an infrastructure choice for the owner/hosting administrator; this guide does not mandate one.

Part VI — Production Deployment

27.Production Environment Reference

The table below lists the environment variables PLOCAL reads, verified against the current configuration. No secret values are shown — use the placeholders when configuring production.

# Application
APP_NAME=PLOCAL
APP_ENV=production
APP_KEY=<GENERATED_BY_ARTISAN_KEY_GENERATE>
APP_DEBUG=false
APP_URL=https://www.plocal.com

# Logging
LOG_CHANNEL=stack
LOG_STACK=single
LOG_LEVEL=error

# Database
DB_CONNECTION=mysql
DB_HOST=<PRODUCTION_DB_HOST>
DB_PORT=3306
DB_DATABASE=<PRODUCTION_DB_NAME>
DB_USERNAME=<PRODUCTION_DB_USERNAME>
DB_PASSWORD=<PRODUCTION_DB_PASSWORD>

# Session & Cache
SESSION_DRIVER=database
SESSION_LIFETIME=120
SESSION_ENCRYPT=true
CACHE_STORE=database

# Queue
QUEUE_CONNECTION=database

# Mail
MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=info@plocal.com
MAIL_PASSWORD=<GOOGLE_WORKSPACE_SMTP_CREDENTIAL>
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=info@plocal.com
MAIL_FROM_NAME=PLOCAL

# Stripe
STRIPE_SECRET_KEY=<STRIPE_LIVE_SECRET_KEY>
STRIPE_WEBHOOK_SECRET=<STRIPE_LIVE_WEBHOOK_SECRET>
Only What PLOCAL Actually Uses File storage defaults to the local disk driver and the queue defaults to the database driver — both already provisioned by the standard migrations. S3-compatible object storage or Redis are not required unless the owner deliberately chooses to introduce them later.
Part VI — Production Deployment

28.Production Deployment

The steps below describe a conceptual deployment to a Linux VPS. No specific hosting provider is assumed.

  1. Provision a Linux server.
  2. Install a compatible PHP version (PHP 8.3 or newer, per composer.json).
  3. Install the required PHP extensions (standard Laravel/MySQL extension set).
  4. Install Composer.
  5. Install and configure MySQL.
  6. Upload or clone the repository onto the server.
  7. Configure the web server to point at backend/public as the document root.
  8. Create and populate the production .env file (Chapter 27).
  9. Generate the application key safely: php artisan key:generate.
  10. Install production dependencies: composer install --no-dev --optimize-autoloader.
  11. Set correct filesystem permissions on storage and bootstrap/cache.
  12. Run migrations: php artisan migrate --force.
  13. Run the PLOCAL production bootstrap: php artisan plocal:bootstrap-production.
  14. Configure and start the queue worker (Chapter 26).
  15. Configure SMTP (Chapter 33).
  16. Configure Stripe LIVE keys and webhook (Chapter 32).
  17. Configure HTTPS (Chapter 35).
  18. Configure DNS (Chapter 35).
  19. Confirm persistent storage for uploads (Chapter 24).
  20. Confirm a backup plan is active (Chapter 36).
  21. Run the production readiness check (Chapter 29).
  22. Smoke-test the public flows described in Chapter 43.
Part VI — Production Deployment

29.Production Commands Reference

# Install production dependencies
composer install --no-dev --optimize-autoloader

# Apply the database schema
php artisan migrate --force

# Seed the production-safe reference data (RBAC, Evaluation policy, categories, 50 states)
php artisan plocal:bootstrap-production

# Cache configuration, routes, and views for performance
php artisan config:cache
php artisan route:cache
php artisan view:cache

# Read-only check of production configuration health
php artisan plocal:verify-production-readiness

# Start the queue worker (run under a process supervisor)
php artisan queue:work --queue=default --tries=3 --backoff=60,300 --max-time=3600
Re-caching After Config Changes If .env or route/view files change after the first deployment, re-run the config:cache, route:cache, and view:cache commands so the change actually takes effect.
Part VI — Production Deployment

30.Commands Never to Run in Production

Destructive or Development-Only — Do Not Run Against Production
CommandWhy Not
migrate:freshDrops every table and rebuilds the schema from nothing — destroys all production data.
db:wipeDrops every table, view, and type — irreversible data loss.
plocal:seed-contextual-nav-demoCreates local-only visual demo fixtures, not real product data.
plocal:internal-demo-evaluation:create / :cleanupCreates/removes a private local workspace demo Evaluation.
plocal:run-professional-rating-demoA synthetic demo workflow intended only for the isolated test database.
plocal:verify-dallas-demo, plocal:verify-multi-market-demoVerify local-only demo fixtures; meaningless (or unsafe) against production data.
plocal:backfill-legacy-market-membership (without --dry-run first)Writes new rows for existing Businesses — always review with --dry-run before running for real.

This list reflects the current Artisan command registry at the time of writing. Command names should be re-verified against php artisan list before each deployment, since the registry can change over time.

Part VI — Production Deployment

31.Database Bootstrap

php artisan plocal:bootstrap-production is the single production-safe seeding entry point. It is idempotent — running it again on an already-initialized database changes nothing.

What It Creates

What It Deliberately Never Creates

Safe to Run Early and Often This command is designed to be run immediately after every fresh migration, and safely re-run later if reference data needs to be refreshed — it never touches real Business, Award, payment, or account data.
Part VI — Production Deployment

32.Stripe Production Setup

  1. Sign in to the Stripe account and switch to LIVE mode.
  2. Retrieve the LIVE secret API key and store it only in the production .env.
  3. Create a webhook endpoint pointed at the final production domain, for example https://www.plocal.com/webhooks/stripe (confirm the exact current route before finalizing).
  4. Retrieve the webhook's signing secret and store it as STRIPE_WEBHOOK_SECRET.
  5. If automatic tax is used, confirm the relevant tax registrations are configured in Stripe.
  6. Send a real test transaction and confirm the webhook is received and activation completes.
The Most Common Production Payment Issue A payment can succeed at Stripe while PLOCAL remains stuck "pending" if the webhook cannot reach the server — for example, if the webhook endpoint is misconfigured, the server is behind a firewall blocking Stripe's IPs, or HTTPS is not correctly terminated. Always confirm webhook delivery status inside the Stripe dashboard when investigating a stuck payment.

The Stripe CLI listener (stripe listen) is never used in production — see Chapter 10.

Part VI — Production Deployment

33.Google Workspace SMTP Setup

  1. Sign in to the Google Workspace account that owns info@plocal.com.
  2. Generate an app-specific password (or configure Workspace SMTP relay/OAuth, depending on the account's current security policy).
  3. Set the Laravel MAIL_* variables from Chapter 25 in the production .env.
  4. Send a real test email from the application and confirm delivery.
  5. At the DNS level, confirm SPF, DKIM, and DMARC records are configured for the sending domain — this materially improves deliverability and reduces the chance of mail landing in spam.

Exact Google Workspace account settings are specific to the owner's account and are not reproduced here.

Part VI — Production Deployment

34.Web Server Configuration

The web server's document root must point at backend/public — never at the repository root, and never directly at backend/ itself. Only the contents of public should ever be reachable directly over the web.

Conceptual Nginx Notes

No Unverified Config Included A specific, copy-paste server configuration is intentionally not included here, since an unverified configuration can be unsafe. Use Laravel's official, current deployment documentation for the exact web server directives appropriate to the chosen server software and version.
Part VI — Production Deployment

35.DNS & HTTPS

This guide uses https://www.plocal.com as the expected canonical domain; confirm and adjust if the final configured domain differs.

Part VI — Production Deployment

36.Backups

Owner / Infrastructure Responsibility Backups are not yet an automated part of the application itself — they are an infrastructure responsibility the owner or hosting administrator must put in place.

Recommended Practice

Part VII — Operations & Maintenance

37.Logs & Troubleshooting

SymptomLikely CauseWhere to CheckSafe Action
500 errorUncaught exceptionstorage/logs/laravel.logRead the stack trace; fix the underlying cause, never disable error visibility to hide it.
Database connection errorWrong credentials or DB unreachable.env DB_* values, MySQL service statusVerify credentials and that MySQL is running and reachable.
Payment stays pendingWebhook not receivedStripe dashboard webhook delivery logConfirm the endpoint is reachable over HTTPS; see Chapter 41.
Activation did not startActivation step failed after paymentInternal Payment OperationsUse Retry Activation; never edit payment rows directly.
Email not sendingSMTP misconfiguration.env MAIL_* values, mail logsSend a test email; verify SMTP credentials.
Queue not processingWorker not runningProcess supervisor status, failed_jobs tableRestart the worker; inspect failed jobs.
Image missingBroken path or missing storage symlinkBrowser network tab, storage configurationConfirm the file exists and the serving route is correct.
Business not in Find BusinessesNot yet discovery-eligibleInternal Business record statusSee Chapter 42 (Directory Troubleshooting).
Permission / RBAC issueAccount role lacks the needed permissionInternal Users role assignmentConfirm the account has the correct role.

Payment Troubleshooting

Stripe Checkout Paid
Did the signed webhook reach PLOCAL?
Is payment_status = paid?
What is the activation status?
Was the Evaluation lifecycle created?

Walk this chain top to bottom in Internal Payment Operations. If the webhook never arrived, fix delivery/HTTPS/firewall first — retrying activation cannot help until the webhook is actually received. If the webhook arrived and payment is confirmed but activation did not complete, use Retry Activation.

Never Edit Payment Status Directly Manually changing a payment's status in the database breaks the guarantee that payment state always reflects Stripe's verified truth. Always resolve payment issues through Internal Payment Operations.

Directory Troubleshooting

Symptom: a Business was submitted and paid for, but does not appear in Find Businesses.

Check, in order:

  1. Payment was actually confirmed.
  2. Activation completed.
  3. Business lifecycle and publication status are active/published.
  4. The Business Profile itself is published.
  5. The submitted state/city was correctly recognized.
  6. Discovery eligibility was reached.

If a Business is stuck ineligible purely due to a geography reference-data gap, the safe reconciliation command is:

php artisan plocal:reconcile-discovery-eligibility --dry-run

Review the dry-run output first, then re-run without --dry-run only once the proposed change looks correct.

Part VII — Operations & Maintenance

38.Maintenance

No Blind Automatic Upgrades Do not enable fully automatic, unattended dependency upgrades on a production system that handles real payments — review and test changes first.
Part VII — Operations & Maintenance

39.Testing

PLOCAL includes an automated Laravel test suite covering the majority of product behavior, run against a fully isolated test database.

Critical Safety Requirement Before any test run that writes data, positively verify which database is actually resolved — never trust a --env=testing flag alone to guarantee isolation. Tests must never be allowed to mutate the real development or production database.
# Run the full suite
php artisan test

# Run a focused subset
php artisan test --filter="SomeTestName"
Part VII — Operations & Maintenance

40.Local Development Environment

cd backend
composer install
# configure .env for local development
# create the local database
php artisan migrate
php artisan plocal:bootstrap-production
php artisan serve

For local Stripe testing:

stripe listen --forward-to http://localhost:8000/webhooks/stripe

If queued work needs to be processed locally:

php artisan queue:work

Never place real production credentials in a local .env file.

Part VIII — Quick Reference & Appendices

41.Owner Quick Start

A short answer to: "PLOCAL is already deployed — how do I actually use it?"

Public

  • Browse PLOCAL at the home page.
  • Use Find Businesses to search the directory.
  • Check Recognition for current winners.
  • Read the Blog for editorial content.

Business

  • Submit a business for Evaluation.
  • Complete payment.
  • Accept the emailed invitation.
  • Log in to the Business Portal to check status.

Administrator

Part VIII — Quick Reference & Appendices

42.Administrator Daily Workflow

Morning

Content

Administration

Part VIII — Quick Reference & Appendices

43.Production Launch Checklist

Part VIII — Quick Reference & Appendices

44.Post-Launch Checklist

WindowMonitor
First hourHTTP error rate, Stripe webhook delivery, first real payment/activation.
First dayMail delivery, queue job processing, disk usage, database health, support inbox.
First weekSearch-engine indexing, backup completion, ongoing support volume, overall stability.

Items above are operational recommendations, not application behavior claims.

Part VIII — Quick Reference & Appendices

45.Recommended Follow-Up Improvements

PLOCAL is prepared for handoff. The items below are genuinely non-blocking follow-ups identified during the most recent technical review — none of them prevent a production launch.

Part VIII — Quick Reference & Appendices

46.Glossary

Business Submission
The initial form a business owner completes to request a PLOCAL Evaluation.
Business
The canonical record for an activated business on PLOCAL.
Business Profile
The public-facing page for a Business at /pro/{slug}.
Nominee
A Business under active Evaluation and eligible for Recognition consideration.
Evaluation Window
The fixed 96-elapsed-hour period during which a Nominee is assessed and voted on.
Digital / Service / Trust
The three 0–10 dimensions that make up the current Evaluation model.
PLOCAL Score
(Digital + Service + Trust) ÷ 3, rounded once.
Voting Ballot
One pseudonymous-device vote cast for a Nominee within its Evaluation Window.
Candidate
A Nominee that has met the qualification thresholds required for Recognition consideration.
Honors
A Recognition outcome granted by Administrator Final Decision, short of a Day/Month/Year Award.
Business of the Day / Month / Year
The three tiers of official PLOCAL Recognition.
Paid Activation
The provisioning sequence triggered once payment is confirmed.
Discovery Eligibility
Whether a Business currently qualifies to appear in Find Businesses.
Support Case
A durable record created from any public Contact, Support, or concern submission.
Internal User
A PLOCAL staff account (Administrator, Reviewer, or Evaluator).
Business User
An invited account scoped to a single activated Business.
Part VIII — Quick Reference & Appendices

47.Quick Route Reference

AreaRoute
Public/
Public/find-businesses
Public/submit-your-business
Public/recognition
Public/blog
Business/business/login
Internal/internal/login
Internal/internal

Action-only (POST) endpoints are intentionally omitted from this reference.

Part VIII — Quick Reference & Appendices

48.Owner Production Responsibilities

The following are infrastructure and configuration responsibilities for the owner or hosting administrator — they are not missing application features.

ResponsibilityOwner Action
Hosting / VPSProvision and maintain the server.
Domain / DNSOwn and configure the production domain.
HTTPSObtain and renew a valid certificate.
Production database credentialsProvision and secure production MySQL access.
Stripe LIVE credentialsProvide the live secret key and webhook secret.
Stripe Tax registrationsConfirm applicable tax jurisdictions, if used.
Google Workspace SMTP credentialsProvide the sending mailbox credential.
Backup infrastructureImplement scheduled, tested backups.
Queue supervisorKeep the queue worker running continuously.
Server monitoringMonitor uptime, disk, and error rates.
Part VIII — Quick Reference & Appendices

49.Final System Status

This guide reflects the PLOCAL codebase as verified at the time of writing: routes, Artisan commands, environment variables, the Digital / Service / Trust Evaluation model, the 50-state directory architecture, the Stripe payment flow, the Business Portal, the Internal Portal, the Blog, Advertisers, and the production bootstrap command were each checked directly against the current source.

Summary The PLOCAL codebase is prepared for owner handoff and production deployment, subject to completion of the production configuration and infrastructure checklist documented in this guide (Chapters 27–36 and 43). No functionality in this document is fabricated or overstated, and no legacy or development-only tooling is represented as current production product.