Windows PowerShell:
.\start-all.ps1Windows Command Prompt:
start-all.batThis will automatically start both backend and frontend servers!
-
Open a terminal/command prompt
-
Navigate to backend directory:
cd backend -
Activate virtual environment:
# PowerShell ..\venv\Scripts\Activate.ps1 # OR Command Prompt ..\venv\Scripts\activate.bat
-
Start the server:
uvicorn main:app --reload --host 0.0.0.0 --port 8000
✅ Backend will be running at:
http://localhost:8000
-
Open a NEW terminal/command prompt
-
Navigate to frontend directory:
cd frontend -
Start the React app:
npm start
✅ Frontend will automatically open at:
http://localhost:3000
Once both servers are running:
- Frontend (Main App): http://localhost:3000
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
If this is your first time running the project:
-
Install Backend Dependencies:
cd backend ..\venv\Scripts\Activate.ps1 pip install -r requirements.txt
-
Install Frontend Dependencies:
cd frontend npm install -
Setup Database:
- Make sure MySQL is running
- Create database:
CREATE DATABASE online_bookshop; - Update credentials in
backend/db.pyif needed
- ✅ Python 3.14+ installed
- ✅ Node.js 14+ and npm installed
- ✅ MySQL server running
- ✅ Virtual environment created (in
venv/folder)
Backend not starting?
- Check if MySQL is running
- Verify database credentials in
backend/db.py - Make sure virtual environment is activated
Frontend not starting?
- Run
npm installin the frontend folder - Check if port 3000 is available
Port already in use?
- Backend: Change port in command:
--port 8001 - Frontend: It will ask to use a different port automatically
# Start both servers (PowerShell)
.\start-all.ps1
# Start both servers (Command Prompt)
start-all.bat
# Start backend only
.\start-backend.ps1
# OR
start-backend.bat
# Start frontend only
.\start-frontend.ps1
# OR
start-frontend.batThat's it! Happy coding! 🎉