DEV Community

Muhammad Gharis
Muhammad Gharis

Posted on

I Built a Lightweight CRM Starter Kit in Core PHP — No Laravel, No Composer, No Framework Bloat

Most small business software does not need a heavy framework.

A freelancer, small agency, repair shop, salon, or local service business usually needs something simple:

  • Add clients
  • Track leads
  • Manage tasks
  • Create invoices
  • View basic reports
  • Export data
  • Run everything on basic shared hosting

That is why I started building a lightweight Core PHP CRM Starter Kit.

The goal is simple:

Build a clean, fast, self-hosted CRM foundation that developers can understand, customize, and deploy without fighting a huge framework.

Why Core PHP?

Frameworks are powerful, but not every project needs one.

For many small CRM, HRM, POS, and admin panel projects, Core PHP still makes a lot of sense because:

  • It runs on almost any shared hosting
  • There is no complex setup
  • No Composer dependency required
  • Easy for beginners and junior developers to understand
  • Fast enough for small and medium business workflows
  • Easy to customize for local clients

A lot of small business clients do not care whether the system uses the latest framework.

They care about this:

Does it work?
Is it fast?
Can I manage my business from it?
Can it be customized without a huge monthly bill?

What I Am Building

The first version of the CRM includes the core modules most small businesses need:

  1. Client Management

Basic client records with:

  • Name
  • Email
  • Phone
  • Company
  • Status
  • Notes
  • Lead Pipeline

A simple lead tracking system:

  • New lead
  • Contacted
  • Proposal sent
  • Won
  • Lost

Nothing overcomplicated. Just a practical sales pipeline.

  1. Task Management

A basic task module for daily work:

  • Task title
  • Related client
  • Due date
  • Priority
  • Status
  • Invoice Module

A simple invoice system:

  • Invoice number
  • Client
  • Items
  • Quantity
  • Price
  • Total Print-friendly invoice page
  • Dashboard

The dashboard shows useful numbers:

  • Total clients
  • Open leads
  • Pending tasks
  • Monthly invoice total
  • Planned Folder Structure

Here is the simple structure I am using:

leancrm-core/
app/
config/
database.php
controllers/
ClientController.php
LeadController.php
TaskController.php
InvoiceController.php
models/
Client.php
Lead.php
Task.php
Invoice.php
views/
clients/
leads/
tasks/
invoices/
dashboard.php
helpers/
auth.php
functions.php

public/
assets/
css/
js/
index.php

database/
install.sql
sample_data.sql

docs/
installation.md
customization.md

README.md

The idea is to keep everything easy to follow.

No hidden magic.
No huge dependency tree.
No complicated build process.

Example Database Table

A simple clients table can look like this:

CREATE TABLE clients (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(150) NOT NULL,
    email VARCHAR(150),
    phone VARCHAR(50),
    company VARCHAR(150),
    status VARCHAR(50) DEFAULT 'active',
    notes TEXT,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

Enter fullscreen mode Exit fullscreen mode

For a starter CRM, this is enough.

You can always extend it later with:

  • Tags
  • Custom fields
  • Client categories
  • Assigned users
  • Activity history Example PHP Database Connection

I am keeping the database connection simple using PDO:

`<?php

$host = "localhost";
$dbname = "leancrm";
$username = "root";
$password = "";

try {
$pdo = new PDO(
"mysql:host=$host;dbname=$dbname;charset=utf8mb4",
$username,
$password
);

$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
Enter fullscreen mode Exit fullscreen mode

} catch (PDOException $e) {
die("Database connection failed.");
}
`
For production, credentials should be stored safely and error messages should not expose sensitive details.

Why This Could Be Useful

This type of project can help three kinds of people:

  1. Beginner PHP Developers

They can study a real business application instead of only learning isolated tutorials.

  1. Freelancers

They can customize the CRM for small clients such as:

  • Agencies
  • Consultants
  • Clinics
  • Salons
  • Repair shops
  • Real estate agents
  • Training centers
  • 3. Small Business Owners

They can use a simple self-hosted system instead of paying monthly SaaS fees for basic workflows.

What I Am Avoiding

I am intentionally not adding unnecessary complexity in the first version.

  • No multi-tenant SaaS.
  • No paid APIs.
  • No heavy JavaScript framework.
  • No complex build tools.
  • No over-engineered architecture. The first version focuses on one thing:

A clean, understandable CRM foundation that works.

Future Modules

After the first release, I may add:

  • User roles
  • Activity logs
  • CSV export
  • Payment status tracking
  • Quotation module
  • Basic reports
  • Email templates
  • POS module
  • HRM module
  • Installer wizard

The long-term goal is to create a small ecosystem of lightweight business tools.

Final Thought

Not every software project needs to be huge.

Sometimes the best tool is the one that is:

Simple
Fast
Easy to deploy
Easy to understand
Easy to customize

That is the philosophy behind this Core PHP CRM Starter Kit.

I will keep sharing updates as I build the modules step by step.

If you are a PHP developer, freelancer, or someone who builds tools for small businesses, I would love to know:

What module would you add first to a lightweight CRM?

Top comments (0)