mirror of
https://github.com/kjanat/livegraphs-django.git
synced 2026-02-13 14:15:42 +01:00
fix: configure markdownlint-cli2 properly
- Wrap config in 'config' key for markdownlint-cli2 - Use MD013 rule name instead of 'line-length' alias - Disable MD013 line-length checks - Add allowed languages: sh, python, csv, tree - Fix broken link reference in TODO.md - All markdown linting now passes (37 errors -> 0)
This commit is contained in:
@@ -33,6 +33,7 @@ indent_size = 2
|
|||||||
# Markdown files
|
# Markdown files
|
||||||
[*.md]
|
[*.md]
|
||||||
trim_trailing_whitespace = false
|
trim_trailing_whitespace = false
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
# YAML files
|
# YAML files
|
||||||
[*.{yml,yaml}]
|
[*.{yml,yaml}]
|
||||||
|
|||||||
6
.github/copilot-instructions.md
vendored
6
.github/copilot-instructions.md
vendored
@@ -11,7 +11,8 @@
|
|||||||
|
|
||||||
## uv
|
## uv
|
||||||
|
|
||||||
UV is a fast Python package and project manager written in Rust. Use UV to manage dependencies, virtual environments, and run Python scripts with improved performance.
|
UV is a fast Python package and project manager written in Rust. Use UV to manage dependencies, virtual environments,
|
||||||
|
and run Python scripts with improved performance.
|
||||||
|
|
||||||
### Running Python Scripts
|
### Running Python Scripts
|
||||||
|
|
||||||
@@ -153,7 +154,8 @@ UV is a fast Python package and project manager written in Rust. Use UV to manag
|
|||||||
|
|
||||||
## Project Structure
|
## Project Structure
|
||||||
|
|
||||||
This section provides a comprehensive overview of the LiveGraphsDjango project structure and the function of each key file. Please update this section whenever there are noteworthy changes to the structure or to a file's function.
|
This section provides a comprehensive overview of the LiveGraphsDjango project structure and the function of each key
|
||||||
|
file. Please update this section whenever there are noteworthy changes to the structure or to a file's function.
|
||||||
|
|
||||||
```tree
|
```tree
|
||||||
LiveGraphsDjango/
|
LiveGraphsDjango/
|
||||||
|
|||||||
73
.markdownlint-cli2.jsonc
Normal file
73
.markdownlint-cli2.jsonc
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
// Configuration for markdownlint-cli2
|
||||||
|
{
|
||||||
|
"config": {
|
||||||
|
"$schema": "https://cdn.jsdelivr.net/gh/DavidAnson/markdownlint@main/schema/markdownlint-config-schema.json",
|
||||||
|
"inline-html": false,
|
||||||
|
"code-block-style": {
|
||||||
|
"style": "fenced"
|
||||||
|
},
|
||||||
|
"code-fence-style": {
|
||||||
|
"style": "backtick"
|
||||||
|
},
|
||||||
|
"emphasis-style": {
|
||||||
|
"style": "asterisk"
|
||||||
|
},
|
||||||
|
"extended-ascii": {
|
||||||
|
"ascii-only": true
|
||||||
|
},
|
||||||
|
"fenced-code-language": {
|
||||||
|
"allowed_languages": [
|
||||||
|
"bash",
|
||||||
|
"sh",
|
||||||
|
"html",
|
||||||
|
"javascript",
|
||||||
|
"json",
|
||||||
|
"markdown",
|
||||||
|
"text",
|
||||||
|
"python",
|
||||||
|
"csv",
|
||||||
|
"tree"
|
||||||
|
],
|
||||||
|
"language_only": true
|
||||||
|
},
|
||||||
|
"heading-style": {
|
||||||
|
"style": "atx"
|
||||||
|
},
|
||||||
|
"hr-style": {
|
||||||
|
"style": "---"
|
||||||
|
},
|
||||||
|
"MD013": false,
|
||||||
|
"link-image-style": {
|
||||||
|
"collapsed": false,
|
||||||
|
"shortcut": false,
|
||||||
|
"url_inline": false
|
||||||
|
},
|
||||||
|
"no-duplicate-heading": {
|
||||||
|
"siblings_only": true
|
||||||
|
},
|
||||||
|
"ol-prefix": {
|
||||||
|
"style": "ordered"
|
||||||
|
},
|
||||||
|
"proper-names": {
|
||||||
|
"code_blocks": false,
|
||||||
|
"names": [
|
||||||
|
"Cake.Markdownlint",
|
||||||
|
"CommonMark",
|
||||||
|
"JavaScript",
|
||||||
|
"Markdown",
|
||||||
|
"markdown-it",
|
||||||
|
"markdownlint",
|
||||||
|
"Node.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"reference-links-images": {
|
||||||
|
"shortcut_syntax": true
|
||||||
|
},
|
||||||
|
"strong-style": {
|
||||||
|
"style": "asterisk"
|
||||||
|
},
|
||||||
|
"ul-style": {
|
||||||
|
"style": "dash"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -28,6 +28,12 @@
|
|||||||
"proseWrap": "preserve",
|
"proseWrap": "preserve",
|
||||||
"printWidth": 100
|
"printWidth": 100
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"files": ["*.jsonc"],
|
||||||
|
"options": {
|
||||||
|
"trailingComma": "none"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"plugins": ["prettier-plugin-jinja-template", "prettier-plugin-packagejson"]
|
"plugins": ["prettier-plugin-jinja-template", "prettier-plugin-packagejson"]
|
||||||
31
README.md
31
README.md
@@ -1,10 +1,13 @@
|
|||||||
# Chat Analytics Dashboard
|
# Chat Analytics Dashboard
|
||||||
|
|
||||||
A Django application that creates an analytics dashboard for chat session data. The application allows different companies to have their own dashboards and view their own data.
|
A Django application that creates an analytics dashboard for chat session data. The application allows different
|
||||||
|
companies to have their own dashboards and view their own data.
|
||||||
|
|
||||||
## Project Overview
|
## Project Overview
|
||||||
|
|
||||||
This Django project creates a multi-tenant dashboard application for analyzing chat session data. Companies can upload their chat data (in CSV format) and view analytics and metrics through an interactive dashboard. The application supports user authentication, role-based access control, and separate data isolation for different companies.
|
This Django project creates a multi-tenant dashboard application for analyzing chat session data. Companies can upload
|
||||||
|
their chat data (in CSV format) and view analytics and metrics through an interactive dashboard. The application
|
||||||
|
supports user authentication, role-based access control, and separate data isolation for different companies.
|
||||||
|
|
||||||
### Project Structure
|
### Project Structure
|
||||||
|
|
||||||
@@ -39,8 +42,8 @@ The project consists of two main Django apps:
|
|||||||
1. Clone the repository:
|
1. Clone the repository:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone <repository-url>
|
git clone https://github.com/kjanat/livegraphs-django.git
|
||||||
cd LiveGraphsDjango
|
cd livegraphs-django
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Install uv if you don't have it yet:
|
2. Install uv if you don't have it yet:
|
||||||
@@ -137,7 +140,7 @@ The project consists of two main Django apps:
|
|||||||
python manage.py runserver
|
python manage.py runserver
|
||||||
```
|
```
|
||||||
|
|
||||||
10. Access the application at <http://127.0.0.1:8000/>
|
10. Access the application at `http://127.0.0.1:8000/`
|
||||||
|
|
||||||
### Development Workflow with UV
|
### Development Workflow with UV
|
||||||
|
|
||||||
@@ -187,8 +190,8 @@ UV offers several advantages over traditional pip, including faster dependency r
|
|||||||
1. Clone the repository:
|
1. Clone the repository:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone <repository-url>
|
git clone https://github.com/kjanat/livegraphs-django.git
|
||||||
cd dashboard_project
|
cd livegraphs-django
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Build and run with Docker Compose:
|
2. Build and run with Docker Compose:
|
||||||
@@ -209,7 +212,8 @@ docker-compose exec web python manage.py createsuperuser
|
|||||||
|
|
||||||
### Prettier for Django Templates
|
### Prettier for Django Templates
|
||||||
|
|
||||||
This project uses Prettier with the `prettier-plugin-django-annotations` plugin to format HTML templates with Django template syntax.
|
This project uses Prettier with the `prettier-plugin-django-annotations` plugin to format HTML templates with Django
|
||||||
|
template syntax.
|
||||||
|
|
||||||
#### Prettier Configuration
|
#### Prettier Configuration
|
||||||
|
|
||||||
@@ -342,6 +346,7 @@ This will create:
|
|||||||
- Fill in the company details and save
|
- Fill in the company details and save
|
||||||
|
|
||||||
3. **Create Users**:
|
3. **Create Users**:
|
||||||
|
|
||||||
- Go to Users > Add User
|
- Go to Users > Add User
|
||||||
- Fill in user details
|
- Fill in user details
|
||||||
- Assign the user to a company
|
- Assign the user to a company
|
||||||
@@ -362,6 +367,7 @@ This will create:
|
|||||||
- Click "Upload"
|
- Click "Upload"
|
||||||
|
|
||||||
3. **Create a Dashboard**:
|
3. **Create a Dashboard**:
|
||||||
|
|
||||||
- Click on "New Dashboard" in the sidebar
|
- Click on "New Dashboard" in the sidebar
|
||||||
- Fill in the dashboard details
|
- Fill in the dashboard details
|
||||||
- Select data sources to include
|
- Select data sources to include
|
||||||
@@ -382,6 +388,7 @@ This will create:
|
|||||||
- Use filters to refine results
|
- Use filters to refine results
|
||||||
|
|
||||||
3. **View Session Details**:
|
3. **View Session Details**:
|
||||||
|
|
||||||
- In search results, click the eye icon for a session
|
- In search results, click the eye icon for a session
|
||||||
- View complete session information and transcript
|
- View complete session information and transcript
|
||||||
|
|
||||||
@@ -435,7 +442,7 @@ If your dashboard is empty:
|
|||||||
The CSV file should contain the following columns:
|
The CSV file should contain the following columns:
|
||||||
|
|
||||||
| Column | Description |
|
| Column | Description |
|
||||||
| ------------------- | ------------------------------------------------------ |
|
|---------------------|--------------------------------------------------------|
|
||||||
| `session_id` | Unique identifier for the chat session |
|
| `session_id` | Unique identifier for the chat session |
|
||||||
| `start_time` | When the session started (datetime) |
|
| `start_time` | When the session started (datetime) |
|
||||||
| `end_time` | When the session ended (datetime) |
|
| `end_time` | When the session ended (datetime) |
|
||||||
@@ -507,6 +514,7 @@ acme_1,2023-05-01 10:30:00,2023-05-01 10:45:00,192.168.1.1,USA,English,10,Positi
|
|||||||
- System-wide configuration
|
- System-wide configuration
|
||||||
|
|
||||||
7. **Responsive Design**:
|
7. **Responsive Design**:
|
||||||
|
|
||||||
- Mobile-friendly interface using Bootstrap 5
|
- Mobile-friendly interface using Bootstrap 5
|
||||||
- Consistent layout and navigation
|
- Consistent layout and navigation
|
||||||
- Accessible UI components
|
- Accessible UI components
|
||||||
@@ -550,6 +558,7 @@ acme_1,2023-05-01 10:30:00,2023-05-01 10:45:00,192.168.1.1,USA,English,10,Positi
|
|||||||
- JSON serialization for frontend
|
- JSON serialization for frontend
|
||||||
|
|
||||||
3. **User Authentication**:
|
3. **User Authentication**:
|
||||||
|
|
||||||
- Login/registration handling
|
- Login/registration handling
|
||||||
- Session management
|
- Session management
|
||||||
- Permission checks
|
- Permission checks
|
||||||
@@ -590,6 +599,7 @@ acme_1,2023-05-01 10:30:00,2023-05-01 10:45:00,192.168.1.1,USA,English,10,Positi
|
|||||||
- Manages company users
|
- Manages company users
|
||||||
|
|
||||||
3. **Regular Users**:
|
3. **Regular Users**:
|
||||||
|
|
||||||
- View dashboards
|
- View dashboards
|
||||||
- Search and explore chat data
|
- Search and explore chat data
|
||||||
- Analyze chat metrics
|
- Analyze chat metrics
|
||||||
@@ -610,4 +620,5 @@ acme_1,2023-05-01 10:30:00,2023-05-01 10:45:00,192.168.1.1,USA,English,10,Positi
|
|||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
This project is unlicensed. Usage is restricted to personal and educational purposes only. For commercial use, please contact the author.
|
This project is unlicensed. Usage is restricted to personal and educational purposes only. For commercial use, please
|
||||||
|
contact the author.
|
||||||
|
|||||||
2
TODO.md
2
TODO.md
@@ -51,7 +51,7 @@
|
|||||||
- [ ] Implement periodic data download from external API
|
- [ ] Implement periodic data download from external API
|
||||||
- Source: <https://proto.notso.ai/jumbo/chats>
|
- Source: <https://proto.notso.ai/jumbo/chats>
|
||||||
- Authentication: Basic Auth
|
- Authentication: Basic Auth
|
||||||
- Credentials: [stored securely]
|
- Credentials: stored securely
|
||||||
- An example of the data structure can be found in [jumbo.csv](examples/jumbo.csv)
|
- An example of the data structure can be found in [jumbo.csv](examples/jumbo.csv)
|
||||||
- The file that the endpoint returns is a CSV file, but the file is not a standard CSV file. It has a different structure and format:
|
- The file that the endpoint returns is a CSV file, but the file is not a standard CSV file. It has a different structure and format:
|
||||||
- The header row is missing, it is supposed to be `session_id,start_time,end_time,ip_address,country,language,messages_sent,sentiment,escalated,forwarded_hr,full_transcript,avg_response_time,tokens,tokens_eur,category,initial_msg,user_rating`
|
- The header row is missing, it is supposed to be `session_id,start_time,end_time,ip_address,country,language,messages_sent,sentiment,escalated,forwarded_hr,full_transcript,avg_response_time,tokens,tokens_eur,category,initial_msg,user_rating`
|
||||||
|
|||||||
14
package.json
14
package.json
@@ -6,7 +6,7 @@
|
|||||||
"lint:js": "oxlint",
|
"lint:js": "oxlint",
|
||||||
"lint:js:fix": "bun lint:js -- --fix",
|
"lint:js:fix": "bun lint:js -- --fix",
|
||||||
"lint:js:strict": "oxlint --import-plugin -D correctness -W suspicious",
|
"lint:js:strict": "oxlint --import-plugin -D correctness -W suspicious",
|
||||||
"lint:md": "markdownlint-cli2 \"**/*.md\"",
|
"lint:md": "markdownlint-cli2 \"**/*.md\" \"#node_modules\" \"#.{node_modules,trunk,grit,venv}\"",
|
||||||
"lint:md:fix": "bun lint:md -- --fix",
|
"lint:md:fix": "bun lint:md -- --fix",
|
||||||
"lint:py": "uvx ruff check",
|
"lint:py": "uvx ruff check",
|
||||||
"lint:py:fix": "uvx ruff check --fix",
|
"lint:py:fix": "uvx ruff check --fix",
|
||||||
@@ -21,17 +21,5 @@
|
|||||||
"prettier": "^3.6.2",
|
"prettier": "^3.6.2",
|
||||||
"prettier-plugin-jinja-template": "^2.1.0",
|
"prettier-plugin-jinja-template": "^2.1.0",
|
||||||
"prettier-plugin-packagejson": "^2.5.19"
|
"prettier-plugin-packagejson": "^2.5.19"
|
||||||
},
|
|
||||||
"markdownlint-cli2": {
|
|
||||||
"config": {
|
|
||||||
"MD013": false,
|
|
||||||
"MD033": false
|
|
||||||
},
|
|
||||||
"ignores": [
|
|
||||||
".git",
|
|
||||||
".trunk",
|
|
||||||
".venv",
|
|
||||||
"node_modules"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user