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.
- 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.
- 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
- 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)
-
Clone the repository:
git clone git@gitlab.internal.corp/sales-tech/crm-internal.git cd crm-internal -
Copy the example configuration file and adjust variables:
cp .env.example .env
-
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;
-
Run database migrations:
go run ./cmd/migrate up
-
Generate Templ components:
templ generate
-
Build Tailwind CSS styles:
npm install npm run build:css
-
Start the application:
go run ./cmd/server
Access the application at http://localhost:8080.
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