Skip to content

Latest commit

 

History

103 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRM Internal

Internal Client Relationship Management system for sales and account management teams to track leads, client contacts, deal pipelines, interaction logs, and contract renewals across regional branches.

Built with Go, Templ, HTMX, Alpine.js, Tailwind CSS, and PostgreSQL.

Features

  • Lead Pipeline: Stage transitions (Lead, Contacted, Proposal, Negotiation, Closed Won/Lost) with status audit history.
  • Account & Contact Management: Company profiles, tax IDs (NPWP), and contact books with dynamic search.
  • Deal Opportunities: Pipeline tracking with weighted probability revenue scoring and target closing dates.
  • Interaction Logs: Activity logs for meetings, phone calls, and client visit notes with follow-up task scheduling.
  • Contract Renewal Alerts: Automatic expiration triggers (30/60/90 days) for account managers.
  • Branch Access Control: Role-based access control (RBAC) separated by regional business units (Jakarta, Surabaya, Medan).
  • Performance Dashboard: Real-time sales metrics, conversion rates, and quota achievement visualizer.
  • Document Repository: Proposal, price quote, and signed MoU upload support stored on SAN volume storage.
  • CSV Export: Contact list and sales pipeline reporting export utilities.
  • Audit Logging: Ownership transfers and customer record revision history.

Tech Stack

  • Backend: Go 1.19 / 1.20 / 1.21
  • Database: PostgreSQL 15
  • Frontend: Templ (Server-Side Component Rendering), HTMX 1.9, Alpine.js 3.x, Tailwind CSS 3.0

Getting Started

Prerequisites

  • Go 1.19 or higher
  • PostgreSQL 15
  • Templ CLI (go install github.com/a-h/templ/cmd/templ@latest)
  • Node.js & npm (for compiling Tailwind CSS assets)

Environment Setup

  1. Clone the repository:

    git clone git@gitlab.internal.corp/sales-tech/crm-internal.git
    cd crm-internal
  2. Copy the example configuration file and adjust variables:

    cp .env.example .env
  3. Set up local PostgreSQL database:

    CREATE DATABASE crm_internal_db;
    CREATE USER crm_user WITH ENCRYPTED PASSWORD 'secret';
    GRANT ALL PRIVILEGES ON DATABASE crm_internal_db TO crm_user;
  4. Run database migrations:

    go run ./cmd/migrate up

Building and Running

  1. Generate Templ components:

    templ generate
  2. Build Tailwind CSS styles:

    npm install
    npm run build:css
  3. Start the application:

    go run ./cmd/server

Access the application at http://localhost:8080.

Deployment

Deployed as a systemd service on an internal Linux virtual machine (Jakarta Data Center) behind Nginx reverse proxy. Dynamic uploaded files (Proposals, MoUs) are stored on a mounted SAN directory (/mnt/san/crm-uploads).

To build a production binary:

make build

About

Internal CRM for tracking leads, client contacts, deal pipelines, and contract renewals across branches

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages