Files: IFileStore in Core/Interfaces, implemented by the Files module
- Dominant language
- C#
- Stars
- 6
- Forks
- 7
- Avg merge
- 4h 42m
- Merged PRs (30d)
- 307
Description
File storage is only reachable from inside the Files module. `IFileStorage` lives in `BarakoCMS.Files/IFileStorage.cs:11`, and nothing in core references it. Mail already has the other shape: `IEmailService` sits in `barakoCMS/Core/Interfaces/IEmailService.cs` and a module implements it.
### Why it matters
Attaching a stored file to an email (#806), writing a report export (#837), generating a PDF invoice (#585), keeping a payment receipt, and a microservice writing its output all need to store or read bytes. Each would have to reference the Files module directly, so a module that wants a file cannot run without Files installed, or core ends up referencing a module, which CLAUDE.md section 1 rules out.
### The general concept
An `IFileStore` in `Core/Interfaces` covering put, get, delete and a public URL for stored files, implemented by the Files module (and its S3 provider). Anything that needs a file asks core for the interface and gets a clear error when no module provides it.
### Where it lives
Core: the interface. Module: BarakoCMS.Files implements it.
### Compatibility
A new public interface in core, which is a deliberate addition to the package surface. `IFileStorage` in the Files module stays as it is and its implementations also implement the core interface, so no module or host breaks. No HTTP or stored data change.
### Done when
- A module with no reference to BarakoCMS.Files stores and reads a file through the core interface in a test.
- Without the Files module installed, resolving the interface gives a message naming the missing module.
- #806 can be built against the core interface.
Found in the architecture sweep of 15 September 2026.
Contributor guide
Research direction
Start with BarakoCMS.Files/IFileStorage.cs:11, barakoCMS/Core/Interfaces/IEmailService.cs, and CLAUDE.md section 1 to understand the existing interface boundary. Trace the Files module and its S3 provider, then add tests showing a module without a Files reference can store and read through the core interface, missing-module resolution names the module, and #806 can use it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100