Daniel López Azaña

Theme

Social Media

Mascotea - Vertical Social Network for Pets

Complete vertical social platform dedicated to pets and their owners, built from scratch with Yii Framework. Social network integrating user and pet profiles, dynamic timeline, friendship management, photo albums, community blog, events calendar, business directory for pet services, messaging system, real-time notifications, and complete multilingual support. Includes Mascotour, a travel agency specializing in pet-friendly destinations with integrated booking and invoicing management.

General-purpose social networks connect people with diverse interests, but what happens when there’s a specific community with unique needs that traditional platforms don’t adequately address? Pet owners form a passionate global community seeking to connect with other animal lovers, share experiences, discover specialized services, and find pet-friendly places. Mascotea was born to create that dedicated space exclusively for pets and their owners.

Mascotea homepage showing the social network for pets

I designed and developed from scratch this complete vertical social platform using Yii Framework, creating an integrated ecosystem combining interactive profiles for users and pets, Facebook-style dynamic timeline, friendship management, photo albums, community blog, events calendar, geolocated professional directory, private messaging system, real-time notifications, and full multilingual support (Spanish and English).

Additionally, the project includes Mascotour, a travel agency specializing in pet-friendly destinations that shares the same codebase but operates as an independent brand with its own domain, booking management, and integrated invoicing system.

The Challenge - Building a Vertical Community from Scratch

Creating a vertical social network presents unique challenges beyond technical development. It’s not simply about replicating Facebook or Twitter, but designing an experience specifically adapted to the needs of a community with particular interests.

Main Requirements:

  • Dual profile system - Human users and independent profiles for each pet with their own content and timeline.
  • Complete social experience - Dynamic timeline, friendship system, reactions, comments, and sharing.
  • Rich multimedia content - Organized photo albums with visual management and tagging system.
  • Community blog - Article publishing with professional editor, categories, tags, and custom templates.
  • Event discovery - Calendar with multiple views (list, map, calendar) and attendance system.
  • Geolocated directory - Professional services search with Google Places API integration.
  • Private communication - Complete internal messaging with real-time notifications.
  • Responsive design - Full adaptation to mobile, tablets, and desktop with optimized menus.
  • Native multilingual - Complete Spanish/English support with full interface translation.

Technical Architecture - Yii Framework as Solid Foundation

The platform was built on Yii Framework 1.1, using a modular architecture with YiiInitializr Advanced that separated the application into independent modules: frontend (public interface), backend (administration panel), API (REST services), console (CLI scripts), and common (shared code).

Technology Stack:

ComponentTechnologyPurpose
FrameworkYii Framework 1.1MVC architecture, ActiveRecord ORM, code generation
FrontendBootstrap 2.3 + jQueryResponsive design and interactive UI components
DatabaseMySQL 5.549 specialized tables with optimized indexes
SearchApache LuceneFull-text indexing for fast search
GeolocationGoogle Places APIGeocoding and place search
AuthenticationHybridAuthSocial login with Facebook, Twitter, Google+
EditorTinyMCEAdvanced WYSIWYG editor with templates

Complex Database:

The schema includes 49 specialized tables organized in functional groups: users and authentication (6 tables), pets (5 tables), social content (8 tables), multimedia (4 tables), blog (7 tables), events and directory (4 tables), groups and pages (4 tables), plus system tables. This normalized structure enables optimized SQL queries, clearly defined relationships, and future scalability through partitioning.

Public Area - Open Interface and Main Features

The public interface of Mascotea presents main functionalities accessible without registration: homepage with project description, “About us” page, community blog with categorized articles, pet world events calendar, geolocated directory of professionals and businesses, public listing of registered pets, wizard-style registration forms, login system with social authentication, and custom error pages. The design is fully responsive with hamburger menu on mobile and multilingual support with visible language selector.

Highlighted public area features:

  • Complete multilingual - Automatic browser language detection, visible selector, full translation of interface, messages, and content.
  • Responsive design - Mobile adaptation with hamburger menu, responsive images, touch-optimized forms.
  • Social login - Integration with Facebook, Twitter, and Google+ via HybridAuth with OAuth 2.0.
  • Wizard forms - Guided step-by-step registration with real-time validation and progress indicators.
  • Custom error pages - 404 and 500 with consistent design, friendly messages, and alternative navigation links.
  • Google Places integration - Smart autocomplete in all geographic location fields.

Private Area - Complete Social Experience

The private zone accessible only to registered users includes all social functionalities: complete user and pet profiles with customizable cover photos, dynamic timeline with friend and group posts, exclusive post editor with multimedia support, bidirectional friendship system, personal pet blogs, complete photo album management with advanced lightbox, private messaging system, real-time notifications, friend request management, popup profile cards (hover cards), complete navigation menu with access to all sections, and Rufo virtual assistant providing contextual help. The responsive design adapts the entire experience to mobile devices maintaining full functionality.

Key private area features:

  • Dual profile system - Each person can have multiple pets, each with independent identity, own timeline, and friendship system between pets.
  • Dynamic timeline - Posts with rich text, images, embedded videos, likes system, nested comments, and sharing.
  • Complete photo management - Multiple upload, organized albums, advanced lightbox, social tagging, cover management with preview.
  • Private communication - One-on-one messaging with chat-style interface, complete history, read indicators, and push notifications.
  • Advanced search engine - Apache Lucene provides full-text search with autocomplete, fuzzy search, and smart relevance.
  • Professional TinyMCE editor - WYSIWYG with predefined templates, HTML support, image management, and auto-drafts.

Administration Panel - Complete Site Management

The administration backend provides total platform control: desktop with real-time statistics dashboard, complete blog article management with advanced editor, comment moderation with approval/rejection, category management with hierarchical organization, user management with permission and role control, language configuration with translation system, Lucene search index administration with full or incremental reindexing, static page management for institutional content, general site configuration, and performance optimization tools. The panel includes independent authentication with brute-force protection and automatic logging of all administrative actions.

Administration panel features:

  • Content management - Blog articles, static pages, categories, tags, comments with anti-spam moderation.
  • User management - Complete listing, profile editing, role assignment (user, moderator, administrator), suspension and blocking.
  • Lucene search engine - Full or incremental reindexing, index optimization, search statistics, query debugging.
  • System configuration - Site name, active languages, SMTP configuration, security policies, cache optimization.
  • Robust security - Independent authentication, XSS/CSRF/SQL Injection protection, rate limiting, automatic backup, action logging.

Mascotour - Pet-Friendly Travel Agency

Mascotour is the project’s second phase, conceived as a travel agency specializing in pet-friendly destinations that shares Mascotea’s infrastructure but operates as an independent brand. The project includes catalog of pet-friendly hotels and accommodations, beaches and natural spaces where pets are welcome, pet-friendly restaurants, activities and excursions including pets, pet-friendly transportation services (plane, train, bus), booking management system integrated with SugarCRM, automatic invoice generation with Mascotour-specific templates, and unique international volunteer program at animal shelters and sanctuaries combining tourism with solidarity.

Mascotour-Mascotea Technical Integration:

Shared - Yii framework and code structure, user system and authentication, MySQL database with specific tables (mascotea_tour, tour_request, tour_category), administration panel with dedicated sections, invoicing and payment system.

Independent - Own domain (mascotour.com), specific design and branding, dedicated editorial content, differentiated marketing strategy, separate customer base in SugarCRM.

This architecture enables efficient code reuse (70% shared), centralized maintenance with updates applicable to both, joint deployment reducing operational costs, and independent brands with differentiated positioning.

Deployment Architecture and Optimization

The platform was deployed on optimized LAMP infrastructure: Linux CentOS 6/7 on dedicated server (8 GB RAM, 4 cores), Apache 2.4 with mod_rewrite and mod_deflate, PHP 5.6 with OPcache and Memcached, MySQL 5.5 with InnoDB and query cache, Memcached for sessions (256 MB), Apache Lucene with SSD indexes, and Postfix for transactional email.

Implemented Optimizations:

  • OPcache enabled - PHP code compilation in memory (128 MB), reducing disk load.
  • Memcached for sessions - In-memory storage reducing database queries.
  • MySQL query cache - Repeated query caching significantly improving response times.
  • Gzip compression - mod_deflate with ~70% ratio reducing consumed bandwidth.
  • CDN for assets - jQuery, Bootstrap, and libraries served from CDN reducing latency.
  • CSS/JS minification - Minimized files in production reducing payload size.
  • Lazy loading - Deferred loading of images outside viewport improving First Contentful Paint.

Implemented Security - Mandatory HTTPS with Let’s Encrypt, XSS protection via CHtmlPurifier, anti-CSRF tokens in all forms, prepared statements against SQL Injection, per-IP rate limiting, and daily automatic backup with 30-day retention.

Results and Impact

Technical Achievements

Scalable modular architecture5 independent modules with reusable shared code.
Optimized complex database49 tables with strategic indexes and sub-second queries.
Professional full-text searchApache Lucene with asynchronous indexing and fuzzy search.
Complete responsive designCustom Bootstrap with touch optimizations.

Key Conclusions

Developing Mascotea and Mascotour demonstrated the viability of creating vertical social networks with limited resources but clear vision. Choosing Yii Framework provided solid structure accelerating development, modular architecture facilitated independent component maintenance, investing in Apache Lucene from the start ensured optimal user experience as content grew, Bootstrap guaranteed responsive from day one, and Google Places API elevated directory and calendar quality.

Lessons Learned - Start with MVP launching core features progressively, invest in architecture from day 1 with exhaustive database design, leverage proven components without reinventing the wheel, make responsive non-negotiable from the start, and implement security as priority avoiding costly vulnerabilities later.

Vertical Network Viability - Mascotea demonstrated that creating specialized networks is viable with less competition than general platforms, higher engagement from passionate users, specific monetization through directory and tours, and loyal community finding unique value unavailable on general platforms.


Need to develop a social network or online community?

For companies or entrepreneurs seeking:

  • Vertical social platforms for specific communities with unique needs.
  • Complex profile systems with relationship, content, and multimedia management.
  • Dynamic timeline with real-time updates and notification system.
  • Geolocated directories with Google Maps and Places API integration.
  • Scalable and modular architecture enabling future growth without refactoring.

Experience gained in Mascotea and Mascotour provides deep knowledge in online community development, complex social architectures, and scalable multi-user platforms.

I’m available for consulting and development of similar projects, bringing expertise in modern PHP frameworks, modular architectures, performance optimization, and complex database design.

Get in touch →

Daniel López Azaña

About the author

Daniel López Azaña

Tech entrepreneur and cloud architect with over 20 years of experience transforming infrastructures and automating processes.

Specialist in AI/LLM integration, Rust and Python development, and AWS & GCP architecture. Restless mind, idea generator, and passionate about technological innovation and AI.

Comments

Be the first to comment

Submit comment

Have a Similar Project in Mind?

Let's discuss how I can help you achieve your goals

Start a Conversation