ByteBridge is a peer-to-peer file transfer application built using React, TypeScript, and Vite on the frontend, and Node.js with Socket.IO on the backend. It allows users to share files directly from their browser without relying on a central server for file storage.
- Peer-to-peer file transfer using WebRTC (via PeerJS).
- Real-time communication with Socket.IO.
- Simple and intuitive user interface.
- No file size restrictions (limited only by browser and network capabilities).
backend/
server.ts # Backend server using Express and Socket.IO
package.json # Backend dependencies and scripts
tsconfig.json # TypeScript configuration for the backend
frontend/
src/
App.tsx # Main React component for the application
main.tsx # Entry point for the React app
index.css # Global styles
public/
vite.svg # Favicon
package.json # Frontend dependencies and scripts
tsconfig.json # TypeScript configuration for the frontend
vite.config.ts # Vite configuration
-
Clone the repository:
git clone https://github.com/your-username/bytebridge.git cd bytebridge -
Install dependencies for both the backend and frontend:
# Install backend dependencies cd backend npm install # Install frontend dependencies cd ../frontend npm install
-
Start the backend server:
cd backend npm run startThe backend server will run on
http://localhost:3000. -
Start the frontend development server:
cd frontend npm run devThe frontend will be available at
http://localhost:5173.
To build the frontend for production:
cd frontend
npm run buildThe production-ready files will be available in the frontend/dist directory.
To lint the frontend code:
cd frontend
npm run lint- Open the application in your browser at
http://localhost:5173. - Upload a file to generate a shareable link.
- Share the link with the receiver.
- The receiver can use the link to download the file directly.
- React
- TypeScript
- Vite
- PeerJS
- Socket.IO Client
- Node.js
- Express
- Socket.IO
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.