A modern, secure file sharing platform built with React and Node.js that allows users to share files with advanced security features including password protection, expiration dates, and view limits.
- Password Protection: Secure your files with custom passwords
- Expiration Dates: Set automatic file expiration
- View Limits: Control how many times files can be accessed
- JWT Authentication: Secure user authentication system
- Unique Share Links: UUID-based sharing links with 122 bits of entropy
- Responsive Design: Works seamlessly on desktop and mobile
- Dark/Light Mode: Toggle between themes
- Tailwind CSS: Modern, utility-first styling
- Smooth Animations: Enhanced user experience with CSS animations
- Intuitive Interface: Clean and user-friendly design
- Multiple File Types: Support for images, videos, documents, and more
- Drag & Drop Upload: Easy file uploading interface
- File Preview: View file information before sharing
- Bulk Operations: Manage multiple files efficiently
- Real-time Updates: Live file status updates
- Frontend: SecureSharing App
- Backend API: SecureSharing API
- React 19 - Modern React with latest features
- Vite - Fast build tool and development server
- Tailwind CSS - Utility-first CSS framework
- React Router - Client-side routing
- Axios - HTTP client for API calls
- Context API - State management
- Node.js - JavaScript runtime
- Express.js - Web application framework
- MongoDB - NoSQL database
- Mongoose - MongoDB object modeling
- JWT - JSON Web Tokens for authentication
- Bcrypt - Password hashing
- Multer - File upload handling
- CORS - Cross-origin resource sharing
Before running this project, make sure you have:
- Node.js (v16 or higher)
- npm or yarn
- MongoDB (local installation or MongoDB Atlas)
- Git
git clone https://github.com/Shubhamkahar196/SecureSharing.git
cd SecureSharingcd backend
npm install
# Create .env file
cp .env.example .env
# Edit .env with your configurationcd ../frontend
npm installCreate a .env file in the backend directory:
# Database
MONGODB_URI=mongodb://localhost:27017/securesharing
# or use MongoDB Atlas
# MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/securesharing
# JWT Secret
JWT_SECRET=your-super-secret-jwt-key-here
# Server Port
PORT=5000
# File Upload Settings
MAX_FILE_SIZE=10485760 # 10MB in bytes
UPLOAD_PATH=./uploadsStart Backend (Terminal 1):
cd backend
npm startStart Frontend (Terminal 2):
cd frontend
npm run devThe application will be available at:
- Frontend:
http://localhost:5173 - Backend API:
http://localhost:5000
SecureSharing/
βββ backend/
β βββ config/
β β βββ db.js # Database configuration
β βββ controllers/
β β βββ authController.js # Authentication logic
β β βββ fileController.js # File management logic
β β βββ viewController.js # File viewing logic
β βββ middleware/
β β βββ authMiddleware.js # JWT authentication middleware
β βββ models/
β β βββ User.js # User model
β β βββ File.js # File model
β βββ routes/
β β βββ authRoutes.js # Authentication routes
β β βββ fileRoutes.js # File management routes
β β βββ viewRoutes.js # File viewing routes
β βββ uploads/ # File storage directory
β βββ .env # Environment variables
β βββ package.json
β βββ server.js # Main server file
βββ frontend/
β βββ public/
β βββ src/
β β βββ components/ # Reusable React components
β β βββ context/ # React Context providers
β β βββ pages/ # Page components
β β βββ services/ # API service functions
β β βββ App.jsx # Main App component
β β βββ main.jsx # Entry point
β βββ package.json
β βββ vite.config.js # Vite configuration
βββ README.md
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/me- Get current user info
POST /api/files/upload- Upload a fileGET /api/files/my-files- Get user's filesDELETE /api/files/:id- Delete a file
GET /api/view/:shareLink- Get file informationPOST /api/view/:shareLink/access- Access/download file
- Connect your GitHub repository to Render
- Set build command:
npm install && npm run build - Set publish directory:
./dist
- Connect your GitHub repository to Render
- Set build command:
npm install - Set start command:
npm start - Add environment variables in Render dashboard
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
For support and questions:
- Email: ksk185246@gmail.com
- Phone: +91 8933853880
- GitHub Issues: Create an issue
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with modern web technologies
- Inspired by the need for secure file sharing
- Thanks to the open-source community
Made with β€οΈ by Shubham Kahar