Luxora is an e-commerce platform built using Next.js, Django, GraphQL (Strawberry), and Chokidar. The platform supports user authentication, product management, and a shopping cart. Admins can manage products via the Django admin panel, and users can browse products, add them to their cart, and receive order confirmation emails upon checkout. The website is highly responsive and can be accessed through mobile phones.
- User Authentication: Register and log in using GraphQL mutations.
- Admin Panel: Add, update, and delete products via Django Admin.
- Product Selection: Browse products in the shop section.
- Add to Cart: Only logged-in users can add products to their cart.
- Checkout with Email Notification: Users receive an email upon successful checkout.
- GraphQL API: Efficient querying with Strawberry GraphQL.
- Real-time File Watching: Chokidar monitors changes in the backend.
- Testing: The application is tested using Vitest, Cypress, and Django’s Unittest framework.
- Frontend: Next.js
- Backend: Django, Strawberry GraphQL
- Database: PostgreSQL (or SQLite for development)
- File Watching: Chokidar
- Testing: Vitest (Frontend), Cypress (End-to-End), Django Unittest (Backend)
Ensure you have the following installed:
- Python 3.8+
- Node.js 16+
- PostgreSQL (optional, SQLite can be used for development)
-
Clone the repository:
git https://github.com/akdswordguy/Team2_DreamTEAM.git
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt
-
Apply migrations:
python manage.py migrate
-
Start the backend server:
python manage.py runserver
- Navigate to the frontend directory:
cd shoppingapp/ - Install dependencies:
npm install
- Start the Next.js development server:
npm run dev
- Django Unittest:
python manage.py test
- Vitest:
npm run test - Cypress (E2E Testing):
npx run cypress
mutation {
register(
username: "testuser"
email: "testuser@example.com"
password: "securepassword"
)
}Response:
{
"data": {
"register": "User testuser registered successfully!"
}
}mutation {
login(username: "testuser", password: "securepassword")
}Response:
{
"data": {
"login": true
}
}query {
allProducts {
id
name
price
stock
category {
id
name
}
}
}Once the user clicks checkout, an email will be sent confirming their purchase.
To manage products, navigate to:
http://127.0.0.1:8000/admin/
Log in using the superuser credentials created earlier.
This project is licensed under the Apache License.