https://github.com/jdegand/document-upload-floci
Angular Signal Form + Floci + S3 Bucket + Spring Boot + Docker
https://github.com/jdegand/document-upload-floci
angular aws-s3 docker floci spring-boot
Last synced: 6 days ago
JSON representation
Angular Signal Form + Floci + S3 Bucket + Spring Boot + Docker
- Host: GitHub
- URL: https://github.com/jdegand/document-upload-floci
- Owner: jdegand
- Created: 2026-05-05T17:56:00.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-17T01:40:38.000Z (about 1 month ago)
- Last Synced: 2026-05-17T03:38:03.101Z (about 1 month ago)
- Topics: angular, aws-s3, docker, floci, spring-boot
- Language: Java
- Homepage:
- Size: 94.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Document Upload Floci
A document (`.pdf`, `.doc`, `.docx`) upload service using Floci (AWS emulator) and S3-compatible storage. The Angular frontend uses a signal-based form to upload documents to a Spring Boot backend.
## Prerequisites
- Java 25+ and Maven
- Node.js and NPM
- Docker and Docker Compose
- AWS CLI (optional, for manual bucket management)
## Getting Started
1. Configure Environment Variables
Create a `.env` file in the project root directory:
```bash
FLOCI_AUTH_PRESIGN_SECRET=your_secret_key_here
```
1. Start the Infrastructure
Spin up the Floci S3 emulator using Docker Compose:
```bash
cd document-upload-floci
sudo docker compose up -d
```
1. Start the Backend
Launch the Spring Boot application:
```bash
cd uploadbackend
mvn spring-boot:run
```
Or run from your IDE.
1. Start the Frontend
Install dependencies and start the Angular development server:
```bash
cd uploadfrontend
npm install
npm start
```
## Usage
1. Open your browser and navigate to `http://localhost:4200`.
1. Fill out the signal-based upload form and submit your document.
1. Verify the file is saved in the local bucket by visiting:
```bash
http://localhost:4566/hr-policy-docs/
```
Add the key to the URL to view the uploaded file's contents.
## Configuration Alternatives
### Skip AWS CLI in Docker
If you have the AWS CLI installed locally, you can remove it from the Docker container and manually create the bucket:
```bash
aws --endpoint-url=http://localhost:4566 s3 mb s3://hr-policy-docs
```
### Automate Bucket Creation
To eliminate manual setup, initialize the bucket automatically inside the Spring Boot application using a CommandLineRunner bean:
```java
@Bean
CommandLineRunner initBucket(S3Client s3Client) {
return args -> {
try {
s3Client.createBucket(b -> b.bucket("hr-policy-docs"));
} catch (S3Exception e) {
// Bucket may already exist
}
};
}
```