This is a simple gift shop website implemented using Django and React.
- Python 3.10.12+
- Django 5.0+
- djangorestframework 3.14.0+
- Markdown 3.5.1+
- django-filter 23.5+
- psycopg2 2.9.9
- python-dotenv 1.0.0
- node 21.6.1+
- React 17.0.2+
- Install Docker and Docker Compose
- Clone the repo
git clone https://github.com/mahnooshr/Web-Team
- Go to the project directory
cd Web-Team/project
- Create a
.env.dev
and add the following environment variablesSECRET_KEY=your_secret_key DEBUG=True DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1] DJANGO_SUPERUSER_USERNAME=your_username DJANGO_SUPERUSER_EMAIL=your_email DJANGO_SUPERUSER_PASSWORD=your_password SQL_ENGINE=django.db.backends.postgresql SQL_DATABASE=gshopdb SQL_USER=your_db_username SQL_PASSWORD=your_db_password SQL_HOST=db SQL_PORT=5432 DATABASE=postgres BACKEND_HOST=localhost:8000
- Build the docker image
docker-compose build
- Run the server
docker-compose up
- Open your browser and go to
http://localhost/
- Clone the repo
git clone
- Go to the backend directory
cd Web-Team/project/backend
- Create a virtual environment
python3 -m venv venv
- Activate the virtual environment
source venv/bin/activate
- Install the required packages
pip install -r requirements.txt
- Create a
.env
file and add the following environment variablesSECRET_KEY=your_secret_key DEBUG=True DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1] DJANGO_SUPERUSER_USERNAME=your_username DJANGO_SUPERUSER_EMAIL=your_email DJANGO_SUPERUSER_PASSWORD=your_password SQL_ENGINE=django.db.backends.postgresql SQL_DATABASE=gshopdb SQL_USER=your_db_username SQL_PASSWORD=your_db_password SQL_HOST=db SQL_PORT=5432 DATABASE=postgres BACKEND_HOST=localhost:8000
- Create the database
python manage.py migrate
- Create a superuser
python manage.py createsuperuser
- Run the server
python manage.py runserver
- Go to the frontend directory
cd ../frontend
- Install the required packages
npm install
- Run the frontend
npm start
- Open your browser and go to
http://localhost:3000/