vault backup: 2026-05-19 13:09:59
This commit is contained in:
parent
1ddaf8ec8c
commit
ba01ff04e0
10 changed files with 327 additions and 8 deletions
|
|
@ -173,4 +173,10 @@ pytest --cov=rag_test_app
|
|||
|
||||
# Specific test file
|
||||
pytest tests/test_main.py
|
||||
```
|
||||
```
|
||||
|
||||
## Related
|
||||
|
||||
- [[01 Projects/barclays-rag-report/USER_MANUAL]]
|
||||
- [[01 Projects/barclays-rag-report/DEVELOPER_MANUAL.md]]
|
||||
- [[01 Projects/barclays-rag-report/USER_MANUAL.md]]
|
||||
|
|
@ -6,8 +6,11 @@ modified: 2026-05-19
|
|||
name: User_Manual
|
||||
status: active
|
||||
tags:
|
||||
- client/barclays
|
||||
- domain/ai
|
||||
- status/active
|
||||
- tech/gemini
|
||||
- tech/openai
|
||||
- tech/python
|
||||
- tech/rag
|
||||
- type/reference
|
||||
|
|
@ -125,4 +128,6 @@ A: Use the `--parallel` flag or set `parallel` in config.
|
|||
A: In a timestamped directory within the output_dir (default: `results/`)
|
||||
|
||||
## Related
|
||||
- [[01 Projects/barclays-rag-report/DEVELOPER_MANUAL.md]]
|
||||
- [[01 Projects/barclays-rag-report/DEVELOPER_MANUAL]]
|
||||
- [[01 Projects/barclays-rag-report/DEVELOPER_MANUAL.md]]
|
||||
- [[01 Projects/barclays-rag-report/USER_MANUAL.md]]
|
||||
185
01 Projects/loreal-global-kickoff/DEVELOPER_MANUAL.md
Normal file
185
01 Projects/loreal-global-kickoff/DEVELOPER_MANUAL.md
Normal file
|
|
@ -0,0 +1,185 @@
|
|||
---
|
||||
auto_generated: true
|
||||
manual_updated_at: 2026-05-19
|
||||
modified: 2026-05-19
|
||||
---
|
||||
|
||||
# L'Oréal OMG Assistant Global - Developer Manual
|
||||
|
||||
## Architecture Overview
|
||||
|
||||
The application is a PHP-based web interface interacting with external APIs (Box, Make.com, OMG, Mailgun) and local storage for logs. It uses a multi-page or SPA-like structure driven by JavaScript for asynchronous operations.
|
||||
|
||||
- **Backend**: PHP (implied by `validate-box.php` and standard web practices).
|
||||
- **Frontend**: Vanilla JavaScript (`js/app.js`, `js/global-to-local.js`) and HTML/CSS.
|
||||
- **Authentication**: Azure AD SSO (handled at the infrastructure/Nginx/PHP level).
|
||||
- **Storage**: Local JSON file for activity logs; Temporary storage for uploaded CSVs and generated ZIPs.
|
||||
|
||||
## Tech Stack
|
||||
|
||||
- **Language**: PHP (Server-side logic), JavaScript (Client-side interactivity).
|
||||
- **APIs**:
|
||||
- Box API (Folder validation, metadata extraction).
|
||||
- Make.com Webhooks (Data submission).
|
||||
- OMG API (Business unit lookup).
|
||||
- Mailgun (Email notifications).
|
||||
- **Frontend**: DOM manipulation, Fetch API, Drag & Drop API.
|
||||
|
||||
## Local Setup
|
||||
|
||||
1. **Prerequisites**:
|
||||
- PHP 7.4+ or PHP 8.x with `curl`, `json`, and `zip` extensions enabled.
|
||||
- Web Server (Apache/Nginx) with PHP module.
|
||||
- Microsoft Azure AD Tenant with Registered App (for SSO).
|
||||
- Box Developer Account (for API keys).
|
||||
- Make.com Account (for webhook URLs).
|
||||
- Mailgun Account (for SMTP/API keys).
|
||||
|
||||
2. **Clone and Configure**:
|
||||
```bash
|
||||
git clone <repository-url>
|
||||
cd loreal-omg-assistant
|
||||
composer install # If dependencies are managed via Composer
|
||||
```
|
||||
|
||||
3. **Environment Variables**:
|
||||
Create a `.env` file in the root directory:
|
||||
```env
|
||||
# Azure AD
|
||||
AZURE_CLIENT_ID=your_client_id
|
||||
AZURE_CLIENT_SECRET=your_client_secret
|
||||
AZURE_TENANT_ID=your_tenant_id
|
||||
|
||||
# Box
|
||||
BOX_CLIENT_ID=your_box_client_id
|
||||
BOX_CLIENT_SECRET=your_box_client_secret
|
||||
BOX_ENTERPRISE_ID=your_enterprise_id
|
||||
|
||||
# Make.com
|
||||
MAKE_WEBHOOK_URL=https://hook.make.com/your_endpoint
|
||||
|
||||
# OMG API
|
||||
OMG_API_ENDPOINT=https://api.example.com/omg
|
||||
OMG_API_KEY=your_omg_key
|
||||
|
||||
# Mailgun
|
||||
MAILGUN_DOMAIN=your_domain
|
||||
MAILGUN_API_KEY=your_mailgun_key
|
||||
|
||||
# Application
|
||||
LOG_FILE_PATH=/path/to/logs/activity.json
|
||||
DEBUG_MODE=true/false
|
||||
```
|
||||
|
||||
4. **Permissions**:
|
||||
- Ensure the web server user has write access to the `logs/` directory for JSON log files.
|
||||
- Ensure the upload directory is writable for CSV processing.
|
||||
|
||||
## Key Services & Entry Points
|
||||
|
||||
### 1. Box Asset Submission (`js/app.js`)
|
||||
- **Entry Point**: `handleLookupClick()`
|
||||
- **Flow**:
|
||||
1. User enters Box ID.
|
||||
2. `validate-box.php` is called via `fetch`.
|
||||
3. Backend validates folder structure (`SUPPLIED_ASSETS` exists).
|
||||
4. Returns metadata (Campaign Number, Folder Tree).
|
||||
5. Frontend renders preview and enables submit.
|
||||
- **Submission**: Form submit triggers webhook to Make.com.
|
||||
|
||||
### 2. CSV Transformation (`js/global-to-local.js`)
|
||||
- **Entry Point**: `handleFormSubmit()`
|
||||
- **Flow**:
|
||||
1. File uploaded via Drag/Drop or Input.
|
||||
2. `fetch` to backend processing endpoint.
|
||||
3. Backend parses CSV, validates schema, runs 6-stage process:
|
||||
- Stage 1: File Validation
|
||||
- Stage 2: Date Parsing (+1 Month)
|
||||
- Stage 3: OMG API Lookup (Business Unit)
|
||||
- Stage 4: Regional Formatting
|
||||
- Stage 5: CSV Generation (16 ISO codes)
|
||||
- Stage 6: Zip Creation
|
||||
4. Response includes file URLs for preview/download.
|
||||
|
||||
### 3. Activity Logging
|
||||
- **Service**: Centralized logger class/function.
|
||||
- **Data Stored**: Timestamp, User (Azure AD ID), IP, User Agent, Action Type, Status, Input Data (sanitized).
|
||||
- **Storage**: JSON file. Append-only mode recommended for performance.
|
||||
|
||||
## API Reference
|
||||
|
||||
### Backend Endpoints (Implied)
|
||||
|
||||
#### POST `/validate-box.php`
|
||||
- **Purpose**: Validate Box Folder ID and extract metadata.
|
||||
- **Input**: `{ "boxId": "string" }`
|
||||
- **Output**:
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"data": {
|
||||
"folderName": "string",
|
||||
"campaignNumber": "string",
|
||||
"structure": "array",
|
||||
"isValid": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### POST `/process-csv.php` (Implied)
|
||||
- **Purpose**: Handle CSV upload and transformation.
|
||||
- **Input**: Multipart form data (CSV File).
|
||||
- **Output**:
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"files": [
|
||||
{ "code": "en-GB", "url": "/tmp/en-GB.csv" },
|
||||
{ "code": "es-ES", "url": "/tmp/es-ES.csv" }
|
||||
],
|
||||
"zipUrl": "/tmp/all_markets.zip"
|
||||
}
|
||||
```
|
||||
|
||||
#### GET `/logs.php`
|
||||
- **Purpose**: Retrieve activity logs.
|
||||
- **Parameters**: `?filter=action&value=submit&start=2023-01-01&end=2023-12-31`
|
||||
- **Output**: JSON array of log entries.
|
||||
|
||||
## Deployment
|
||||
|
||||
1. **Server Requirements**:
|
||||
- Linux/Windows Server with PHP 8+
|
||||
- HTTPS enabled (required for Azure AD SSO and secure API calls).
|
||||
- Cron job for log rotation (optional but recommended).
|
||||
|
||||
2. **Steps**:
|
||||
- Deploy codebase to web root.
|
||||
- Set `APP_ENV=production` in `.env`.
|
||||
- Disable debug mode.
|
||||
- Configure Azure AD Redirect URIs to match the production domain.
|
||||
- Test Box API credentials in production environment.
|
||||
- Verify Mailgun webhook endpoints.
|
||||
|
||||
3. **CI/CD**:
|
||||
- Recommended to run PHP linting (`php -l`) and JavaScript validation (`eslint`) in pre-commit hooks.
|
||||
|
||||
## Known Gotchas
|
||||
|
||||
1. **Box API Rate Limits**:
|
||||
- Box API has strict rate limits. If validation fails intermittently, implement retry logic or cache valid folder metadata.
|
||||
|
||||
2. **CSV Encoding**:
|
||||
- Ensure source CSVs are UTF-8 encoded. Non-UTF-8 files will cause parsing errors in Stage 3.
|
||||
|
||||
3. **Date Timezones**:
|
||||
- The "add 1 month" logic relies on server timezone. Ensure server timezone is set to UTC or the business’s primary timezone to avoid offset errors.
|
||||
|
||||
4. **Azure AD Session**:
|
||||
- SSO tokens expire. Ensure the backend handles session renewal gracefully or redirects to login if the token is invalid.
|
||||
|
||||
5. **Large Files**:
|
||||
- PHP `max_execution_time` and `upload_max_filesize` may need tuning for large global CSVs. Adjust in `php.ini` if necessary.
|
||||
|
||||
6. **Make.com Webhooks**:
|
||||
- Make.com webhooks may have a timeout. Ensure the submission endpoint returns a 200 OK quickly and processes asynchronously if the payload is large.
|
||||
108
01 Projects/loreal-global-kickoff/USER_MANUAL.md
Normal file
108
01 Projects/loreal-global-kickoff/USER_MANUAL.md
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
---
|
||||
auto_generated: true
|
||||
manual_updated_at: 2026-05-19
|
||||
modified: 2026-05-19
|
||||
---
|
||||
|
||||
# L'Oréal OMG Assistant Global - User Manual
|
||||
|
||||
## What This Tool Does
|
||||
|
||||
L'Oréal OMG Assistant Global is a centralized web application designed to streamline campaign asset management. It serves two primary purposes:
|
||||
|
||||
1. **Master Global Asset Submission**: Automates the validation and submission of campaign assets stored in Box folders to external systems (via Make.com webhooks).
|
||||
2. **Global to Local CSV Transformation**: Converts global campaign data into region-specific CSV files for 16 different international markets, handling date formatting and file distribution.
|
||||
|
||||
Additionally, the tool provides comprehensive activity logging for auditing and reporting purposes.
|
||||
|
||||
## Who Uses It
|
||||
|
||||
- **Marketing Managers**: For validating asset folders and submitting global campaigns.
|
||||
- **Campaign Coordinators**: For transforming global data into local market CSVs.
|
||||
- **IT/Support Teams**: For monitoring system logs and troubleshooting submission errors.
|
||||
|
||||
## How to Access
|
||||
|
||||
The application is protected by **Microsoft Azure AD Single Sign-On (SSO)**.
|
||||
|
||||
1. Navigate to the application URL.
|
||||
2. You will be redirected to the Microsoft login page.
|
||||
3. Log in with your L'Oréal corporate credentials.
|
||||
4. Upon successful authentication, you will be presented with the main dashboard.
|
||||
|
||||
## Main Workflows
|
||||
|
||||
### Workflow 1: Master Global Asset Submission
|
||||
|
||||
Use this tool to submit campaign assets for review and processing.
|
||||
|
||||
**Step-by-Step Guide:**
|
||||
|
||||
1. **Navigate to Submission**: Select "Master Global Asset Submission" from the dashboard.
|
||||
2. **Enter Box ID**:
|
||||
- Locate your campaign folder in Box.
|
||||
- Copy the Box Folder ID.
|
||||
- Paste it into the "Box ID" input field.
|
||||
3. **Validate Folder**:
|
||||
- Click **Lookup** or press `Enter`.
|
||||
- The system will verify if the folder exists and contains the required `SUPPLIED_ASSETS` subfolder.
|
||||
- A success message (green checkmark) or error message will appear.
|
||||
4. **Review Details**:
|
||||
- If valid, the application automatically populates the Master Campaign Number based on the folder hierarchy.
|
||||
- Expandable nested folders (3 levels deep) allow you to preview the asset structure.
|
||||
5. **Submit**:
|
||||
- Fill in any additional required metadata fields if prompted.
|
||||
- Click **Submit**.
|
||||
- A webhook sends your data to Make.com. A success or failure notification will confirm the action.
|
||||
|
||||
### Workflow 2: Global to Local CSV Transformation
|
||||
|
||||
Use this tool to prepare regional campaign files from a single global dataset.
|
||||
|
||||
**Step-by-Step Guide:**
|
||||
|
||||
1. **Navigate to Transformation**: Select "Global to Local CSV Transformation" from the dashboard.
|
||||
2. **Upload File**:
|
||||
- Drag and drop your global campaign CSV file into the designated area, or click to browse.
|
||||
- Confirm the file name and size are displayed correctly.
|
||||
3. **Process Data**:
|
||||
- Click **Process**.
|
||||
- A visual progress tracker will show the 6 stages of processing (e.g., Parsing, Date Transformation, OMG Lookup).
|
||||
- If errors occur during processing, detailed error messages will guide you on how to fix the source file.
|
||||
4. **Preview Results**:
|
||||
- Once processing completes, use the dropdown selector to view any of the 16 generated CSV files (en-GB, es-ES, pt-PT, etc.).
|
||||
- Review the content to ensure correct date formatting (DD/MM/YYYY) and regional data.
|
||||
5. **Download**:
|
||||
- Click **Download Individual** to save a specific market file.
|
||||
- Click **Download All** to receive a ZIP archive containing all 16 regional CSVs.
|
||||
6. **Optional Upload to Box**:
|
||||
- If your workflow requires immediate cloud storage, click **Upload to Box** after downloading.
|
||||
|
||||
### Workflow 3: Activity Logs & Reporting
|
||||
|
||||
Use this tool to audit past actions and system usage.
|
||||
|
||||
1. **Navigate to Logs**: Select "Activity Logs" from the dashboard.
|
||||
2. **View Dashboard**: See statistics on total actions, success rates, and unique users.
|
||||
3. **Filter Data**: Use the filters to search by:
|
||||
- Action Type (e.g., Submission, CSV Transform)
|
||||
- User Name
|
||||
- Time Period
|
||||
4. **Export**: Click **Export to CSV** to download the filtered log data for external analysis or compliance reporting.
|
||||
|
||||
## FAQ
|
||||
|
||||
**Q: I received an "Invalid Box ID" error. What should I do?**
|
||||
A: Ensure the ID corresponds to a Folder (not a file) and that it has a direct subfolder named exactly `SUPPLIED_ASSETS`. Check that you have permission to access the folder in Box.
|
||||
|
||||
**Q: The CSV transformation failed at Stage 3. What does that mean?**
|
||||
A: Stage 3 typically relates to data parsing or OMG API lookups. Review the specific error message provided. It may indicate missing required columns in your source CSV or a temporary connectivity issue with the OMG API.
|
||||
|
||||
**Q: How long are my activity logs retained?**
|
||||
A: Logs are stored in a JSON file on the server. Retention policies are managed by the IT department. Please contact support for long-term archival needs.
|
||||
|
||||
**Q: Can I cancel a CSV transformation once started?**
|
||||
A: Yes. Click the **Cancel** button during the processing stage. Note that any partially generated files may need to be cleaned up manually or via the log export review.
|
||||
|
||||
**Q: Why are dates formatted as DD/MM/YYYY in the local CSVs?**
|
||||
A: This standardizes dates for international markets where the Month/Day format is non-standard. The tool adds 1 month to the original global date to align with local campaign timelines.
|
||||
|
|
@ -100,4 +100,5 @@ This project is an Obsidian Vault configuration relying on community plugins. Th
|
|||
5. **Error Handling**: `calendar` plugin catches errors in `getDailyNoteSettings` and `getWeeklyNoteSettings` but only logs them (`console.info`). It may silently fail if core plugins are missing.
|
||||
|
||||
## Related
|
||||
- [[01 Projects/obsidian-vault/USER_MANUAL]]
|
||||
- [[01 Projects/obsidian-vault/USER_MANUAL.md]]
|
||||
|
|
@ -115,4 +115,5 @@ A: Yes, you can edit the Mermaid syntax directly, but the visual graph only rend
|
|||
A: Ensure the `obsidian-tasks-plugin` is enabled and that your task syntax includes the required checkbox `- [ ]`. Check the plugin settings for any filtering rules.
|
||||
|
||||
## Related
|
||||
- [[01 Projects/obsidian-vault/DEVELOPER_MANUAL]]
|
||||
- [[01 Projects/obsidian-vault/DEVELOPER_MANUAL.md]]
|
||||
|
|
@ -154,4 +154,8 @@ payload-cms-push-dev-prod.md, vitest-module-level-env-testing.md
|
|||
| raw/ | 273 |
|
||||
| Hoarder/ | ~167 |
|
||||
| **ИТОГО** | **1 237** |
|
||||
- [[02 Areas/Vault Audit 2026-05-18.md]]
|
||||
- [[02 Areas/Vault Audit 2026-05-18.md]]
|
||||
|
||||
## Related
|
||||
|
||||
- [[02 Areas/Vault Health]]
|
||||
|
|
|
|||
|
|
@ -1,25 +1,32 @@
|
|||
---
|
||||
auto_generated: true
|
||||
created: 2026-05-19
|
||||
modified: 2026-05-19
|
||||
name: Vault Health
|
||||
status: active
|
||||
tags:
|
||||
- domain/devops
|
||||
- status/active
|
||||
- type/reference
|
||||
type: reference
|
||||
---
|
||||
|
||||
# Vault Health — 2026-05-19 13:04
|
||||
# Vault Health — 2026-05-19 13:08
|
||||
|
||||
| Metric | Value |
|
||||
|--------|-------|
|
||||
| Safe-zone notes | 20 |
|
||||
| Complete frontmatter | 20 / 20 (100%) |
|
||||
| Have Related links | 18 / 20 (90%) |
|
||||
| Complete frontmatter | 19 / 20 (95%) |
|
||||
| Have Related links | 20 / 20 (100%) |
|
||||
| Orphaned notes | 0 |
|
||||
| Malformed tags | 4 notes |
|
||||
| Index size | 106 embeddings |
|
||||
| Last full scan | 2026-05-18 18:45 |
|
||||
| Last full scan | 2026-05-19 13:07 |
|
||||
|
||||
## Action Items
|
||||
- 1 note(s) missing frontmatter fields
|
||||
- 4 note(s) have malformed tags — run `vault-agent --retag`
|
||||
|
||||
## Related
|
||||
- [[02 Areas/Vault Audit 2026-05-18.md]]
|
||||
- [[02 Areas/Vault Cleanup.md]]
|
||||
|
|
@ -5,7 +5,7 @@ deploy: ssh aimpress → /opt/03-business/shumiland → git pull + docker compos
|
|||
+ up
|
||||
last_commit: 2026-05-13
|
||||
local_path: /Users/ai_leed/Documents/Projects/Shumiland
|
||||
modified: 2026-05-18
|
||||
modified: 2026-05-19
|
||||
name: Shumiland
|
||||
port: 3000
|
||||
repo: https://git.ai-impress.com/Aimpress/Shumiland.git
|
||||
|
|
@ -17,6 +17,7 @@ tags:
|
|||
- domain/devops
|
||||
- payload-cms
|
||||
- shumiland
|
||||
- status/active
|
||||
- tech/docker
|
||||
- tech/nextjs
|
||||
- tech/payload-cms
|
||||
|
|
|
|||
|
|
@ -54,3 +54,4 @@ tags: [daily]
|
|||
- 13:04 | `aimpress`
|
||||
- **Asked:** Удалить Media stack (CT111), Plane и Actual Budget с полным аудитом сервера. | Removed Media stack (CT111), Plane, and Actual Budget containers; generated software inventory after cleanup; configured Watchtower exclusion for local Nextcloud image. | docker-compose.yml, Watchtower config
|
||||
- **Done:** —
|
||||
- 13:07 (8min) — session ended | `.vault-agent`
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue