Skip to content

Commit b306516

Browse files
updated readme
1 parent 457e2df commit b306516

1 file changed

Lines changed: 46 additions & 8 deletions

File tree

README.md

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,13 @@ This application provides a user-friendly interface for managing files and folde
4747
- **Google Drive-like Interface**: Clean, modern interface with familiar UX patterns
4848
- **Left Sidebar**: Displays all available file manager menus
4949
- **File Item Display**: Shows files and folders with appropriate icons, metadata, and context menus
50-
- **Context Menus**: Hover on folder/file and click the menu button to access the file operations menu dropdown (Rename, Copy, Move, Delete, Preview, Download)
50+
- **Context Menus**: Hover on folder/file and click the menu button to access the file operations menu dropdown (Rename, Copy, Move, Delete, Preview, Download, Share)
5151
- **Modals & Dialogs**:
5252
- Rename dialog for renaming resources
5353
- Move dialog for selecting destination folder
5454
- Preview modal for viewing files
55-
- Permissions dialog (UI ready)
55+
- Share dialog for sharing files/folders with WebIDs (with contact autocomplete)
56+
- Share success modal for displaying shared resource URLs
5657
- **Loading States**: Loading spinners and error displays throughout
5758
- **Toast Notifications**: User feedback for all operations
5859
- **Minimal Design**: Black, white, and light purple color scheme
@@ -64,8 +65,10 @@ This application provides a user-friendly interface for managing files and folde
6465
- **Profile Utilities**: WebID profile fetching and parsing utilities
6566
- **URL Utilities**: URL state management, encoding/decoding, and path resolution
6667
- **Binary File Detection**: Automatic detection of binary/system files (e.g., `.DS_Store`) to prevent unnecessary RDF conversion attempts
68+
- **ACP Utilities**: ACP sharing operations using LDO for type-safe RDF parsing and N3.js for ACR creation/updates
69+
- **Contact Utilities**: Fetching and parsing user contacts from WebID profiles for sharing autocomplete
6770
- **Error Handling**: Comprehensive error handling with user-friendly messages
68-
- **Type Safety**: Full TypeScript support throughout
71+
- **Type Safety**: Full TypeScript support throughout, including LDO-generated types from SHACL shapes
6972
- **Cache-Busting**: Automatic cache-busting for container listings after uploads/deletes to ensure fresh data
7073

