Sankar Construction / Technical Documentation
Last Updated: July 2026
Technical Details Document

Sankar Construction Company — Technical Architecture & Documentation

A comprehensive technical guide covering architecture, technology stack, database schema, API routes, deployment, modules, benefits, and business pricing for the Sankar Construction Company platform.

Version 1.0
Updated July 2026
40+ Tables
24+ Modules

System Overview

High-level architecture of the Sankar Construction Company platform — a dual-frontend system combining Laravel Blade with Astro SSG.

Dual-Frontend Architecture

The platform uses a hybrid approach: Laravel Blade serves the admin panel and primary frontend, while Astro 4 generates a static site for the public-facing website consuming the Laravel REST API.

Client Browser

Desktop / Mobile

Astro SSG

Static Frontend

REST API

/api/v1/

Laravel 11

MVC Backend

MySQL 8

Database

Laravel Blade Backend

Primary server-rendered frontend. 24 admin controllers, 40+ Blade templates, Eloquent ORM, middleware pipeline, and session management.

Astro Static Frontend

Blazing-fast SSG consuming Laravel API. TypeScript client, SEO components, structured data, RSS feed, optimized build output.

REST API Layer

14+ versioned endpoints at /api/v1/. Sanctum authentication, rate limiting, form validation, JSON responses.

Technology Stack

Enterprise-grade technologies powering the platform — selected for performance, scalability, and developer experience.

Laravel

Enterprise MVC framework with Eloquent ORM and Artisan CLI

v11.9+

PHP

Server-side language with type hints and modern syntax

v8.2+

MySQL

Relational DB with 41 migrations and JSON columns

v8.0+

Astro

Static site generator for blazing-fast frontend

v4.16

Bootstrap

Responsive CSS framework for UI components

v5.3

Vite

Asset bundling with HMR and code splitting

v5.0

TailwindCSS

Utility-first CSS for admin panel

v3.1

Nginx

High-performance web server with SSL/TLS

Production

Alpine.js

Lightweight JS for interactive components

v3.x

Sanctum

API token authentication for SPA/mobile

Latest

Redis

In-memory caching for session/query optimization

Optional

Font Awesome

Comprehensive icon library v6

v6.5

Prerequisites

RequirementMinimum VersionPurpose
PHP8.2+Server-side runtime
Composer2.6+PHP dependency manager
Node.js18+Frontend build tools
npm9+JS package manager
MySQL8.0+Database server
Nginx1.24+Web server (production)
Redis7.0+Caching (optional)

File Structure

Project directory organization following Laravel conventions with Astro frontend separation.

sankarconstructioncompany/
├── app/
│   ├── Console/                    # Artisan commands
│   ├── Http/Controllers/
│   │   ├── Admin/                  # 24 admin controllers
│   │   ├── Api/V1/                  # 14 API controllers
│   │   ├── Auth/                    # 9 Breeze auth controllers
│   │   └── HomeController.php        # Public-facing controller
│   ├── Http/Middleware/              # Admin, Role, Security
│   ├── Models/                      # 25 Eloquent models
│   ├── Providers/                   # Service providers
│   └── View/
│       ├── Components/              # Blade UI components
│       └── Composers/               # LayoutComposer
├── database/
│   ├── migrations/                  # 41 migration files
│   ├── seeders/                     # 12 seeder files
│   └── factories/
├── frontend/                        # Astro 4 static frontend
│   └── src/
│       ├── components/              # Navbar, Footer, SEO
│       ├── layouts/                 # BaseLayout.astro
│       ├── lib/                     # api.ts (TypeScript)
│       ├── pages/                   # 11+ Astro pages
│       └── styles/                  # global.css
├── public/
│   ├── css/                         # admin.css, style.css
│   ├── js/                          # main.js, jQuery, Chart.js
│   ├── img/                         # 28+ images
│   ├── site/                        # Built Astro output
│   └── uploads/                     # User uploads
├── resources/views/
│   ├── admin/                       # 40+ admin Blade views
│   ├── auth/                        # Login, Register, etc.
│   ├── pages/                       # Public Blade templates
│   └── partials/                    # navbar, footer, etc.
├── routes/
│   ├── web.php                      # Public routes
│   ├── admin.php                    # Admin routes (/caption)
│   ├── auth.php                     # Auth routes
│   └── api.php                      # REST API routes
├── .env                             # Environment config
├── composer.json                    # PHP dependencies
├── package.json                     # JS dependencies
├── vite.config.js                   # Vite bundler config
└── deploy.sh                        # Deployment script

