{"id":26472786,"url":"https://github.com/kenzycodex/fileflow-backend","last_synced_at":"2026-04-15T06:36:43.306Z","repository":{"id":283014493,"uuid":"949407045","full_name":"kenzycodex/fileflow-backend","owner":"kenzycodex","description":"A cloud storage backend that provides secure file storage, user authentication, access control, and efficient file management. It handles user authentication, file uploads/downloads, folder organization, sharing permissions, and data security, ensuring seamless integration with the frontend for a smooth user experience.","archived":false,"fork":false,"pushed_at":"2025-03-18T05:28:38.000Z","size":177,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T06:31:01.307Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kenzycodex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-16T11:49:37.000Z","updated_at":"2025-03-18T05:28:42.000Z","dependencies_parsed_at":"2025-03-18T06:41:09.892Z","dependency_job_id":null,"html_url":"https://github.com/kenzycodex/fileflow-backend","commit_stats":null,"previous_names":["kenzycodex/fileflow-backend"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenzycodex%2Ffileflow-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenzycodex%2Ffileflow-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenzycodex%2Ffileflow-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenzycodex%2Ffileflow-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kenzycodex","download_url":"https://codeload.github.com/kenzycodex/fileflow-backend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244513912,"owners_count":20464600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-19T21:49:47.707Z","updated_at":"2026-04-15T06:36:43.298Z","avatar_url":"https://github.com/kenzycodex.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FileFlow - Advanced Cloud File Storage and Management System\n\nFileFlow is a comprehensive cloud storage solution that provides secure file storage, user authentication, access control, and efficient file management. It handles file uploads/downloads, folder organization, sharing permissions, and data security, ensuring a seamless user experience comparable to Google Drive or Dropbox.\n\n[![Spring Boot](https://img.shields.io/badge/Spring%20Boot-3.2.0-brightgreen.svg)](https://spring.io/projects/spring-boot)\n[![Java](https://img.shields.io/badge/Java-17-orange.svg)](https://www.oracle.com/java/)\n[![MySQL](https://img.shields.io/badge/MySQL-8.0-blue.svg)](https://www.mysql.com/)\n[![MinIO](https://img.shields.io/badge/MinIO-Latest-yellow.svg)](https://min.io/)\n[![Elasticsearch](https://img.shields.io/badge/Elasticsearch-7.17-purple.svg)](https://www.elastic.co/)\n[![Firebase](https://img.shields.io/badge/Firebase-Auth-orange.svg)](https://firebase.google.com/)\n[![Redis](https://img.shields.io/badge/Redis-7.0-red.svg)](https://redis.io/)\n\n## Table of Contents\n\n- [Features](#features)\n- [Architecture](#architecture)\n- [Technology Stack](#technology-stack)\n- [Getting Started](#getting-started)\n- [Development Environment](#development-environment)\n- [Production Deployment](#production-deployment)\n- [Environment Configuration](#environment-configuration)\n- [Authentication](#authentication)\n- [Testing](#testing)\n- [API Documentation](#api-documentation)\n- [Contributing](#contributing)\n- [Documentation](#documentation)\n\n## Features\n\n### Core Functionality\n\n- **User Authentication \u0026 Authorization**:\n    - Traditional JWT-based authentication\n    - Social login via Firebase Authentication (Google, GitHub, Microsoft, Apple)\n    - Secure password management and reset flow\n- **File Operations**: Upload, download, rename, move, and delete files\n- **Folder Management**: Create, organize, and manage hierarchical folder structures\n- **Trash Management**: Soft deletion with automatic cleanup after configurable retention period\n- **Storage Quota**: User-specific storage limits with quota extension capabilities\n\n### Advanced Features\n\n- **Chunked Uploads**: Support for large file uploads with resume capability\n- **File Versioning**: Track and restore version history of files\n- **File Sharing**: Secure sharing with fine-grained permission controls\n- **Tagging System**: Organize files with custom tags\n- **File Comments**: Collaborate on files with threaded comments\n- **Full-Text Search**: Index and search file content using Elasticsearch\n- **File Preview**: Generate thumbnails and previews for common file types\n- **File Conversion**: Convert between formats for better interoperability\n- **Storage Deduplication**: Hash-based file deduplication to save storage space\n- **Multi-provider Authentication**: Seamless integration with social logins\n- **Distributed Caching**: Redis-based caching for improved performance\n\n## Architecture\n\nFileFlow is built with a modular, layered architecture that promotes separation of concerns and flexibility.\n\n### Storage Layer\n\n- **Storage Service Abstraction** with multiple implementations:\n    - `LocalEnhancedStorageService`: File system-based implementation for development\n    - `MinioEnhancedStorageService`: Object storage implementation using MinIO for production\n\n### Authentication Layer\n\n- **Multiple Authentication Methods**:\n    - Traditional username/password with JWT tokens\n    - Firebase Authentication for social login providers\n    - Centralized token management with refresh token support\n\n### Service Layer\n\nDedicated services for each major feature:\n\n- `FileService`: Core file operations (upload, download, move, etc.)\n- `FolderService`: Folder management\n- `VersioningService`: File versioning\n- `TagService`: File tagging\n- `QuotaService`: Storage quota management\n- `SearchService`: File search capabilities\n- `ActivityService`: User activity tracking\n- `AuthService`: Authentication management\n- `FirebaseAuthService`: Social login integration\n\n### Data Layer\n\n- **JPA/Hibernate** for relational database storage\n- **Elasticsearch** for full-text search capabilities\n- **Redis** for distributed caching and token management\n\n### API Layer\n\nRESTful APIs for:\n\n- File and folder management\n- Search functionality\n- User management\n- Quota management\n- Authentication and social login\n\n### Database Schema\n\nKey entities in the system:\n- `User` - System user with authentication/authorization details\n- `File` - Core file metadata\n- `Folder` - Folder structure for organizing files\n- `FileVersion` - Version history for files\n- `Tag` and `FileTag` - Tagging system\n- `StorageChunk` - Support for chunked uploads\n- `Activity` - Audit logging\n\n## Technology Stack\n\n- **Backend Framework**: Spring Boot 3.2.0\n- **Language**: Java 17\n- **Database**: MySQL 8.0\n- **Database Migration**: Flyway\n- **Object Storage**: MinIO (S3-compatible)\n- **Search Engine**: Elasticsearch 7.17\n- **Authentication**:\n    - JWT (JSON Web Tokens)\n    - Firebase Authentication\n- **Caching**: Redis 7.0\n- **API Documentation**: OpenAPI/Swagger\n- **Build Tool**: Maven\n- **Testing**: JUnit 5, Mockito, Spring Test\n- **Environment Management**: java-dotenv\n\n## Getting Started\n\n### Prerequisites\n\n- JDK 17 or later\n- Maven 3.6.3 or later\n- MySQL 8.0 or later\n- Docker and Docker Compose (optional, for containerized deployment)\n\n### Quick Start\n\n1. Clone the repository:\n   ```\n   git clone https://github.com/kenzycodex/fileflow-backend.git\n   cd fileflow-backend\n   ```\n\n2. Set up your environment:\n   ```\n   cp .env.example .env.dev  # For development\n   cp .env.dev .env\n   ```\n\n3. Run the application with default development settings:\n   ```\n   ./mvnw spring-boot:run -Dspring-boot.run.profiles=dev\n   ```\n\n4. The application will be available at http://localhost:8080\n\nFor a more detailed setup guide, please refer to the [Setup Guide](docs/SETUP.md).\n\n## Development Environment\n\nFor local development, you can use:\n\n### Option 1: Start Only Dependencies\n\nRun only the infrastructure dependencies (MySQL, MinIO, Elasticsearch, Redis) in Docker, while running the application locally:\n\n```bash\n# Use our helper script\nchmod +x docker-compose-helper.sh\n./docker-compose-helper.sh dev:start\n\n# Run the application\n./mvnw spring-boot:run -Dspring-boot.run.profiles=dev\n```\n\n### Option 2: Environment Configuration\n\n1. Copy the development environment template:\n   ```bash\n   cp .env.example .env.dev\n   cp .env.dev .env\n   ```\n\n2. Start the dependencies:\n   ```bash\n   docker-compose -f docker-compose-dev.yml up -d\n   ```\n\n3. Run the application:\n   ```bash\n   ./mvnw spring-boot:run -Dspring-boot.run.profiles=dev\n   ```\n\n### Option 3: Manual Setup\n\nFor details on setting up the development environment manually without Docker, see the [Manual Setup Guide](docs/MANUAL_SETUP.md).\n\n## Production Deployment\n\nFor production deployment with Docker:\n\n```bash\n# Set up your production environment\ncp .env.example .env\n# Edit .env with production values\n\n# Start all services\ndocker-compose up -d\n```\n\nSee the [Production Deployment Guide](docs/PRODUCTION.md) for detailed production deployment instructions.\n\n## Environment Configuration\n\nFileFlow uses a flexible environment configuration system that supports multiple deployment scenarios.\n\n### Environment Variables\n\nConfiguration can be provided via:\n\n1. **System Environment Variables**\n2. **.env Files** - For local configuration\n3. **application.properties** - Default values\n\n### Configuration Files\n\n- **.env** - Main environment file\n- **.env.dev** - Development-specific settings\n- **.env.example** - Template with all available options\n- **application.properties** - Base application settings\n- **application-dev.properties** - Development profile settings\n- **application-prod.properties** - Production profile settings\n\nFor detailed information on configuring your environment, see the [Environment Configuration Guide](docs/ENVIRONMENT.md).\n\n## Authentication\n\nFileFlow supports multiple authentication methods:\n\n### Traditional Authentication\n\n- Username/password authentication\n- JWT token-based authentication\n- Refresh token mechanism for extended sessions\n\n### Social Authentication\n\n- Integration with Firebase Authentication\n- Support for Google, GitHub, Microsoft, and Apple login\n- Seamless account linking between traditional and social accounts\n\n### Configuration\n\nTo enable social authentication:\n\n1. Set up a Firebase project\n2. Configure service account credentials\n3. Enable desired providers (Google, GitHub, etc.)\n4. Set `FIREBASE_ENABLED=true` in your environment\n\nFor detailed setup instructions, see the [Authentication Guide](docs/AUTHENTICATION.md).\n\n## Testing\n\nFileFlow includes comprehensive tests to ensure functionality and stability:\n\n### Running Tests\n\n```bash\n# Run all tests\n./mvnw test\n\n# Run specific test class\n./mvnw test -Dtest=FileControllerTest\n```\n\n### Test Categories\n\n- **Unit Tests**: Tests for service classes and utilities\n- **Controller Tests**: Tests for REST controllers\n- **Security Tests**: Tests for authentication and authorization\n- **Integration Tests**: End-to-end feature testing\n\nFor more details on testing, see the [Testing Guide](docs/TESTING.md).\n\n## API Documentation\n\nWhen the application is running, API documentation is available at:\n\n- Swagger UI: http://localhost:8080/swagger-ui.html\n- OpenAPI JSON: http://localhost:8080/v3/api-docs\n\n## Configuration\n\nConfiguration options can be overridden using environment variables, `.env` files, or in:\n\n- `application.properties`: Common settings\n- `application-dev.properties`: Development settings\n- `application-prod.properties`: Production settings\n\nKey configuration options:\n\n```properties\n# Database\nspring.datasource.url=jdbc:mysql://localhost:3306/fileflow\nspring.datasource.username=root\nspring.datasource.password=password\n\n# Storage\napp.storage.strategy=local  # or 'minio' for MinIO\napp.minio.endpoint=http://localhost:9000\napp.minio.access-key=minioadmin\napp.minio.secret-key=minioadmin\n\n# Firebase Authentication\napp.firebase.enabled=true\napp.firebase.config-file=classpath:firebase-service-account.json\n```\n\n## Documentation\n\nFor more detailed documentation, refer to:\n\n- [Setup Guide](docs/SETUP.md) - Detailed setup and deployment instructions\n- [Manual Setup Guide](docs/MANUAL_SETUP.md) - Running without Docker\n- [Environment Configuration Guide](docs/ENVIRONMENT.md) - Configure your environment\n- [Authentication Guide](docs/AUTHENTICATION.md) - Authentication setup and configuration\n- [Production Deployment Guide](docs/PRODUCTION.md) - Production deployment best practices\n- [Testing Guide](docs/TESTING.md) - Testing strategy and procedures\n- [Search Integration](docs/SEARCH_INTEGRATION.md) - Documentation on the Elasticsearch integration\n- [API Documentation](http://localhost:8080/swagger-ui.html) - Available when the application is running\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature/my-feature`\n3. Commit your changes: `git commit -m 'Add some feature'`\n4. Push to your branch: `git push origin feature/my-feature`\n5. Submit a pull request\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Acknowledgements\n\n- Spring Boot and the Spring community\n- Firebase for authentication\n- MinIO for object storage\n- Elasticsearch for search capabilities\n- Redis for caching\n- All open source libraries used in this project\n  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenzycodex%2Ffileflow-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkenzycodex%2Ffileflow-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenzycodex%2Ffileflow-backend/lists"}