7174
## Tech Stack
@@ -75,6 +78,7 @@ This application provides a user-friendly interface for managing files and folde
7578
- **Styling**: Tailwind CSS 4
7679
- **Language**: TypeScript
7780
- **Solid SDK**: [@inrupt/solid-client-js](https://github.com/inrupt/solid-client-js)
81+
- **LDO (Linked Data Objects)**: [@ldo/ldo](https://github.com/o-development/ldo) for type-safe ACP operations
7882
- **Icons**: [@heroicons/react](https://heroicons.com/)
7983
- **Notifications**: [react-hot-toast](https://react-hot-toast.com/)
8084

@@ -98,12 +102,19 @@ cd solid-file-manager
98102
npm install
99103
```
100104

101-
3. Run the development server:
105+
3. Build LDO types (automatically runs before dev server):
106+
```bash
107+
npm run build:ldo
108+
```
109+
110+
4. Run the development server:
102111
```bash
103112
npm run dev
104113
```
105114

106-
4. Open [http://localhost:3001](http://localhost:3001) in your browser.
115+
5. Open [http://localhost:3001](http://localhost:3001) in your browser.
116+
117+
**Note**: For ACP sharing functionality, you'll need to run a local Community Solid Server. See `README-CSS.md` for setup instructions.
107118

108119
## Development Setup
109120

@@ -146,7 +157,8 @@ solid-file-manager/
146157
│ │ ├── NewFolderDialog.tsx # Dialog for creating folders
147158
│ │ ├── RenameDialog.tsx # Dialog for renaming resources
148159
│ │ ├── MoveDialog.tsx # Dialog for moving files
149-
│ │ ├── PreviewModal.tsx # Modal for previewing files
160+
│ │ ├── ShareDialog.tsx # Dialog for sharing files/folders with WebIDs
161+
│ │ ├── ShareSuccessModal.tsx # Modal showing success after sharing
150162
│ │ ├── FileUploadHandler.tsx # File upload component
151163
│ │ ├── ProfileIcon.tsx # User profile icon and logout
152164
│ │ ├── LoginPage.tsx # Login page
@@ -172,20 +184,40 @@ solid-file-manager/
172184
│ │ ├── urlStateUtils.ts # URL state management
173185
│ │ ├── urlUtils.ts # URL utilities and binary file detection
174186
│ │ ├── fileTypeUtils.ts # File type detection
187+
│ │ ├── acpUtils.ts # ACP sharing utilities (LDO + N3.js)
188+
│ │ ├── contactUtils.ts # Contact fetching for sharing
175189
│ │ └── ...
176190
│ ├── page.tsx # Main page component
177191
│ ├── layout.tsx # Root layout
178192
│ └── globals.css # Global styles
193+
├── src/
194+
│ ├── shapes/ # SHACL Compact Syntax shape definitions
195+
│ │ └── Model.shaclc # ACP shape definitions
196+
│ └── ldo/ # Generated LDO types (auto-generated)
197+
│ ├── Model.typings.ts # TypeScript interfaces
198+
│ ├── Model.shapeTypes.ts # Shape type definitions
199+
│ ├── Model.context.ts # JSON-LD context
200+
│ └── Model.schema.ts # ShEx schema
201+
├── scripts/
202+
│ ├── fix-shex.js # Post-process ShEx output
203+
│ └── generate-ldo-files.js # Generate LDO files from ShEx
179204
├── public/ # Static assets
180-
└── README.md
205+
├── README.md
206+
└── README-CSS.md # Local CSS setup instructions
181207
```
182208

183209
## Solid Protocol Integration
184210

185211
This application integrates with Solid using:
186212

187213
- **Solid Protocol**: [https://solidproject.org/TR/protocol#resources](https://solidproject.org/TR/protocol#resources)
188-
- **ACP (Access Control Policies)**: [https://solid.github.io/authorization-panel/acp-specification/](https://solid.github.io/authorization-panel/acp-specification/) (UI ready, full integration pending)
214+
- **ACP (Access Control Policies)**: [https://solid.github.io/authorization-panel/acp-specification/](https://solid.github.io/authorization-panel/acp-specification/)
215+
- Full ACP sharing implementation with WebID-based access control
216+
- Uses LDO (Linked Data Objects) for type-safe ACR parsing
217+
- Uses N3.js for ACR creation and updates
218+
- Supports Editor (Read + Write) and Viewer (Read) access levels
219+
- Automatic ACR discovery via Link headers or `.acr` convention
220+
- Contact autocomplete from WebID profiles (`foaf:knows`)
189221
- **Storage Root Discovery**:
190222
- Uses `pim:storage` predicate from WebID profile
191223
- Uses `solid:storage` predicate as fallback
@@ -199,6 +231,11 @@ This application integrates with Solid using:
199231
- Recursive folder operations for copy, move, and delete
200232
- Automatic handling of binary files and system files
201233
- **SDK**: [@inrupt/solid-client-js](https://github.com/inrupt/solid-client-js)
234+
- **LDO Type Generation**:
235+
- SHACL Compact Syntax shapes defined in `src/shapes/Model.shaclc`
236+
- Automatically converted to ShEx via `@jeswr/shacl2shex`
237+
- TypeScript types generated via `@ldo/cli` and custom scripts
238+
- Types are regenerated on `npm run dev` and `npm run build`
202239

203240
## Design Principles
204241

@@ -213,6 +250,7 @@ This application integrates with Solid using:
213250
- [Solid Protocol Specification](https://solidproject.org/TR/protocol)
214251
- [ACP Specification](https://solid.github.io/authorization-panel/acp-specification/)
215252
- [Inrupt Solid Client JS](https://github.com/inrupt/solid-client-js)
253+
- [LDO (Linked Data Objects)](https://github.com/o-development/ldo)
216254
- [Community Solid Server](https://github.com/CommunitySolidServer/CommunitySolidServer)
217255

218256
## License

0 commit comments

Comments
 (0)