A modern cloud storage application built with React and AWS services, providing secure file storage and management capabilities similar to Google Drive or Dropbox.
- Secure Authentication: AWS Cognito integration for user authentication and authorization
- File Management: Upload, view, and delete files with a clean, intuitive interface
- Cloud Storage: AWS S3 integration for reliable and scalable file storage
- User Isolation: Each user has their own private file storage space
- Modern UI: Built with React 19 and TypeScript for a responsive user experience
- Email Verification: Complete signup flow with email confirmation
- Frontend: React 19, TypeScript, Vite
- Authentication: AWS Cognito (User Pool + Identity Pool)
- Storage: AWS S3
- Styling: CSS3 with modern styling
- Routing: React Router
- AWS SDK: v3 for JavaScript/TypeScript
Before running this application, you'll need:
- Node.js (v18 or higher)
- npm or yarn
- AWS Account with the following services configured:
- AWS Cognito User Pool
- AWS Cognito Identity Pool
- AWS S3 Bucket
Create a Cognito User Pool with:
- Email as username
- Password policy configured
- Email verification enabled
- Generate an App Client (without secret)
Create an Identity Pool that:
- Uses the User Pool for authentication
- Has IAM roles configured for authenticated users
- Allows access to your S3 bucket
Create an S3 bucket with:
- Private access (authenticated users only)
- CORS configuration for web uploads
- IAM policy allowing Cognito authenticated users to access their files
Create a .env file in the project root with:
VITE_COGNITO_USER_POOL_ID=your_user_pool_id
VITE_COGNITO_APP_CLIENT_ID=your_app_client_id
VITE_COGNITO_IDENTITY_POOL_ID=your_identity_pool_id
VITE_AWS_REGION=your_aws_region
VITE_S3_BUCKET_NAME=your_s3_bucket_name-
Clone the repository
git clone <repository-url> cd clone-drive
-
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env # Edit .env with your AWS configuration -
Start the development server
npm run dev
-
Open your browser Navigate to
http://localhost:5173
- Click "Sign Up" on the login page
- Enter your email and password
- Check your email for the confirmation code
- Enter the confirmation code to verify your account
- Enter your email and password
- Click "Sign In" to access your dashboard
- Upload: Select a file and click "Upload File"
- View: See all your uploaded files in the dashboard
- Delete: Click the delete button next to any file to remove it
- Download: Click download to save files to your device (coming soon)
src/
├── Login/
│ ├── AuthContext.tsx # Authentication context and logic
│ ├── LoginPage.tsx # Login/signup form
│ ├── ConfirmSignup.tsx # Email verification
│ └── Login.css # Authentication styles
├── Main/
│ └── Dashboard.tsx # Main file management interface
├── setup/
│ └── aws-config.tsx # AWS configuration
├── App.tsx # Main app component with routing
└── main.tsx # App entry point
- JWT Tokens: Secure authentication using AWS Cognito JWT tokens
- Temporary Credentials: AWS IAM temporary credentials for S3 access
- User Isolation: Each user's files are stored in separate S3 prefixes
- Session Management: Automatic token refresh and secure logout
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
This project uses:
- TypeScript for type safety
- ESLint for code quality
- Modern React patterns (hooks, context)
-
Authentication Errors
- Verify your AWS Cognito configuration
- Check environment variables
- Ensure CORS is properly configured
-
File Upload Issues
- Verify S3 bucket permissions
- Check IAM role policies
- Ensure bucket CORS configuration
-
Build Errors
- Clear node_modules and reinstall
- Check TypeScript configuration
- Verify all dependencies are installed
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- File download functionality
- File sharing capabilities
- Folder organization
- File preview
- Drag and drop upload
- Mobile responsive design improvements
- Dark mode theme
- File versioning
- Search functionality
If you encounter any issues or have questions, please:
- Check the troubleshooting section
- Search existing issues
- Create a new issue with detailed information
Built with ❤️ using React and AWS