Django React E-commerce Frontend can be access at https://github.com/auriorajaa/django_react_ecommerce_frontend
This is the backend repository for Upfront, a multi-vendor e-commerce platform built with Django Rest Framework. This backend provides RESTful APIs to support the e-commerce functionality including user authentication, product management, order processing, and payment integration.
- Python 3.8 or higher
- pip (Python package manager)
- PostgreSQL (recommended for production)
- Clone the repository
git clone https://github.com/auriorajaa/django_react_ecommerce_backend.git
cd django_react_ecommerce_backend- Create and activate a virtual environment
python -m venv venv
# On Windows
venv\Scripts\activate
# On macOS/Linux
source venv/bin/activate- Install dependencies
pip install -r requirements.txt- Create
.envfile Create a.envfile in the root directory and add the following environment variables:
STRIPE_PUBLIC_KEY=your_stripe_public_key
STRIPE_SECRET_KEY=your_stripe_secret_key
PAYPAL_CLIENT_ID=your_paypal_client_id
PAYPAL_SECRET_ID=your_paypal_secret_id
MAILERSEND_API_KEY=your_mailersend_api_key
MAILERSEND_SENDER_DOMAIN=your_sender_domain
FROM_EMAIL=your_from_email
EMAIL_BACKEND=anymail.backends.mailersend.EmailBackend
DEFAULT_FROM_EMAIL=your_default_from_email
SERVER_EMAIL=your_server_email
- Run database migrations
python manage.py migrate- Create a superuser (admin)
python manage.py createsuperuser- Start the development server
python manage.py runserverThe server will start at http://localhost:8000
Once the server is running, you can access the API documentation at:
- Swagger UI:
http://localhost:8000/
This backend integrates with both Stripe and PayPal for payment processing. Make sure to:
- Set up accounts with Stripe and PayPal
- Obtain the necessary API keys
- Add them to your
.envfile
The project uses MailerSend for email services. Ensure you:
- Have a MailerSend account
- Configure your sender domain
- Add the API key and domain to your
.envfile
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details