Skip to content

Commit 9c74b31

Browse files
Project Cleanup & Folder Documentation
File Organization: - Deleted old HTML files from root (moved to public/html/) - landing.html (now in public/html/) - mobile.html (now in public/html/) - widget-standalone.html (now in public/html/) - Cleaner root directory with only essential bat files Folder Documentation: - Added README.md to 9 key folders: - src/ (Python backend code) - scripts/ (utility scripts and setup tools) - public/ (static frontend files) - deployment/ (deployment guides) - frontend-widget/ (React widget) - data/ (uploaded documents) - feedback/ (user feedback storage) - logs/ (system logs and crashes) - config/ (configuration files) - Each README explains folder purpose and contents - Clear guidance for developers and users Private Documentation: - Created comprehensive technical journal (500+ hours documented) - Added to .gitignore (not uploaded to GitHub) - Architecture decisions, challenges, learnings preserved - Development timeline and optimization journey documented Professional Structure: - Enterprise-grade folder organization - Clear separation of concerns - Easy onboarding for new developers - Deployment-ready structure
1 parent a3c72f3 commit 9c74b31

13 files changed

Lines changed: 344 additions & 2841 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ Thumbs.db
6868
*.bak
6969
README_backup.md
7070

71+
# Private documentation (not for public repo)
72+
PRIVATE_TECHNICAL_DOCUMENTATION.md
73+
7174
# Large model files (if any)
7275
*.bin
7376
*.onnx

config/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Configuration Directory
2+
3+
## Purpose
4+
Configuration files for PCBot settings and paths.
5+
6+
## Contents
7+
8+
### `manual_path.txt`
9+
Contains the file path to the Manual for Development Projects 2024 PDF.
10+
11+
This file is used by the RAG pipeline to locate and process the manual document.
12+
13+
## Usage
14+
15+
If you move the manual PDF to a different location:
16+
1. Open `manual_path.txt`
17+
2. Update the path to the new location
18+
3. Restart the application
19+
20+
Example:
21+
```
22+
D:\PLANNING WORK\Manual-for-Development-Projects-2024.pdf
23+
```
24+
25+
## Notes
26+
- Path should be absolute (full path from drive letter)
27+
- Use forward slashes `/` or escaped backslashes `\\`
28+
- File must exist and be accessible
29+
- PDF must be the official Manual for Development Projects 2024

data/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Data Directory
2+
3+
## Purpose
4+
Storage for uploaded documents and data files used by PCBot.
5+
6+
## Directory Structure
7+
8+
### `uploads/`
9+
Temporary storage for uploaded PDF files during processing.
10+
- Files are processed and converted to vector embeddings
11+
- Stored temporarily before being added to Qdrant database
12+
13+
## Usage
14+
15+
Files uploaded via the web interface are temporarily stored here before being:
16+
1. Parsed and chunked
17+
2. Embedded using sentence-transformers
18+
3. Stored in Qdrant vector database
19+
4. Made available for RAG retrieval
20+
21+
## Notes
22+
- This directory may be empty if no files are currently being processed
23+
- Uploaded files are not persisted after vector embedding
24+
- The main knowledge base (Manual for Development Projects 2024) is embedded in Qdrant

deployment/README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Deployment Documentation
2+
3+
## Purpose
4+
Comprehensive guides for deploying PCBot to various platforms.
5+
6+
## Available Guides
7+
8+
### `GITHUB_PAGES.md`
9+
Complete guide for deploying frontend to GitHub Pages
10+
- Auto-deployment via GitHub Actions
11+
- Custom domain setup
12+
- Backend deployment options (Railway, Render)
13+
- CORS configuration
14+
- Troubleshooting
15+
16+
### `NETLIFY.md`
17+
Netlify deployment guide
18+
- GitHub integration
19+
- CLI deployment
20+
- Drag-and-drop deployment
21+
- Security headers configuration
22+
- Environment variables
23+
24+
## Quick Links
25+
26+
**Frontend Deployment:**
27+
- GitHub Pages (recommended for free static hosting)
28+
- Netlify (alternative with advanced features)
29+
30+
**Backend Deployment:**
31+
- Railway: https://railway.app/ (free tier)
32+
- Render: https://render.com/ (free tier)
33+
- Office server (self-hosted)
34+
35+
## Deployment Strategy
36+
37+
### Static Frontend
38+
Deploy `public/` folder to GitHub Pages or Netlify
39+
40+
### Backend API
41+
Deploy Flask app to Railway, Render, or dedicated server
42+
43+
### Services Required
44+
- Qdrant vector database
45+
- Ollama LLM server (or Groq API)
46+
- Python virtual environment
47+
48+
See individual guides for detailed instructions.

feedback/README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Feedback Directory
2+
3+
## Purpose
4+
Stores user feedback submissions organized by rating.
5+
6+
## Directory Structure
7+
8+
### `1_star/` - Poor Experience
9+
Feedback from users who rated their experience 1 star.
10+
11+
### `2_star/` - Below Average
12+
Feedback from users who rated their experience 2 stars.
13+
14+
### `3_star/` - Average
15+
Feedback from users who rated their experience 3 stars.
16+
17+
### `4_star/` - Good Experience (if exists)
18+
Feedback from users who rated their experience 4 stars.
19+
20+
### `5_star/` - Excellent Experience (if exists)
21+
Feedback from users who rated their experience 5 stars.
22+
23+
## File Format
24+
25+
Each feedback file is named:
26+
```
27+
YYYYMMDD_HHMMSS_Username.txt
28+
```
29+
30+
Example: `20251031_113636_Guest.txt`
31+
32+
## Usage
33+
34+
Feedback is automatically collected when users:
35+
1. Submit a rating in the widget interface
36+
2. Provide optional comments
37+
3. Click submit
38+
39+
Files are created automatically by the Flask backend (`widget_api.py`).
40+
41+
## Analysis
42+
43+
Review feedback files to:
44+
- Identify pain points and issues
45+
- Track user satisfaction trends
46+
- Improve accuracy and user experience
47+
- Validate system performance

frontend-widget/README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Frontend Widget
2+
3+
## Purpose
4+
React-based chatbot widget built with TypeScript and Tailwind CSS.
5+
6+
## Directory Structure
7+
- **`src/`**: React source code
8+
- **`dist/`**: Built widget files (production)
9+
- **`public/`**: Public assets
10+
- **`node_modules/`**: Dependencies (gitignored)
11+
12+
## Development
13+
14+
### Setup
15+
```bash
16+
npm install
17+
```
18+
19+
### Build Widget
20+
```bash
21+
npm run build
22+
# Or use: build-widget.bat
23+
```
24+
25+
### Development Mode
26+
```bash
27+
npm run dev
28+
# Or use: run-widget.bat
29+
```
30+
31+
## Build Output
32+
33+
The widget is built as:
34+
- **`dist/pdbot-widget.iife.js`**: JavaScript bundle
35+
- **`dist/pdbot-widget.css`**: Styles
36+
37+
These files are loaded by `public/html/widget-dev.html` for development testing.
38+
39+
## Features
40+
- TypeScript for type safety
41+
- Tailwind CSS for styling
42+
- Vite for fast builds
43+
- IIFE format for easy embedding
44+
- Standalone deployment support
45+
46+
## Integration
47+
48+
### In HTML
49+
```html
50+
<link rel="stylesheet" href="/dist/pdbot-widget.css">
51+
<script src="/dist/pdbot-widget.iife.js"></script>
52+
```
53+
54+
### Standalone
55+
Use `public/html/widget-standalone.html` which includes all widget code inline.

0 commit comments

Comments
 (0)