crm_customer/README.md

140 lines
3.6 KiB
Markdown

# CRM Setup :
Here we have `two` modules .
- CRM Internal Module (For bank's internal team)
- CRM Customer Module (For bank's customer)
## 1. CRM Internal Module (Ticket Management System)
Here we are using "mantisBT" (open source application) for ticket management system .
### Requirement :
- Postgres server
- XAMPP 8.2.12 / Apache server
- PHP 8.2.12
### Installation & deploy :
- Create a folder into `htdocs` present under apache server.
`e.g. folder path : C:\xampp\htdocs`
`e.g. new folder : crm_internal`
- Take the CRM Internet Module (MantisBT codebase) and paste it into the folder. `e.g. crm_internal`.
- Open the folder into visual studio code .
- Change the config_inc.php as per requirement. (Present in config folder)
```
//Sample
$g_hostname = 'localhost';
$g_db_type = 'pgsql';
$g_database_name = 'kccb_ticket_tracker';
$g_db_username =
$g_db_password =
$g_db_table_prefix = 'kccb';
$g_db_table_suffix = '';
$g_default_timezone = 'Asia/Kolkata';
$g_crypto_master_salt = 'Abcdefghigklmnopqrst';
$g_path = 'http://localhost/crm_internal/'; //crm_internal is the folder name
```
- For first time installation remove the "$g_crypto_master_salt " and keep it null.
```
$g_crypto_master_salt = ""
```
- For install all the dependency and database run the below query
```
Install url :
http://localhost/crm_internal/admin/install.php
```
- After successfully install ,Login in to CRM-Internal
```
Login :
http://localhost/crm_internal/login_page.php
```
- Login Credential
- For first time user
- Username : Administrator
- password : root
### Setup:
- Go to database `kccb_ticket_tracker` and search for a table `kccb_config`.
- Import `csv\kccb_config.csv` (Present in the CRM internal module) file to the `kccb_config` table.
- Then login as `Administrator` .
- Create new project
```
Project Name :KCCB
Description : The kangra Central Co Operative Bank
Note: Keep other filed as default
```
- Create a new user "kccb".
- Log in to this user `kccb`.
- Go to `My account` (Top right corner) .
- Then create a `API token`.
- Copy the API token.
- And paste the token in `.env.local` file of `CRM Customer Module` in place of `MantisBT_Token`.
> Note : For setup CRM internal module ,We need to create one user `kccb` and create the token for the user. That token will be used in CRM external module .
- Create Backend team as per requirement and enable protected option.
## 2. CRM Customer Module (For External Use)
### Files
`env.local`
Create a `env.local` file in the root of folder of this project.
Content of the `env.local` must be as follows:
```
SESSION_COOKIE_NAME=crm_auth
SESSION_COOKIE_PASSWORD=abcdefghijklmnopqrstuvwxyz01234567890
DB_HOST=localhost
DB_PORT=5432
DB_NAME=crm
DB_USER_NAME=
DB_USER_PASS=
#Mantis
MantisBT_Token=
#CBS
ONLINE_CBS_IP=
ONLINE_CBS_PORT=
#MESSAGE
WEBSERVER_IP=
WEBSERVER_PORT=
```
### Requirement :
- Node JS (Latest)
- PostgreSQL (Latest)
### Deploy :
- Install all node module
```
npm install
```
- In the PostgreSQL create one database, the database name will be "crm"
- Build the application
```
npm run build
```
- Start the application
```
npm run start
```
- Open the following URL in the web browser for populate some data
```
http://localhost:3000/api/dev/populate
```
### Application Url :
```
http://localhost:3000/login
```