Cloud File Storage System

Secure and scalable file management using Spring Boot and AWS S3

Technologies Used: Spring Boot, AWS S3, PostgreSQL, Spring Security, Docker, JUnit, Mockito

This project is a cloud-based file storage system designed to provide secure and scalable file management for users such as researchers, educators, and entrepreneurs. The system allows authenticated users to upload, download, list, and delete files while maintaining control over file ownership.

The application uses Amazon S3 for storing file content and PostgreSQL for managing metadata such as file name, owner, and upload time. By separating file storage from metadata, the system follows a scalable architecture commonly used in modern cloud applications.

Key Features

  • Secure file upload, download, list, and delete operations

  • Cloud-based storage using AWS S3

  • Metadata management with PostgreSQL

  • Authentication and ownership-based access control

  • RESTful API built with Spring Boot

  • Unit testing with Mockito for service-layer validation

  • Configurable environment setup for cloud deployment

Architecture

This system follows a layered architecture:

  • Client: interacts via API (curl / Postman)

  • Controller Layer: handles HTTP requests

  • Service Layer: processes business logic

  • Repository Layer: manages database operations

  • PostgreSQL: stores file metadata

  • AWS S3: stores file content

Challenges & Solutions

  • Encountered access denied errors when integrating with S3. Resolved by configuring IAM policies with least-privilege access.

  • Refactored the system from local file storage to AWS S3, requiring updates to file handling logic and architecture.

  • Implemented authentication and ownership validation using Spring Security after initial development, requiring redesign of access logic.

What I Learned

  • Gained hands-on experience with AWS S3 and cloud-based storage architecture

  • Learned how to implement authentication and authorization in a backend system

  • Strengthened debugging and problem-solving skills with real-world issues

  • Improved understanding of scalable system design and separation of concerns

Future Improvements

  • Add file sharing and collaboration permissions

  • Implement JWT-based authentication

  • Build a front-end UI using React

  • Migrate to a fully cloud-native architecture

  • Add monitoring and logging (AWS CloudWatch)