Skip to content

yanghai45/minicrm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📡 Goodix Sales CRM

A full-stack sales pipeline tracker built for Goodix Technology North America.
Track deals, manage todos, and generate management reports — all running locally on your machine.


Features

  • Kanban Board — Drag & drop deals across 6 pipeline stages
  • Table View — Sortable, filterable list of all deals
  • Dashboard — KPI cards, pipeline charts, revenue by product, task overview
  • Todo Lists — Per-deal task management with due dates and overdue alerts
  • Deal Management — Full CRUD with client, contact, product, value, priority, notes
  • Search & Filter — Find deals by keyword or filter by stage
  • Export to CSV — One-click export for management reporting
  • SQLite Database — All data stored locally, no cloud dependency
  • REST API — Clean API for future integrations (Spark Mail, etc.)

Tech Stack

Layer Technology
Frontend React 18 + Vite
Backend Node.js + Express
Database SQLite3 (via better-sqlite3)
Styling Inline styles + Google Fonts

Prerequisites

  • Node.js v18 or later — Download here
  • npm (comes with Node.js)

To check if you have Node.js installed:

node --version   # Should show v18.x.x or higher
npm --version    # Should show 9.x.x or higher

Installation

Step 1: Clone or extract the project

Place the goodix-crm folder wherever you like, then open a terminal in that directory.

Step 2: Install backend dependencies

cd server
npm install

Step 3: Initialize the database

npm run seed

This creates goodix-crm.db with sample deals and todos pre-loaded.

Step 4: Install frontend dependencies

cd ../client
npm install

Running the Application

You need two terminal windows (or use the provided start script).

Option A: Two terminals (recommended for development)

Terminal 1 — Start the API server:

cd server
npm start

The API will be running at http://localhost:3002

Terminal 2 — Start the frontend:

cd client
npm run dev

The app will open at http://localhost:5173

Option B: Single command (production mode)

cd server
npm run build-and-start

This builds the frontend and serves everything from http://localhost:3001


API Endpoints

All endpoints are prefixed with /api

Deals

Method Endpoint Description
GET /api/deals List all deals
GET /api/deals/:id Get single deal
POST /api/deals Create new deal
PUT /api/deals/:id Update deal
DELETE /api/deals/:id Delete deal
GET /api/deals/export/csv Export deals as CSV

Todos

Method Endpoint Description
GET /api/deals/:id/todos List todos for deal
POST /api/deals/:id/todos Add todo to deal
PUT /api/todos/:id Update todo
DELETE /api/todos/:id Delete todo

Dashboard

Method Endpoint Description
GET /api/dashboard/stats KPI stats & chart data

Project Structure

goodix-crm/
├── README.md                 # This file
├── server/
│   ├── package.json          # Backend dependencies
│   ├── index.js              # Express API server
│   ├── database.js           # SQLite schema & connection
│   ├── seed.js               # Sample data seeder
│   └── goodix-crm.db         # SQLite database (created after seeding)
├── client/
│   ├── package.json          # Frontend dependencies
│   ├── vite.config.js        # Vite configuration
│   ├── index.html            # HTML entry point
│   └── src/
│       ├── main.jsx          # React entry point
│       ├── App.jsx           # Main CRM application
│       ├── api.js            # API client functions
│       └── components/
│           ├── Kanban.jsx    # Kanban board view
│           ├── TableView.jsx # Table view
│           ├── Dashboard.jsx # Dashboard with charts
│           ├── DealModal.jsx # Deal create/edit modal
│           └── ui.jsx        # Shared UI components

Customization

Adding Products

Edit the PRODUCTS array in client/src/App.jsx:

const PRODUCTS = ["GT9926", "GT9976N", "GW9501", "GW9578", "GF3626", "GF3208", "Other"];

Adding Pipeline Stages

Edit the STAGES array in client/src/App.jsx and add the corresponding value in server/database.js.

Changing the Port

  • Backend: Edit PORT in server/index.js (default: 3001)
  • Frontend: Edit server.port in client/vite.config.js (default: 5173)

Backup & Restore

The entire database is a single file: server/goodix-crm.db

Backup:

cp server/goodix-crm.db server/goodix-crm-backup-$(date +%Y%m%d).db

Restore:

cp server/goodix-crm-backup-YYYYMMDD.db server/goodix-crm.db

Reset to sample data:

cd server
rm goodix-crm.db
npm run seed

Future Enhancements

  • Spark Mail integration (via BCC auto-logging or upcoming CRM API)
  • PDF report generation for management
  • Email notifications for overdue tasks
  • Multi-user support with login
  • Activity log / audit trail per deal

License

Internal use — Goodix Technology North America

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors