A modern, decentralized file sharing platform built with React, Socket.io, and Web3 technologies. eShare enables secure file uploads, encrypted storage on IPFS, real-time chat, and blockchain wallet integration.
- Secure File Upload: Upload files with optional end-to-end encryption
- IPFS Storage: Decentralized storage using IPFS (Pinata) for high availability
- Real-time Chat: Global chat functionality with Socket.io
- Online Users: See who's online in real-time
- User Profiles: Manage your profile with avatar support
- Wallet Integration: Connect with MetaMask, Coinbase Wallet, or WalletConnect
- Encryption: AES encryption for secure file sharing
- File Management: Download, share, and delete files with access control
- Dark/Light Theme: Toggle between themes
- Responsive Design: Works on desktop and mobile devices
- Payment Integration: Web3 payment support for premium features
- Settings Management: Customize your experience
- Developer Tools: Built-in developer utilities
- React 18 - UI framework
- Vite - Build tool
- Material-UI (MUI) - Component library
- React Router - Routing
- Socket.io Client - Real-time communication
- Web3.js - Blockchain interactions
- WalletConnect - Wallet connections
- Tailwind CSS - Styling
- Node.js - Runtime
- Express - Web framework
- Socket.io - WebSocket server
- Supabase - Database and authentication
- CORS - Cross-origin resource sharing
- IPFS (Pinata) - Decentralized file storage
- Supabase - User authentication and database
- Arweave - Permanent storage option
- Web3.Storage - Additional storage option
- Node.js 18+ and npm
- A Supabase account and project
- A Pinata account for IPFS storage
- A WalletConnect Cloud project (for wallet connections)
- Git
git clone https://github.com/yourusername/eshare.git
cd eshareFrontend:
npm installBackend:
cd backend
npm install
cd ..Create a .env file in the root directory:
# Socket.io Backend URL
VITE_SOCKET_URL=http://localhost:3002
# Supabase Configuration
VITE_SUPABASE_URL=your_supabase_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
# Pinata IPFS Configuration
VITE_PINATA_API_KEY=your_pinata_api_key
VITE_PINATA_SECRET_KEY=your_pinata_secret_key
# WalletConnect Configuration
VITE_WALLET_CONNECT_PROJECT_ID=your_walletconnect_project_id
# App Configuration
VITE_APP_NAME=eShare
VITE_APP_VERSION=2.0.0
VITE_APP_DESCRIPTION=Secure Decentralized File Sharing Platform
# Development Configuration
VITE_DEV_MODE=true
VITE_DEBUG_MODE=falseCreate a backend/.env file:
# Supabase Configuration
SUPABASE_URL=your_supabase_url
SUPABASE_SERVICE_KEY=your_supabase_service_key
# Server Configuration
FRONTEND_URL=http://localhost:5173
PORT=3002- Create a Supabase project at supabase.com
- Create the following tables:
user_profiles- User profile informationchat_messages- Chat message historyfiles- File metadata (if using Supabase for file tracking)
Start the backend server:
cd backend
npm start
# or for development with auto-reload:
npm run devStart the frontend (in a new terminal):
npm run devThe application will be available at:
- Frontend:
http://localhost:5173 - Backend:
http://localhost:3002
-
Create a Web Service on Render:
- Go to Render Dashboard
- Click "New +" β "Web Service"
- Connect your GitHub repository
-
Configure the service:
- Name:
eshare-backend - Root Directory:
backend - Environment:
Node - Build Command:
npm install - Start Command:
npm start
- Name:
-
Set Environment Variables:
NODE_ENV=productionSUPABASE_URL= Your Supabase URLSUPABASE_SERVICE_KEY= Your Supabase service keyFRONTEND_URL= Your frontend URL (e.g.,https://your-app.vercel.app)
-
Deploy:
- Render will automatically build and deploy
- Copy the service URL (e.g.,
https://eshare-backend.onrender.com)
-
Connect to Vercel:
- Go to Vercel Dashboard
- Import your GitHub repository
-
Configure Environment Variables:
- Add all
VITE_*variables from your.envfile - Update
VITE_SOCKET_URLto your Render backend URL
- Add all
-
Deploy:
- Vercel will automatically detect Vite and deploy
- Your app will be available at
https://your-app.vercel.app
- Go to WalletConnect Cloud
- Add your production domain to allowed domains:
your-app.vercel.applocalhost:5173(for development)
eshare/
βββ backend/ # Backend server
β βββ socketchat.js # Socket.io server
β βββ package.json
β βββ render.yaml # Render deployment config
βββ src/
β βββ components/ # React components
β β βββ auth/ # Authentication components
β β βββ files/ # File management components
β β βββ Globalchat/ # Chat components
β β βββ profile/ # User profile components
β β βββ wallet/ # Wallet connection components
β βββ services/ # Business logic services
β β βββ auth/ # Authentication service
β β βββ files/ # File service
β β βββ socket/ # Socket.io service
β β βββ wallet/ # Wallet service
β βββ App.jsx # Main app component
β βββ main.jsx # Entry point
βββ public/ # Static assets
βββ .env.example # Environment variables template
βββ vercel.json # Vercel deployment config
βββ package.json # Frontend dependencies
GET /health- Health check endpointGET /api/online-users- Get list of online usersGET /api/messages- Get chat message historyDELETE /api/messages- Delete all messages (admin only)
Client β Server:
user:join- User joins with their infomessage:send- Send a chat messagetyping:start- User starts typingtyping:stop- User stops typingmessages:load-older- Load older messagesmessages:delete- Delete chat history (admin only)
Server β Client:
user:online- New user came onlineuser:offline- User went offlineusers:list- List of all online usersmessage:new- New chat messagemessages:history- Chat message historymessages:older- Older messages loadedmessages:deleted- Messages were deletedtyping:user- User is typingtyping:stop- User stopped typing
- Encryption: Files are encrypted using AES before upload
- CORS: Configured to allow only trusted origins
- Authentication: Supabase authentication for user management
- Environment Variables: Sensitive data stored in environment variables
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License.
- Deepanik - Initial work
- Prateek - Contributions
- Credit to Kumud for inspiration
- Material-UI for the component library
- Supabase for authentication and database
- Pinata for IPFS storage
- WalletConnect for wallet integration
For support, email your-email@example.com or open an issue in the repository.
Made with β€οΈ using React, Socket.io, and Web3 technologies