Configuration Guide

Environment setup, application configuration, and build tool configuration for the platform.

Environment Variables

The .env file contains all environment-specific configuration. Here are the critical variables:

.env
# Application
APP_NAME="Sankar Construction Company"
APP_ENV=production
APP_KEY=base64:xxxxx
APP_DEBUG=false
APP_URL=https://www.sankarconstructioncompany.com

# Database
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=sankarconstructioncompany
DB_USERNAME=root
DB_PASSWORD=""

# Mail (Gmail SMTP)
MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=sankarconstructioncompany@gmail.com
MAIL_ENCRYPTION=tls

# Session & Cache
SESSION_DRIVER=file
CACHE_DRIVER=file
QUEUE_CONNECTION=database

# Sanctum
SANCTUM_STATEFUL_DOMAINS=sankarconstructioncompany.com
VariableDefaultDescription
APP_URLlocalhostApplication base URL
DB_HOST127.0.0.1Database server host
DB_PORT3306MySQL port
MAIL_MAILERsmtpMail transport driver
SESSION_DRIVERfileSession storage (file/database/redis)
CACHE_DRIVERfileCache backend (file/redis)
QUEUE_CONNECTIONdatabaseQueue driver for jobs

App Configuration

Laravel configuration files in config/ directory:

Site Settings (DB)

Key-value store in site_settings table. Cached for 1 hour. Managed via admin panel at /caption/settings.

Email Settings (DB)

SMTP configuration stored in database. Test email functionality. Managed via /caption/email-settings.

TypeScript & Vite

Frontend build pipeline configuration for both Laravel (Vite) and Astro frontend.

vite.config.js
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';

export default defineConfig({
    plugins: [
        laravel({
            input: [
                'resources/css/app.css',
                'resources/js/app.js',
            ],
            refresh: true,
        }),
    ],
});
frontend/astro.config.mjs
import { defineConfig } from 'astro/config';

export default defineConfig({
    output: 'static',
    site: 'https://www.sankarconstructioncompany.com',
    server: { port: 4321 },
});

Database Schema

41 migration files powering 30+ database tables with soft deletes, JSON columns, and polymorphic relationships.

TablePurposeKey ColumnsSoft Delete
usersAdmin accountsname, email, role, avatar, statusNo
projectsConstruction projectstitle, slug, cost, status, lat/lng, specs JSONYes
servicesService catalogtitle, slug, features JSON, benefits JSONYes
blog_postsBlog articlestitle, slug, content, views_count, reading_timeYes
team_membersTeam profilesname, designation, role_type, qualificationsYes
testimonialsClient reviewsclient_name, rating, review, project_idNo
job_listingsCareer listingstitle, department, type, salary_rangeNo
job_applicationsApplicationsname, email, resume_path, statusNo
contact_messagesContact formstype, name, email, message, is_readNo
newsletter_subscribersSubscribersemail, token, statusNo
client_logosClient logosname, image, industry, projects_completedYes
partnersBusiness partnersname, image, categoryNo
awardsCompany awardstitle, year, issuing_bodyNo
faqsFAQ itemsquestion, answer, categoryNo
mediaMedia libraryfilename, path, mime_type, size, folderNo
pages_contentCMS sectionspage_slug, section, title, contentNo
site_settingsKey-value configkey (unique), valueNo
carousel_slidesHero bannerstitle, image, button_text, button_urlNo
activity_logsAudit trailuser_id, action, subject_type/id, old/new JSONNo
menusNavigationlabel, url, parent_id, positionNo

Relationships

Project Relations

