agl-go-driver
๐ฌ About
The project is a simple file storage API that allows users to upload and download files.
[!NOTE]
- This project was developed following Aprenda Golang's "Imersรฃo Backend" course.
- Notes taken during the course are in the notes file.
๐จ Architecture
C4Container
title Personal Go Drive
Person(customerA, "Customer A", "A customer of the drive API")
Enterprise_Boundary(b0, "System") {
Container(web_interface, "Web Application", "Interface that allows consumers to access Drive API via Web")
Container(api, "API", "Allows customers upload/download files from Drive")
Container(cli_interface, "CLI", "Interface that allows consumers to access Drive API via terminal")
Container(worker, "Worker", "Compress files and remove raw files")
ContainerDb(db, "Storage", "Stores the links of the uploaded files")
ContainerQueue(queue, "Queue")
}
System(bucket_raw, "Bucket Raw", "Save raw files")
System(bucket_compress, "Bucket Compress", "Save compress files")
BiRel(customerA, web_interface, "HTTP")
BiRel(customerA, cli_interface, "Terminal")
Rel_D(cli_interface, api, "Save/Get link")
Rel_D(web_interface, api, "Save/Get link")
Rel_D(api, db, "Save/Get link")
Rel_D(api, queue, "Save/Get link")
Rel_D(api, bucket_raw, "Save/Get link")
Rel_D(queue, worker, "Get raw files")
Rel_D(worker, bucket_compress, "Save compressed files")
[!NOTE]
- The following diagram was generated using Mermaid.
- It is a C4 model diagram at the container level, see more at C4 Model.
๐ Database
erDiagram
folder {
INT id
INT parent_id
STRING name
DATETIME created_at
DATETIME updated_at
BOOL deleted
}
file {
INT id
INT folder_id
INT owner_id
STRING name
STRING type
STRING path
DATETIME created_at
DATETIME updated_at
BOOL deleted
}
user {
INT id
STRING name
STRING login
STRING password
DATETIME created_at
DATETIME updated_at
DATETIME last_login
BOOL deleted
}
user ||--o{ file : "one to many"
folder ||--o{ file : "one to many"
folder ||--o{ folder : "one to many"
๐ป Technologies
(back to top)
๐ Requirements
(back to top)
๐ฟ Installation
git clone git@github.com:filipe1309/agl-go-driver.git
cd agl-go-driver
(back to top)
๐ Running
make run
Access http://localhost
(back to top)
๐ฆ Roadmap
- replace
aws-sdk-go
with aws-sdk-go-v2
๐ License
MIT
(back to top)
๐งโโ๏ธ About Me
(back to top)
๐ Acknowledgments
(back to top)
Done withย ย โฅ๏ธย ย by filipe1309 ๐