First, verify you have everything installed:
# Check Python (should show version 3.10 or higher)
python --version
# Check Node.js (should show version 16 or higher)
node --version
# Check npm
npm --versionIf any are missing, install them first.
Open PowerShell and run:
cd "C:\Users\Mukesh\Desktop\CN Project\server"
pip install -r requirements.txtExpected output: Packages install successfully (fastapi, uvicorn, etc.)
In a NEW PowerShell window:
cd "C:\Users\Mukesh\Desktop\CN Project\frontend"
npm installExpected output: node_modules folder is created, packages install
Wait for this to complete (may take 1-2 minutes)
In a NEW PowerShell window (Terminal 1):
cd "C:\Users\Mukesh\Desktop\CN Project\server"
python tcp_server.py 9000Expected output:
INFO - FT-Echo server listening on ('0.0.0.0', 9000)
IMPORTANT: Keep this window open! The server must stay running.
In a NEW PowerShell window (Terminal 2):
cd "C:\Users\Mukesh\Desktop\CN Project\server"
python fastapi_app.pyExpected output:
INFO: Started server process
INFO: Uvicorn running on http://0.0.0.0:8000
IMPORTANT: Keep this window open too!
In a NEW PowerShell window (Terminal 3):
cd "C:\Users\Mukesh\Desktop\CN Project\frontend"
npm startExpected output:
- Browser should automatically open to http://localhost:3000
- If not, manually open: http://localhost:3000
IMPORTANT: Keep this window open!
You should now have 3 PowerShell windows open:
- Terminal 1: TCP Server (port 9000) - showing server logs
- Terminal 2: FastAPI Server (port 8000) - showing uvicorn logs
- Terminal 3: React App (port 3000) - showing npm/react logs
Open a browser and go to: http://localhost:8000/api/list
You should see JSON like:
{"ok":true,"files":[]}If you see this, the backend is working!
- Go to http://localhost:3000 (should already be open)
- Click the "Refresh" button in the "Server Files" section
- The error should disappear and show "No files on server" (which is correct - no files uploaded yet)
- In the React interface, click "Choose File" in the "Upload File" section
- Select any file from your computer (e.g., a text file, image, etc.)
- The file will upload automatically
- You should see:
- Progress bar during upload
- Success message with SHA256 checksum
- File appears in the "Server Files" list
- In the "Server Files" section, click "Download" next to any file
- The file should download to your browser's download folder
- You'll see a success message with SHA256 checksum
Solution:
- Check if FastAPI is running (Terminal 2) - should show uvicorn logs
- Check if TCP server is running (Terminal 1) - should show server logs
- Try accessing http://localhost:8000/api/list directly in browser
- If that doesn't work, restart both servers
Solution:
- Close all PowerShell windows
- Check if ports are in use:
netstat -an | findstr "9000" netstat -an | findstr "8000" netstat -an | findstr "3000"
- If ports are in use, kill the processes or use different ports
Solution:
- Make sure Python is installed:
python --version - If not installed, download from python.org
- Make sure Python is in your PATH
Solution:
- Make sure Node.js is installed:
node --version - Try clearing cache:
npm cache clean --force - Delete
node_modulesfolder andpackage-lock.json, then runnpm installagain
Solution:
- Make sure TCP server (Terminal 1) is running first
- Check the TCP server logs for errors
- Restart TCP server, then restart FastAPI
# Terminal 1: TCP Server
cd "C:\Users\Mukesh\Desktop\CN Project\server"
python tcp_server.py 9000
# Terminal 2: FastAPI (wait 2 seconds after starting TCP server)
cd "C:\Users\Mukesh\Desktop\CN Project\server"
python fastapi_app.py
# Terminal 3: React (wait 2 seconds after starting FastAPI)
cd "C:\Users\Mukesh\Desktop\CN Project\frontend"
npm start- Python dependencies installed (
pip install -r requirements.txtsucceeded) - Node.js dependencies installed (
npm installsucceeded) - TCP server running (Terminal 1 shows "listening on port 9000")
- FastAPI server running (Terminal 2 shows "Uvicorn running on port 8000")
- React app running (Terminal 3 shows "Compiled successfully")
- Browser shows http://localhost:3000 without errors
- http://localhost:8000/api/list returns JSON
- React interface shows "No files on server" (not "Network Error")
- Can upload a file successfully
- Can download a file successfully
You should see:
- ✅ No "Network Error" message
- ✅ "No files on server" or list of files
- ✅ Can upload files with progress bar
- ✅ Can download files
- ✅ SHA256 checksums displayed after transfers
Check the logs:
- TCP Server logs:
server/logs/server.log - FastAPI logs: Terminal 2 output
- React logs: Terminal 3 output
- Browser console: Press F12 in browser, check Console tab