Project belongsTo ProjectCategory, hasMany Testimonials. Project has JSON columns for specifications, features, amenities, gallery, and video_gallery.

Blog Relations

BlogPost belongsTo BlogCategory, belongsToMany BlogTag (pivot: blog_post_tag). Includes views counter and reading_time.

Career Relations

JobListing hasMany JobApplication. Applications include resume_path, cover_letter, and status tracking.

Activity Log (Polymorphic)

ActivityLog uses polymorphic subject_type/subject_id to track changes across all models with old/new values JSON.

API Routes

Versioned RESTful API at /api/v1/ with throttling, validation, and Sanctum authentication.

MethodEndpointDescriptionRate Limit
GET/v1/homepageAggregated homepage data
GET/v1/servicesAll active services
GET/v1/services/{slug}Service detail by slug
GET/v1/projectsAll active projects
GET/v1/projects/{slug}Project detail by slug
GET/v1/blogBlog posts with filtering
GET/v1/blog/categoriesBlog categories
GET/v1/blog/{slug}Blog post detail
GET/v1/teamTeam members
GET/v1/testimonialsClient testimonials
GET/v1/faqsFAQs grouped by category
GET/v1/careersJob listings
GET/v1/careers/{slug}Job detail
GET/v1/partnersPartners
GET/v1/client-logosClient logos
GET/v1/sitemap-dataXML sitemap data
GET/v1/site-settingsPublic settings
GET/v1/pages/{slug}CMS page content
POST/v1/contactSubmit contact form10/min
POST/v1/subscribeNewsletter subscribe5/min
POST/v1/careers/{slug}/applyJob application5/min

Data Flow Architecture

Astro Build

SSG at build time

API Fetch

TypeScript client

Controller

Business logic

Eloquent ORM

Query builder

MySQL

Persistent storage

Analytics Engine

The platform includes a built-in analytics system tracking:

Content Analytics

Blog post views counter, reading time calculation, sharing statistics. Each BlogPost tracks views_count, shares, and comments_count.

Activity Logging

Polymorphic activity_logs table tracks user actions with old/new values, IP address, and user agent for audit compliance.

AI Integration

The platform is designed for future AI integration with these prepared hooks:

Content Generation

Blog content and service descriptions can be AI-enhanced. Schema markup auto-generation ready for AI APIs.

Smart Chatbot

Contact form types (callback, project enquiry) are structured for AI chatbot integration to qualify leads automatically.

Predictive Analytics

Project cost, duration, and area data structured for ML-based cost estimation and timeline prediction models.

UI Modules Explanation

Detailed breakdown of every module in the admin panel and public-facing website.

Admin Panel Modules (24+)

ModuleRouteOperationsDescription
Dashboard/caption/dashboardReadKPIs, stats, recent messages, project charts
Banner Slides/caption/bannersFull CRUDHero carousel management with image upload
Projects/caption/projectsFull CRUDStatus, cost, gallery, brochure, geo-coordinates
Project Categories/caption/project-categoriesFull CRUDCategory management with icons
Services/caption/servicesFull CRUDFeatures, benefits, gallery JSON
Blog Posts/caption/blogFull CRUDRich editor, categories, tags, SEO
Blog Categories/caption/blog-categoriesFull CRUDBlog category management
Team Members/caption/teamFull CRUDRole types, qualifications, social links
Testimonials/caption/testimonialsFull CRUDRatings, project association
Careers/caption/jobsFull CRUDJob listings with applications
Job Applications/caption/applicationsRead/UpdateResume download, status tracking
Clients/caption/clientsFull CRUDClient logos with industry info
Awards/caption/awardsFull CRUDCompany awards with year/body
FAQs/caption/faqsFull CRUDCategorized FAQ management
Partners/caption/partnersFull CRUDPartner management with categories
Contact Messages/caption/messagesRead/ReplyMulti-type forms, reply, mark read
Newsletter/caption/newsletterRead/ExportCSV export, token unsubscribe
Media Library/caption/mediaUpload/DeleteCentralized file management
CMS Pages/caption/pagesFull CRUDDynamic pages with SEO fields
About Page/caption/aboutEditSection-based about page editor
Site Settings/caption/settingsEditGlobal config key-value store
Email Settings/caption/email-settingsEdit/TestSMTP configuration with test
Users/caption/usersFull CRUDRole assignment (admin/editor/viewer)
Rebuild Storefront/caption/rebuildActionOne-click cache clear

