Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lwcarani/dropbox-clone
CLI Dropbox clone, written in Java, using Spring, AWS (Cognito and S3)
https://github.com/lwcarani/dropbox-clone
aws aws-cognito aws-s3 java spring
Last synced: 17 days ago
JSON representation
CLI Dropbox clone, written in Java, using Spring, AWS (Cognito and S3)
- Host: GitHub
- URL: https://github.com/lwcarani/dropbox-clone
- Owner: lwcarani
- Created: 2024-08-29T19:16:04.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-09-06T20:01:39.000Z (2 months ago)
- Last Synced: 2024-10-10T17:23:20.502Z (about 1 month ago)
- Topics: aws, aws-cognito, aws-s3, java, spring
- Language: Java
- Homepage:
- Size: 45.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dropbox Clone
This project is a command-line interface (CLI) application (written in Java) that mimics some of the core functionalities of Dropbox, allowing users to synchronize files between their local machine and cloud storage (in this particular implementation, Amazon Web Services (AWS) Simple Storage Service (S3)).
## Features
- User authentication
- new account: `signup`
- login: `login`
- logout: `logout`
- delete account: `delete_account`
- File and folder operations
- change current working directory: `cd`
- create: `mkdir`
- delete: `rm`
- list: `ls`
- Sync files between local machine and cloud storage (`push`, `pull`)
- Change root directory (`change_root`)
- User preferences storage## Technology Stack
- Java 17
- Spring Boot 3.1.0
- AWS SDK for Java 1.12.465
- AWS S3 for file storage
- AWS Cognito for user authentication## Project Structure
The project is organized into several packages:
- `io.github.lwcarani`: Main application package
- `io.github.lwcarani.cli`: Contains the CLI runner
- `io.github.lwcarani.config`: AWS configuration
- `io.github.lwcarani.model`: Data models
- `io.github.lwcarani.service`: Service interfaces and implementations
- `io.github.lwcarani.util`: Utility classes## Setup
1. Ensure you have Java 17 installed.
2. Clone the repository:
```
git clone https://github.com/lwcarani/dropbox-clone.git
```
3. Navigate to the project directory:
```
cd dropbox-clone
```
4. Create an `application.properties` file in the `src/main/resources` directory with the following content:
```
aws.s3.bucket-user-preferences=
aws.s3.bucket-user-storage=
aws.accessKey=
aws.secretKey=
aws.region=
aws.cognito.userPoolId=
aws.cognito.clientId=
aws.cognito.clientSecret=
spring.main.banner-mode=console
logging.level.root=ERROR
```Replace the placeholder values with your actual AWS credentials and resource identifiers.
## Dependencies
The project uses the following main dependencies:
- Spring Boot Starter Web
- Spring Boot Starter Security
- AWS Java SDK for Amazon Cognito Identity Provider
- AWS Java SDK for Amazon S3For a full list of dependencies, please refer to the `pom.xml` file.
## Building
The project uses the Spring Boot Maven plugin for building. The main class is set to `io.github.lwcarani.DropboxCloneApplication`.
To build a JAR file in Eclipse IDE using Maven, follow these steps:
1. Ensure your project is set up as a Maven project in Eclipse.
2. Open the project in Eclipse.
3. Right-click on the project in the Package Explorer.
4. Navigate to "Run As" > "Maven build..."
5. In the "Goals" field, enter "clean package"
6. Click "Run"Maven will then compile your code, run any tests, and package your application into a JAR file. The JAR file will typically be created in the `target` directory of your project.
## Running the Application
Once you've built a JAR file, you can run the application from the command line, like so:
```
java -jar target\dropbox-clone-0.0.2.jar
```## Usage
Once the application is running, you can use the following commands:
- `signup`: Create a new user account
- `login`: Log in to your account
- `logout`: Log out of your account
- `delete_account`: Permanently delete your account
- `push`: Upload all local files and folders to cloud storage
- `pull`: Download all files and folders from cloud to local machine
- `mkdir `: Create a new directory
- `cd `: Change current directory
- `ls `: List contents of current or specified directory
- `rm `: Delete a directory and its contents (both locally and in cloud)
- `change_root `: Set a new root directory for your Dropbox Clone files
- `help`: Display available commands
- `exit`: Exit the application## Contributing
Feedback, bug reports, issues, and pull requests welcome!
## Acknowledgements
Thanks to [John Crickett](https://github.com/JohnCrickett) for the idea from his site, [Coding Challenges](https://codingchallenges.fyi/challenges/challenge-dropbox/)!