Commit 7c3355

2025-10-15 09:40:03 Rushikesh Jagdale: LLD updated
Projects/SkillShift/LLD.md ..
@@ 3,7 3,6 @@
## 1. Project Layout
The project follows a **modular and layered architecture** designed for scalability, maintainability, and separation of concerns.
-
The **backend** is implemented using **FastAPI**, with distinct folders for models, schemas, services, routes, utilities, and background workers.
Each layer has a clear responsibility:
@@ 113,7 112,7 @@
---
- ## πŸ’¬ Messages
+ ### πŸ’¬ Messages
```sql
CREATE EXTENSION IF NOT EXISTS vector;
@@ 134,7 133,7 @@
---
- ## 🏷️ Tags
+ ### 🏷️ Tags
```sql
CREATE TABLE tags (
@@ 151,7 150,7 @@
---
- ## πŸ”— Employee–Tag Relationship
+ ### πŸ”— Employee–Tag Relationship
```sql
CREATE TABLE employee_tag (
@@ 169,7 168,7 @@
---
- ## 🌐 Data Sources
+ ### 🌐 Data Sources
```sql
CREATE TABLE data_sources (
@@ 267,12 266,12 @@
{
"employee_id": 12,
"text": "Deployment completed for Project Alpha.",
- "embedding": [0.123, -0.421, 0.567, ...]
+ "embedding": [0.123, -0.421, 0.567]
},
{
"employee_id": 14,
"text": "We need to update the CI pipeline.",
- "embedding": [0.998, -0.201, 0.322, ...]
+ "embedding": [0.998, -0.201, 0.322]
}
]
}
@@ 831,18 830,18 @@
| Admin (`is_admin=true`) | Full control β€” manage employees, tags, data sources, and view all data. |
| Employee (`is_admin=false`) | Limited access β€” can view only their profile, assigned tags, and chatbot results. |
- ## Data Security
+ ### Data Security
- HTTPS for all communication.
- Database encryption at rest.
- Sanitization removes PII, links, and emojis before storing messages.
- Minimal data stored β€” only required employee metadata.
- ## Privacy & Logging
+ ### Privacy & Logging
- Employees can only access data within their assigned tags.
- Admin actions (tag assignments, data source edits) are logged.
- No raw chat data exposed to unauthorized users.
- ## Testing & Compliance
+ ### Testing & Compliance
- JWT expiry and access control verified via Pytest.
- Sanitization tested for PII removal.
- Follows privacy-by-design and principle of least privilege.
@@ 874,7 873,7 @@
# 10. Implementation Priorities (1-month)
- ## Week 1 β€” Core Backend Setup
+ ### Week 1 β€” Core Backend Setup
**Objectives:**
βœ… Define and create DB schema: `employees`, `messages`, `tags`, `employee_tag`, `data_sources`.
βœ… Set up FastAPI project structure (models, schemas, routes, services).
@@ 883,7 882,7 @@
βœ… Setup PostgreSQL + pgvector in Docker Compose.
βœ… Test all endpoints via Postman.
- ## Week 2 β€” Ingestion & AI Layer
+ ### Week 2 β€” Ingestion & AI Layer
**Objectives:**
βœ… Implement message ingestion pipeline:
- `/message/bulk_ingest` endpoint
@@ 895,7 894,7 @@
- Summarize top matches (basic LLM/OpenAI API)
βœ… Unit tests for message ingestion and chatbot logic
- ## Week 3 β€” Frontend & Integration
+ ### Week 3 β€” Frontend & Integration
**Objectives:**
βœ… Create minimal React/Next.js frontend:
- Employee Dashboard: Profile + AI Chatbot
@@ 905,7 904,7 @@
βœ… Add health checks, structured logging, and final testing.
βœ… Prepare MVP demo.
- ## Week 4 β€” Testing, Fixes & Demo
+ ### Week 4 β€” Testing, Fixes & Demo
**Objectives:**
βœ… Conduct end-to-end system testing (API + UI + AI flow).
βœ… Fix API bugs, UI alignment, and edge cases.
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9