Skip to content
vipool47Public

About

A secure cloud file storage REST API built with Spring Boot, featuring JWT authentication, file management, sharing and storage optimization.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

16 Commits

Folders and files

Repository files navigation

FileNest

A secure cloud storage REST API built with Spring Boot that enables authenticated users to upload, organize, share, and manage files with JWT authentication, storage quotas, content deduplication, and secure public sharing.

Features

  • User registration and login using JWT authentication
  • Stateless authentication with Spring Security
  • Upload, download, rename and delete files
  • Nested folder hierarchy with recursive traversal
  • SHA-256 based file deduplication to reduce disk usage
  • Per-user storage quota enforcement (10 GB default)
  • Secure public file sharing using token-based links
  • Configurable share link expiration (24 hours by default)
  • Per-IP rate limiting using Bucket4j
  • Centralized exception handling with consistent JSON responses
  • OpenAPI documentation with Swagger UI

Tech Stack

Technology Details
Language Java 21
Framework Spring Boot 4.1.0
Security Spring Security (JWT Authentication + BCrypt)
Database PostgreSQL (Neon)
ORM Spring Data JPA / Hibernate
Documentation SpringDoc OpenAPI (Swagger UI)
Rate Limiting Bucket4j
Storage Local Filesystem (metadata stored in PostgreSQL)
Build Tool Maven
Containerization Docker

How to Run

Prerequisites

  • Java 21
  • Maven

Clone Repository

git clone https://github.com/your-username/FileNest.git
cd FileNest

Run Locally

./mvnw spring-boot:run

Swagger UI

http://localhost:8080/swagger-ui.html

Screenshots

Swagger Home

Swagger Home


User Registration

Register

Response

Register Response


User Login

Login

Response

Login Response


Create Folder

Create Folder

Response

Create Folder Response


Upload File

Upload File

Response

Upload Response


Share File

Share File

Response

Share Response


Download shared file

Download Shared File


API Endpoints

Method Endpoint Authentication Description
POST /auth/register No Register a new user
POST /auth/login No Login
POST /auth/logout Yes Logout
GET /users/me Yes Current user profile
POST /files/upload Yes Upload file
GET /files Yes List root files
GET /files/{id}/download Yes Download file
PUT /files/{id}/rename Yes Rename file
DELETE /files/{id} Yes Delete file
POST /files/{id}/share Yes Generate share link
GET /share/{token} No Download shared file
POST /folders Yes Create folder
GET /folders Yes List root folders
GET /folders/{id} Yes Get folder recursively

Security

  • JWT-based authentication
  • BCrypt password hashing
  • Spring Security
  • Bucket4j rate limiting
  • Secure share tokens
  • Input validation
  • Global exception handling

About

A secure cloud file storage REST API built with Spring Boot, featuring JWT authentication, file management, sharing and storage optimization.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages