diff options
| author | diogo464 <[email protected]> | 2025-08-11 16:48:14 +0100 |
|---|---|---|
| committer | diogo464 <[email protected]> | 2025-08-11 16:48:14 +0100 |
| commit | 741d42c7ab635180ab416dc749e1bcb774a22f5e (patch) | |
| tree | 221f5f991293edfb6abfe50b7fc692caf9bca3cc /CLAUDE.md | |
| parent | 83ff4ce9b3e93a361dd120ab2428e6d854af75bb (diff) | |
Simplify frontend by removing FileItem conversion layer
- Remove FileItem interface and 300+ lines of mock data
- Eliminate transformTreeNodes() conversion function
- Update component to use DriveTreeNode[] directly
- Rename /api/list to /api/tree with server-side tree building
- Add Drive_tree() function and DriveTreeNode types
- Significantly reduce code complexity and memory usage
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
Diffstat (limited to 'CLAUDE.md')
| -rw-r--r-- | CLAUDE.md | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -17,11 +17,11 @@ | |||
| 17 | - `just logs` - View logs | 17 | - `just logs` - View logs |
| 18 | 18 | ||
| 19 | ## Current Implementation | 19 | ## Current Implementation |
| 20 | - Frontend directory: `frontend/` | 20 | - Frontend directory: `frontend/` (note: frontend code is in frontend/ directory) |
| 21 | - Drive functions: `frontend/lib/drive.ts` | 21 | - Drive functions: `frontend/lib/drive_server.ts` |
| 22 | - `Drive_ls(path, recursive)` - Lists files/directories | 22 | - `Drive_ls(path, recursive)` - Lists files/directories |
| 23 | - `Drive_blob_path(blob)` - Gets filesystem path for a blob ID | 23 | - `Drive_blob_path(blob)` - Gets filesystem path for a blob ID |
| 24 | - Current page shows basic Next.js template but calls Drive_ls("/", false) | 24 | - Current page shows v0 generated UI with mockData but has /api/list endpoint available |
| 25 | 25 | ||
| 26 | ## Tech Stack | 26 | ## Tech Stack |
| 27 | - Next.js 15.4.6 with App Router | 27 | - Next.js 15.4.6 with App Router |
| @@ -48,8 +48,8 @@ | |||
| 48 | 48 | ||
| 49 | ## API Endpoints | 49 | ## API Endpoints |
| 50 | 50 | ||
| 51 | ### Legacy Endpoints | 51 | ### Tree Endpoint |
| 52 | - `/api/list` - GET all files recursively from root | 52 | - `/api/tree` - GET filesystem tree with hierarchy |
| 53 | 53 | ||
| 54 | ### RESTful API - `/api/fs/[...path]` | 54 | ### RESTful API - `/api/fs/[...path]` |
| 55 | - **GET** `/api/fs/path/to/directory` - List directory contents | 55 | - **GET** `/api/fs/path/to/directory` - List directory contents |