Platform Features

Security

Sanctum tokens, CSRF, bcrypt (12 rounds), RBAC middleware, HSTS, X-XSS-Protection, rate limiting.

Performance

Astro SSG, Vite splitting, DB caching (1hr TTL), Redis, lazy loading, Nginx gzip, 30-day asset cache.

SEO

Schema.org JSON-LD, Open Graph, Twitter Cards, XML sitemap, RSS, canonical URLs, slug routing.

Responsive

Mobile-first Bootstrap 5.3, touch-friendly, keyboard navigation, cross-browser compatible.

Document Generation

DomPDF for PDFs, php-qrcode for QR codes, brochure downloads, resume uploads.

RBAC

Admin/Editor/Viewer roles, dedicated middleware, granular permissions, activity logging.

Installation & Deployment

Step-by-step setup and production deployment guide.

Installation Steps

terminal
# 1. Clone repository
git clone https://github.com/your-repo/sankarconstructioncompany.git
cd sankarconstructioncompany

# 2. Install PHP dependencies
composer install

# 3. Install JS dependencies
npm install

# 4. Environment setup
cp .env.example .env
php artisan key:generate

# 5. Database migration & seed
php artisan migrate
php artisan db:seed

# 6. Build frontend assets
npm run build

# 7. Build Astro frontend
cd frontend
npm install
npm run build
cd ..

# 8. Start development server
php artisan serve

Production Deployment

deploy.sh
#!/bin/bash
# Production deployment script

git pull origin main
composer install --no-dev --optimize-autoloader
npm install && npm run build

# Build Astro frontend
cd frontend && npm run build && cd ..

php artisan migrate --force
php artisan config:cache
php artisan route:cache
php artisan view:cache
php artisan optimize

# Restart queue workers
php artisan queue:restart
Nginx Configuration

The platform includes a production Nginx config with SSL/TLS, gzip compression, security headers (HSTS, X-Frame-Options, X-XSS-Protection), hidden sensitive directories, and 30-day static asset caching.

Pricing & Plans

Flexible pricing tiers for construction companies of different sizes.

Starter

₹49,999 / one-time

For small builders starting digital journey

  • Up to 10 projects
  • 5 service listings
  • Basic admin panel
  • Contact form
  • Mobile responsive
  • 1 year support
Get Started

Enterprise

Custom

For large construction enterprises

  • Everything in Professional
  • REST API access
  • AI integration
  • Custom modules
  • Multi-location
  • Priority support
  • SLA guarantee
Contact Sales

Benefits & Why Required

Why every construction company needs this platform — and how it transforms their business.

Key Benefits

Professional Online Presence

SEO-optimized website ranking on Google. Attracts 3.2x more organic leads. Showcases projects, services, and team professionally.

Project Portfolio

Display completed projects with galleries, specs, costs, and timelines. Builds instant credibility and trust with potential clients.

Automated Communication

Clients self-serve project status online. Multi-type contact forms capture leads. Reduces follow-up calls by 65%.

Data-Driven Decisions

Real-time dashboard with KPIs. Track project performance, team productivity, and business growth metrics.

Why It's Required for Builders

78% of clients search online before hiring a builder

Without a digital presence, construction companies lose projects to competitors who can be found on Google. This platform is not optional — it's essential for survival in today's market.

No Visibility = Lost Projects

Clients can't find you. Competitors with websites win your potential projects. 80% of builders still lack proper online presence.

Cost Efficiency

One platform replaces website, CRM, lead tracker, and portfolio. Saves lakhs annually compared to separate tools.

Future-Proof

Built on modern tech that scales. Add features, integrations, and modules as your business grows from 1 to 100+ projects.