Regional legal documents and country-specific privacy policies

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    847
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    451

Implementation of Regional Legal Documents (Privacy Policy by Country)

A site operating in multiple jurisdictions must provide legal documents in compliance with local legislation. GDPR in EU, CCPA in California, 152-FL in Russia, PIPEDA in Canada — requirements differ, documents differ.

User Jurisdiction Detection

class UserJurisdiction
{
    public function detect(Request $request): string
    {
        // First check explicit user choice (cookie)
        if ($country = $request->cookie('user_country')) {
            return $country;
        }

        // Geolocation by IP via MaxMind GeoIP2
        $reader  = new \GeoIp2\Database\Reader(storage_path('geoip/GeoLite2-Country.mmdb'));
        $record  = $reader->country($request->ip());
        $isoCode = $record->country->isoCode;

        return $isoCode ?? 'DEFAULT';
    }

    public function getRegulation(string $countryCode): string
    {
        return match(true) {
            in_array($countryCode, EU_COUNTRIES)          => 'gdpr',
            $countryCode === 'US'                         => 'ccpa',
            $countryCode === 'RU'                         => 'rfz152',
            in_array($countryCode, ['UA', 'BY', 'KZ'])    => 'cis',
            default                                       => 'default',
        };
    }
}

Document Structure

resources/legal/
├── privacy-policy/
│   ├── gdpr.{en,ru,de}.md
│   ├── ccpa.en.md
│   ├── rfz152.ru.md
│   └── default.{en,ru}.md
├── cookie-policy/
│   └── ...
└── terms-of-service/
    └── ...

Routing and Display

Route::get('/legal/privacy-policy', function (Request $request) {
    $jurisdiction = app(UserJurisdiction::class)->detect($request);
    $regulation   = app(UserJurisdiction::class)->getRegulation($jurisdiction);
    $locale       = app()->getLocale();

    $document = LegalDocument::where([
        'type'       => 'privacy-policy',
        'regulation' => $regulation,
        'locale'     => $locale,
    ])->first()
    ?? LegalDocument::where([
        'type'       => 'privacy-policy',
        'regulation' => 'default',
        'locale'     => $locale,
    ])->first();

    return view('legal.document', ['document' => $document, 'regulation' => $regulation]);
});

Document Versioning

CREATE TABLE legal_documents (
    id           BIGSERIAL PRIMARY KEY,
    type         TEXT,         -- privacy-policy, terms, cookie-policy
    regulation   TEXT,         -- gdpr, ccpa, rfz152, default
    locale       CHAR(2),
    version      TEXT,         -- 2.3.1
    content      TEXT,
    effective_at DATE,
    is_current   BOOLEAN DEFAULT false,
    created_at   TIMESTAMPTZ DEFAULT NOW()
);

When updating document — new record with effective_at in future. Automatically switches to new version on effective date.

Consent and Storage

Users from EU (GDPR) must explicitly accept documents. Storage:

UserConsent::create([
    'user_id'      => auth()->id(),
    'document_id'  => $document->id,
    'ip_address'   => request()->ip(),
    'user_agent'   => request()->userAgent(),
    'accepted_at'  => now(),
]);

Timeline

Regional documents system with jurisdiction detection and versioning: 4–6 business days.