For Testing purposes of website.
Follow these steps to set up and run both the Django backend and React frontend on your local machine.
Make sure you have the following installed on your system:
✅ Python (3.x)
✅ Node.js (latest LTS recommended)
✅ Git
First, clone the repository to your local machine:
git clone https://github.com/Quartz1605/GROCERO-Test.git1️⃣ Navigate to the backend directory:
cd Backend2️⃣ Create a virtual environment:
pip install virtualenvvirtualenv venv3️⃣ Activate the virtual environment:
Windows:
venv\Scripts\activate4️⃣ Install dependencies:
pip install -r requirements.txt5️⃣ Apply migrations:
python manage.py migrate
6️⃣ Create a superuser (optional but recommended):
python manage.py createsuperuserFollow the prompts to set up an admin user.
7️⃣ Start the Django server:
python manage.py runserverYour Django backend should now be running at http://127.0.0.1:8000/
1️⃣ Open a new terminal and navigate to the frontend directory:
2️⃣ Install dependencies:
npm install3️⃣ Start the development server:
npm run devYour React frontend should now be running at http://localhost:5173/
Now, both the Django backend and React frontend should be up and running. 🚀