├── B20EN0606 - CMOS VLSI CIRCUITS LAB.pdf ├── DSP_LAB_MANUAL_20_24_BATCH.pdf ├── arkbackend ├── app │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-39.pyc │ │ ├── admin.cpython-39.pyc │ │ ├── apps.cpython-39.pyc │ │ ├── models.cpython-39.pyc │ │ ├── products.cpython-39.pyc │ │ ├── serializer.cpython-39.pyc │ │ ├── signals.cpython-39.pyc │ │ ├── urls.cpython-39.pyc │ │ └── views.cpython-39.pyc │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── 0002_order_orderitem_review_shippingaddress.py │ │ ├── __init__.py │ │ └── __pycache__ │ │ │ ├── 0001_initial.cpython-39.pyc │ │ │ ├── 0002_order_orderitem_review_shippingaddress.cpython-39.pyc │ │ │ └── __init__.cpython-39.pyc │ ├── models.py │ ├── products.py │ ├── serializer.py │ ├── signals.py │ ├── tests.py │ ├── urls.py │ └── views.py ├── arkbackend │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-39.pyc │ │ ├── settings.cpython-39.pyc │ │ ├── urls.cpython-39.pyc │ │ └── wsgi.cpython-39.pyc │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py ├── db.sqlite3 ├── manage.py └── static │ └── images │ ├── airpods.jpg │ ├── alexa.jpg │ ├── camera.jpg │ └── phone.jpg └── arkfrontend ├── .gitignore ├── README.md ├── package-lock.json ├── package.json ├── public ├── favicon.ico ├── images │ ├── airpods.jpg │ ├── alexa.jpg │ ├── camera.jpg │ ├── mouse.jpg │ ├── phone.jpg │ ├── playstation.jpg │ └── sample.jpg ├── index.html ├── logo192.png ├── logo512.png ├── manifest.json └── robots.txt └── src ├── App.css ├── App.js ├── App.test.js ├── actions ├── cartActions.js ├── productAction.js └── userActions.js ├── bootstrap.min.css ├── components ├── Footer.js ├── FormContainer.js ├── Header.js ├── Loader.js ├── Message.js ├── Product.js ├── Rating.js └── screens │ ├── CartScreen.js │ ├── HomeScreen.js │ ├── LoginScreen.js │ ├── ProductScreen.js │ └── RegisterScreen.js ├── constants ├── cartConstants.js ├── productConstants.js └── userConstants.js ├── index.css ├── index.js ├── logo.svg ├── products.js ├── reducers ├── cartReducers.js ├── productReducers.js └── userReducers.js ├── reportWebVitals.js ├── setupTests.js └── store.js /B20EN0606 - CMOS VLSI CIRCUITS LAB.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/B20EN0606 - CMOS VLSI CIRCUITS LAB.pdf -------------------------------------------------------------------------------- /DSP_LAB_MANUAL_20_24_BATCH.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/DSP_LAB_MANUAL_20_24_BATCH.pdf -------------------------------------------------------------------------------- /arkbackend/app/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkbackend/app/__init__.py -------------------------------------------------------------------------------- /arkbackend/app/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkbackend/app/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /arkbackend/app/__pycache__/admin.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkbackend/app/__pycache__/admin.cpython-39.pyc -------------------------------------------------------------------------------- /arkbackend/app/__pycache__/apps.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkbackend/app/__pycache__/apps.cpython-39.pyc -------------------------------------------------------------------------------- /arkbackend/app/__pycache__/models.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkbackend/app/__pycache__/models.cpython-39.pyc -------------------------------------------------------------------------------- /arkbackend/app/__pycache__/products.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkbackend/app/__pycache__/products.cpython-39.pyc -------------------------------------------------------------------------------- /arkbackend/app/__pycache__/serializer.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkbackend/app/__pycache__/serializer.cpython-39.pyc -------------------------------------------------------------------------------- /arkbackend/app/__pycache__/signals.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkbackend/app/__pycache__/signals.cpython-39.pyc -------------------------------------------------------------------------------- /arkbackend/app/__pycache__/urls.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkbackend/app/__pycache__/urls.cpython-39.pyc -------------------------------------------------------------------------------- /arkbackend/app/__pycache__/views.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkbackend/app/__pycache__/views.cpython-39.pyc -------------------------------------------------------------------------------- /arkbackend/app/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from app.models import * 3 | # Register your models here. 4 | 5 | admin.site.register(Product) 6 | admin.site.register(Order) 7 | admin.site.register(OrderItem) 8 | admin.site.register(ShippingAddress) 9 | admin.site.register(Review) -------------------------------------------------------------------------------- /arkbackend/app/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'app' 7 | 8 | def ready(self): 9 | import app.signals 10 | -------------------------------------------------------------------------------- /arkbackend/app/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.6 on 2021-08-30 11:04 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | initial = True 11 | 12 | dependencies = [ 13 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 14 | ] 15 | 16 | operations = [ 17 | migrations.CreateModel( 18 | name='Product', 19 | fields=[ 20 | ('name', models.CharField(blank=True, max_length=200, null=True)), 21 | ('image', models.ImageField(blank=True, null=True, upload_to='')), 22 | ('brand', models.CharField(blank=True, max_length=200, null=True)), 23 | ('category', models.CharField(blank=True, max_length=200, null=True)), 24 | ('description', models.TextField(blank=True, null=True)), 25 | ('rating', models.DecimalField(blank=True, decimal_places=2, max_digits=7, null=True)), 26 | ('numReviews', models.IntegerField(blank=True, default=0, null=True)), 27 | ('price', models.DecimalField(blank=True, decimal_places=2, max_digits=7, null=True)), 28 | ('countInStock', models.IntegerField(blank=True, default=0, null=True)), 29 | ('createdAt', models.DateTimeField(auto_now_add=True)), 30 | ('_id', models.AutoField(editable=False, primary_key=True, serialize=False)), 31 | ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)), 32 | ], 33 | ), 34 | ] 35 | -------------------------------------------------------------------------------- /arkbackend/app/migrations/0002_order_orderitem_review_shippingaddress.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.6 on 2021-08-30 11:23 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 12 | ('app', '0001_initial'), 13 | ] 14 | 15 | operations = [ 16 | migrations.CreateModel( 17 | name='Order', 18 | fields=[ 19 | ('paymentMethod', models.CharField(blank=True, max_length=200, null=True)), 20 | ('taxPrice', models.DecimalField(blank=True, decimal_places=2, max_digits=7, null=True)), 21 | ('shippingPrice', models.DecimalField(blank=True, decimal_places=2, max_digits=7, null=True)), 22 | ('totalPrice', models.DecimalField(blank=True, decimal_places=2, max_digits=7, null=True)), 23 | ('isPaid', models.BooleanField(default=False)), 24 | ('paidAt', models.DateTimeField(blank=True, null=True)), 25 | ('isDelivered', models.BooleanField(default=False)), 26 | ('deliveredAt', models.DateTimeField(blank=True, null=True)), 27 | ('createdAt', models.DateTimeField(auto_now_add=True)), 28 | ('_id', models.AutoField(editable=False, primary_key=True, serialize=False)), 29 | ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)), 30 | ], 31 | ), 32 | migrations.CreateModel( 33 | name='ShippingAddress', 34 | fields=[ 35 | ('address', models.CharField(blank=True, max_length=200, null=True)), 36 | ('city', models.CharField(blank=True, max_length=200, null=True)), 37 | ('postalCode', models.CharField(blank=True, max_length=200, null=True)), 38 | ('country', models.CharField(blank=True, max_length=200, null=True)), 39 | ('shippingPrice', models.DecimalField(blank=True, decimal_places=2, max_digits=7, null=True)), 40 | ('_id', models.AutoField(editable=False, primary_key=True, serialize=False)), 41 | ('order', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.order')), 42 | ], 43 | ), 44 | migrations.CreateModel( 45 | name='Review', 46 | fields=[ 47 | ('name', models.CharField(blank=True, max_length=200, null=True)), 48 | ('rating', models.IntegerField(blank=True, default=0, null=True)), 49 | ('comment', models.TextField(blank=True, null=True)), 50 | ('_id', models.AutoField(editable=False, primary_key=True, serialize=False)), 51 | ('product', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='app.product')), 52 | ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)), 53 | ], 54 | ), 55 | migrations.CreateModel( 56 | name='OrderItem', 57 | fields=[ 58 | ('name', models.CharField(blank=True, max_length=200, null=True)), 59 | ('qty', models.IntegerField(blank=True, default=0, null=True)), 60 | ('price', models.DecimalField(blank=True, decimal_places=2, max_digits=7, null=True)), 61 | ('image', models.CharField(blank=True, max_length=200, null=True)), 62 | ('_id', models.AutoField(editable=False, primary_key=True, serialize=False)), 63 | ('order', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='app.order')), 64 | ('product', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='app.product')), 65 | ], 66 | ), 67 | ] 68 | -------------------------------------------------------------------------------- /arkbackend/app/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkbackend/app/migrations/__init__.py -------------------------------------------------------------------------------- /arkbackend/app/migrations/__pycache__/0001_initial.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkbackend/app/migrations/__pycache__/0001_initial.cpython-39.pyc -------------------------------------------------------------------------------- /arkbackend/app/migrations/__pycache__/0002_order_orderitem_review_shippingaddress.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkbackend/app/migrations/__pycache__/0002_order_orderitem_review_shippingaddress.cpython-39.pyc -------------------------------------------------------------------------------- /arkbackend/app/migrations/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkbackend/app/migrations/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /arkbackend/app/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.contrib.auth.models import User 3 | 4 | class Product(models.Model): 5 | user=models.ForeignKey(User,on_delete=models.SET_NULL,null=True) 6 | name=models.CharField(max_length=200,null=True,blank=True) 7 | image=models.ImageField(null=True,blank=True) 8 | brand=models.CharField(max_length=200,null=True,blank=True) 9 | category=models.CharField(max_length=200,null=True,blank=True) 10 | description=models.TextField(null=True,blank=True) 11 | rating=models.DecimalField(max_digits=7,decimal_places=2,null=True,blank=True) 12 | numReviews=models.IntegerField(null=True,blank=True,default=0) 13 | price=models.DecimalField(max_digits=7,decimal_places=2,null=True,blank=True) 14 | countInStock=models.IntegerField(null=True,blank=True,default=0) 15 | createdAt=models.DateTimeField(auto_now_add=True) 16 | _id=models.AutoField(primary_key=True,editable=False) 17 | 18 | def __str__(self): 19 | return self.name 20 | 21 | class Review(models.Model): 22 | product=models.ForeignKey(Product,on_delete=models.SET_NULL,null=True) 23 | user=models.ForeignKey(User,on_delete=models.SET_NULL,null=True) 24 | name=models.CharField(max_length=200,null=True,blank=True) 25 | rating=models.IntegerField(null=True,blank=True,default=0) 26 | comment=models.TextField(null=True,blank=True) 27 | _id=models.AutoField(primary_key=True,editable=False) 28 | 29 | def __str__(self): 30 | return str(self.rating) 31 | 32 | 33 | class Order(models.Model): 34 | user=models.ForeignKey(User,on_delete=models.SET_NULL,null=True) 35 | paymentMethod=models.CharField(max_length=200,null=True,blank=True) 36 | taxPrice=models.DecimalField(max_digits=7,decimal_places=2,null=True,blank=True) 37 | shippingPrice=models.DecimalField(max_digits=7,decimal_places=2,null=True,blank=True) 38 | totalPrice=models.DecimalField(max_digits=7,decimal_places=2,null=True,blank=True) 39 | isPaid=models.BooleanField(default=False) 40 | paidAt=models.DateTimeField(auto_now_add=False,null=True,blank=True) 41 | isDelivered=models.BooleanField(default=False) 42 | deliveredAt=models.DateTimeField(auto_now_add=False,null=True,blank=True) 43 | createdAt=models.DateTimeField(auto_now_add=True) 44 | _id=models.AutoField(primary_key=True,editable=False) 45 | 46 | 47 | def __str__(self): 48 | return str(self.createdAt) 49 | 50 | 51 | class OrderItem(models.Model): 52 | product=models.ForeignKey(Product,on_delete=models.SET_NULL,null=True) 53 | order=models.ForeignKey(Order,on_delete=models.SET_NULL,null=True) 54 | name=models.CharField(max_length=200,null=True,blank=True) 55 | qty=models.IntegerField(null=True,blank=True,default=0) 56 | price=models.DecimalField(max_digits=7,decimal_places=2,null=True,blank=True) 57 | image=models.CharField(max_length=200,null=True,blank=True) 58 | _id=models.AutoField(primary_key=True,editable=False) 59 | 60 | 61 | def __str__(self): 62 | return self.name 63 | 64 | class ShippingAddress(models.Model): 65 | order=models.OneToOneField(Order,on_delete=models.CASCADE,null=True,blank=True) 66 | address=models.CharField(max_length=200,null=True,blank=True) 67 | city=models.CharField(max_length=200,null=True,blank=True) 68 | postalCode=models.CharField(max_length=200,null=True,blank=True) 69 | country=models.CharField(max_length=200,null=True,blank=True) 70 | shippingPrice=models.DecimalField(max_digits=7,decimal_places=2,null=True,blank=True) 71 | _id=models.AutoField(primary_key=True,editable=False) 72 | 73 | def __str__(self): 74 | return self.address -------------------------------------------------------------------------------- /arkbackend/app/products.py: -------------------------------------------------------------------------------- 1 | products = [ 2 | { 3 | '_id': '1', 4 | 'name': 'Airpods Wireless Bluetooth Headphones', 5 | 'image': '/images/airpods.jpg', 6 | 'description': 7 | 'Bluetooth technology lets you connect it with compatible devices wirelessly High-quality AAC audio offers immersive listening experience Built-in microphone allows you to take calls while working', 8 | 'brand': 'Apple', 9 | 'category': 'Electronics', 10 | 'price': 89.99, 11 | 'countInStock': 5, 12 | 'rating': 4.5, 13 | 'numReviews': 12, 14 | }, 15 | { 16 | '_id': '2', 17 | 'name': 'iPhone 11 Pro 256GB Memory', 18 | 'image': '/images/phone.jpg', 19 | 'description': 20 | 'Introducing the iPhone 11 Pro. A transformative triple-camera system that adds tons of capability without complexity. An unprecedented leap in battery life', 21 | 'brand': 'Apple', 22 | 'category': 'Electronics', 23 | 'price': 599.99, 24 | 'countInStock': 7, 25 | 'rating': 4.0, 26 | 'numReviews': 8, 27 | }, 28 | { 29 | '_id': '3', 30 | 'name': 'Cannon EOS 80D DSLR Camera', 31 | 'image': '/images/camera.jpg', 32 | 'description': 33 | 'Characterized by versatile imaging specs, the Canon EOS 80D further clarifies itself using a pair of robust focusing systems and an intuitive design', 34 | 'brand': 'Cannon', 35 | 'category': 'Electronics', 36 | 'price': 929.99, 37 | 'countInStock': 5, 38 | 'rating': 3, 39 | 'numReviews': 12, 40 | }, 41 | { 42 | '_id': '4', 43 | 'name': 'Sony Playstation 4 Pro White Version', 44 | 'image': '/images/playstation.jpg', 45 | 'description': 46 | 'The ultimate home entertainment center starts with PlayStation. Whether you are into gaming, HD movies, television, music', 47 | 'brand': 'Sony', 48 | 'category': 'Electronics', 49 | 'price': 399.99, 50 | 'countInStock': 11, 51 | 'rating': 5, 52 | 'numReviews': 12, 53 | }, 54 | { 55 | '_id': '5', 56 | 'name': 'Logitech G-Series Gaming Mouse', 57 | 'image': '/images/mouse.jpg', 58 | 'description': 59 | 'Get a better handle on your games with this Logitech LIGHTSYNC gaming mouse. The six programmable buttons allow customization for a smooth playing experience', 60 | 'brand': 'Logitech', 61 | 'category': 'Electronics', 62 | 'price': 49.99, 63 | 'countInStock': 7, 64 | 'rating': 3.5, 65 | 'numReviews': 10, 66 | }, 67 | { 68 | '_id': '6', 69 | 'name': 'Amazon Echo Dot 3rd Generation', 70 | 'image': '/images/alexa.jpg', 71 | 'description': 72 | 'Meet Echo Dot - Our most popular smart speaker with a fabric design. It is our most compact smart speaker that fits perfectly into small space', 73 | 'brand': 'Amazon', 74 | 'category': 'Electronics', 75 | 'price': 29.99, 76 | 'countInStock': 0, 77 | 'rating': 4, 78 | 'numReviews': 12, 79 | }, 80 | ] 81 | 82 | 83 | -------------------------------------------------------------------------------- /arkbackend/app/serializer.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from rest_framework import serializers 3 | from django.contrib.auth.models import User 4 | from app.models import Product 5 | from rest_framework_simplejwt.tokens import RefreshToken 6 | 7 | 8 | 9 | 10 | class ProductSerializer(serializers.ModelSerializer): 11 | class Meta: 12 | model=Product 13 | fields='__all__' 14 | 15 | 16 | # class UserSerializer(serializers.ModelSerializer): 17 | # class Meta: 18 | # model=User 19 | # fields=['id','username','email'] 20 | 21 | class UserSerializer(serializers.ModelSerializer): 22 | name=serializers.SerializerMethodField(read_only=True) 23 | _id=serializers.SerializerMethodField(read_only=True) 24 | isAdmin=serializers.SerializerMethodField(read_only=True) 25 | class Meta: 26 | model=User 27 | fields=['id','_id','username','email','name','isAdmin'] 28 | 29 | def get_name(self,obj): 30 | name=obj.first_name 31 | if name=="": 32 | name=obj.email 33 | return name 34 | 35 | def get__id(self,obj): 36 | return obj.id 37 | 38 | def get_isAdmin(self,obj): 39 | return obj.is_staff 40 | 41 | 42 | class UserSerializerWithToken(UserSerializer): 43 | token=serializers.SerializerMethodField(read_only=True) 44 | class Meta: 45 | model=User 46 | fields=['id','_id','username','email','name','isAdmin','token'] 47 | 48 | def get_token(self,obj): 49 | token=RefreshToken.for_user(obj) 50 | return str(token.access_token) 51 | 52 | -------------------------------------------------------------------------------- /arkbackend/app/signals.py: -------------------------------------------------------------------------------- 1 | from django.db.models.signals import pre_save 2 | from django.contrib.auth.models import User 3 | 4 | def updateUser(sender,instance,**kwargs): 5 | print('Signal Triggerd') 6 | user=instance 7 | if user.email!= '': 8 | user.username=user.email 9 | 10 | pre_save.connect(updateUser,sender=User) -------------------------------------------------------------------------------- /arkbackend/app/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /arkbackend/app/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from app import views 3 | from rest_framework_simplejwt.views import ( 4 | TokenObtainPairView, 5 | 6 | ) 7 | 8 | 9 | urlpatterns = [ 10 | path('',views.getRoutes,name="getRoutes"), 11 | path('users/register/',views.registerUser,name='register'), 12 | path('users/login/', TokenObtainPairView.as_view(), name='token_obtain_pair'), 13 | path('products/',views.getProducts,name="getProducts"), 14 | path('user/profile/',views.getUserProfiles,name="getUserProfiles"), 15 | path('products/',views.getProduct,name="getProduct"), 16 | path('users/',views.getUsers,name="getUsers"), 17 | ] 18 | -------------------------------------------------------------------------------- /arkbackend/app/views.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.models import User 2 | from app.models import Product 3 | from django.shortcuts import render 4 | from django.http import JsonResponse 5 | from rest_framework.permissions import IsAuthenticated,IsAdminUser 6 | from rest_framework.decorators import api_view,permission_classes 7 | from rest_framework.decorators import api_view 8 | from rest_framework.response import Response 9 | from rest_framework_simplejwt.serializers import TokenObtainPairSerializer 10 | from rest_framework_simplejwt.views import TokenObtainPairView 11 | # Create your views here. 12 | from rest_framework import status 13 | from django.contrib.auth.hashers import make_password 14 | from .serializer import ProductSerializer,UserSerializer,UserSerializerWithToken 15 | 16 | 17 | 18 | @api_view(['GET']) 19 | def getRoutes(request): 20 | return Response('Hello') 21 | 22 | @api_view(['GET']) 23 | def getProducts(request): 24 | products=Product.objects.all() 25 | serializer=ProductSerializer(products,many=True) 26 | return Response(serializer.data) 27 | 28 | @api_view(['GET']) 29 | def getProduct(request,pk): 30 | product=Product.objects.get(_id=pk) 31 | serializer=ProductSerializer(product,many=False) 32 | return Response(serializer.data) 33 | 34 | 35 | class MyTokenObtainPairSerializer(TokenObtainPairSerializer): 36 | 37 | def validate(self,attrs): 38 | data=super().validate(attrs) 39 | serializer = UserSerializerWithToken(self.user).data 40 | for k,v in serializer.items(): 41 | data[k]=v 42 | 43 | 44 | return data 45 | 46 | class MyTokenObtainPairView(TokenObtainPairView): 47 | serializer_class=MyTokenObtainPairSerializer 48 | 49 | 50 | 51 | 52 | @api_view(['GET']) 53 | @permission_classes([IsAuthenticated]) 54 | def getUserProfiles(request): 55 | user=request.user 56 | serializer=UserSerializer(user,many=False) 57 | return Response(serializer.data) 58 | 59 | 60 | @api_view(['GET']) 61 | @permission_classes([IsAdminUser]) 62 | def getUsers(request): 63 | user=User.objects.all() 64 | serializer=UserSerializer(user,many=True) 65 | return Response(serializer.data) 66 | 67 | 68 | # register the new users 69 | 70 | @api_view(['POST']) 71 | def registerUser(request): 72 | data=request.data 73 | print(data) 74 | try: 75 | 76 | user=User.objects.create( 77 | first_name=data['name'], 78 | username=data['email'], 79 | email=data['email'], 80 | password=make_password(data['password']) 81 | ) 82 | serializer=UserSerializerWithToken(user,many=False) 83 | return Response(serializer.data) 84 | except: 85 | message={'details':'USER WITH THIS EMAIL ALREADY EXIST'} 86 | return Response(message,status=status.HTTP_400_BAD_REQUEST) -------------------------------------------------------------------------------- /arkbackend/arkbackend/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkbackend/arkbackend/__init__.py -------------------------------------------------------------------------------- /arkbackend/arkbackend/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkbackend/arkbackend/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /arkbackend/arkbackend/__pycache__/settings.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkbackend/arkbackend/__pycache__/settings.cpython-39.pyc -------------------------------------------------------------------------------- /arkbackend/arkbackend/__pycache__/urls.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkbackend/arkbackend/__pycache__/urls.cpython-39.pyc -------------------------------------------------------------------------------- /arkbackend/arkbackend/__pycache__/wsgi.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkbackend/arkbackend/__pycache__/wsgi.cpython-39.pyc -------------------------------------------------------------------------------- /arkbackend/arkbackend/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for arkbackend project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'arkbackend.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /arkbackend/arkbackend/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for arkbackend project. 3 | 4 | Generated by 'django-admin startproject' using Django 3.2. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.2/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/3.2/ref/settings/ 11 | """ 12 | 13 | from pathlib import Path 14 | 15 | # Build paths inside the project like this: BASE_DIR / 'subdir'. 16 | BASE_DIR = Path(__file__).resolve().parent.parent 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = 'django-insecure-)e&1x=21e_z3jukwt&r%o!16e53-6b3p9_-$ff0(u&)hv58@kj' 24 | 25 | # SECURITY WARNING: don't run with debug turned on in production! 26 | DEBUG = True 27 | 28 | ALLOWED_HOSTS = [] 29 | 30 | 31 | # Application definition 32 | 33 | INSTALLED_APPS = [ 34 | 'django.contrib.admin', 35 | 'django.contrib.auth', 36 | 'django.contrib.contenttypes', 37 | 'django.contrib.sessions', 38 | 'django.contrib.messages', 39 | 'django.contrib.staticfiles', 40 | 'app.apps.AppConfig', 41 | 'rest_framework', 42 | 'corsheaders', 43 | ] 44 | 45 | REST_FRAMEWORK = { 46 | 47 | 'DEFAULT_AUTHENTICATION_CLASSES': ( 48 | 49 | 'rest_framework_simplejwt.authentication.JWTAuthentication', 50 | ) 51 | 52 | } 53 | 54 | MIDDLEWARE = [ 55 | 'corsheaders.middleware.CorsMiddleware', 56 | 'django.middleware.common.CommonMiddleware', 57 | 'django.middleware.security.SecurityMiddleware', 58 | 'django.contrib.sessions.middleware.SessionMiddleware', 59 | 'django.middleware.common.CommonMiddleware', 60 | 'django.middleware.csrf.CsrfViewMiddleware', 61 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 62 | 'django.contrib.messages.middleware.MessageMiddleware', 63 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 64 | ] 65 | 66 | 67 | 68 | from datetime import timedelta 69 | 70 | SIMPLE_JWT = { 71 | 'ACCESS_TOKEN_LIFETIME': timedelta(days=30), 72 | 'REFRESH_TOKEN_LIFETIME': timedelta(days=1), 73 | 'ROTATE_REFRESH_TOKENS': False, 74 | 'BLACKLIST_AFTER_ROTATION': True, 75 | 'UPDATE_LAST_LOGIN': False, 76 | 77 | 'ALGORITHM': 'HS256', 78 | 79 | 'VERIFYING_KEY': None, 80 | 'AUDIENCE': None, 81 | 'ISSUER': None, 82 | 'JWK_URL': None, 83 | 'LEEWAY': 0, 84 | 85 | 'AUTH_HEADER_TYPES': ('Bearer',), 86 | 'AUTH_HEADER_NAME': 'HTTP_AUTHORIZATION', 87 | 'USER_ID_FIELD': 'id', 88 | 'USER_ID_CLAIM': 'user_id', 89 | 'USER_AUTHENTICATION_RULE': 'rest_framework_simplejwt.authentication.default_user_authentication_rule', 90 | 91 | 'AUTH_TOKEN_CLASSES': ('rest_framework_simplejwt.tokens.AccessToken',), 92 | 'TOKEN_TYPE_CLAIM': 'token_type', 93 | 94 | 'JTI_CLAIM': 'jti', 95 | 96 | 'SLIDING_TOKEN_REFRESH_EXP_CLAIM': 'refresh_exp', 97 | 'SLIDING_TOKEN_LIFETIME': timedelta(minutes=5), 98 | 'SLIDING_TOKEN_REFRESH_LIFETIME': timedelta(days=1), 99 | } 100 | 101 | 102 | ROOT_URLCONF = 'arkbackend.urls' 103 | 104 | TEMPLATES = [ 105 | { 106 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 107 | 'DIRS': [], 108 | 'APP_DIRS': True, 109 | 'OPTIONS': { 110 | 'context_processors': [ 111 | 'django.template.context_processors.debug', 112 | 'django.template.context_processors.request', 113 | 'django.contrib.auth.context_processors.auth', 114 | 'django.contrib.messages.context_processors.messages', 115 | ], 116 | }, 117 | }, 118 | ] 119 | 120 | WSGI_APPLICATION = 'arkbackend.wsgi.application' 121 | 122 | 123 | # Database 124 | # https://docs.djangoproject.com/en/3.2/ref/settings/#databases 125 | 126 | DATABASES = { 127 | 'default': { 128 | 'ENGINE': 'django.db.backends.sqlite3', 129 | 'NAME': BASE_DIR / 'db.sqlite3', 130 | } 131 | } 132 | 133 | 134 | # Password validation 135 | # https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators 136 | 137 | AUTH_PASSWORD_VALIDATORS = [ 138 | { 139 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 140 | }, 141 | { 142 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 143 | }, 144 | { 145 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 146 | }, 147 | { 148 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 149 | }, 150 | ] 151 | 152 | 153 | # Internationalization 154 | # https://docs.djangoproject.com/en/3.2/topics/i18n/ 155 | 156 | LANGUAGE_CODE = 'en-us' 157 | 158 | TIME_ZONE = 'UTC' 159 | 160 | USE_I18N = True 161 | 162 | USE_L10N = True 163 | 164 | USE_TZ = True 165 | 166 | 167 | # Static files (CSS, JavaScript, Images) 168 | # https://docs.djangoproject.com/en/3.2/howto/static-files/ 169 | 170 | STATIC_URL = '/static/' 171 | 172 | STATICFILES_DIRS=[ 173 | BASE_DIR / 'static' 174 | ] 175 | 176 | MEDIA_URL= '/images/' 177 | 178 | MEDIA_ROOT='static/images' 179 | 180 | # Default primary key field type 181 | # https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field 182 | 183 | DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' 184 | 185 | CORS_ALLOW_ALL_ORIGINS =True -------------------------------------------------------------------------------- /arkbackend/arkbackend/urls.py: -------------------------------------------------------------------------------- 1 | """arkbackend URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/3.2/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.urls import include, path 14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 15 | """ 16 | from django.contrib import admin 17 | from django.urls import path,include 18 | from django.conf import settings 19 | from django.conf.urls.static import static 20 | 21 | 22 | urlpatterns = [ 23 | path('admin/', admin.site.urls), 24 | path('api/',include('app.urls')), 25 | ] 26 | 27 | urlpatterns += static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT) 28 | 29 | -------------------------------------------------------------------------------- /arkbackend/arkbackend/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for arkbackend project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'arkbackend.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /arkbackend/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkbackend/db.sqlite3 -------------------------------------------------------------------------------- /arkbackend/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | """Run administrative tasks.""" 9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'arkbackend.settings') 10 | try: 11 | from django.core.management import execute_from_command_line 12 | except ImportError as exc: 13 | raise ImportError( 14 | "Couldn't import Django. Are you sure it's installed and " 15 | "available on your PYTHONPATH environment variable? Did you " 16 | "forget to activate a virtual environment?" 17 | ) from exc 18 | execute_from_command_line(sys.argv) 19 | 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /arkbackend/static/images/airpods.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkbackend/static/images/airpods.jpg -------------------------------------------------------------------------------- /arkbackend/static/images/alexa.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkbackend/static/images/alexa.jpg -------------------------------------------------------------------------------- /arkbackend/static/images/camera.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkbackend/static/images/camera.jpg -------------------------------------------------------------------------------- /arkbackend/static/images/phone.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkbackend/static/images/phone.jpg -------------------------------------------------------------------------------- /arkfrontend/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /arkfrontend/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `npm start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 13 | 14 | The page will reload if you make edits.\ 15 | You will also see any lint errors in the console. 16 | 17 | ### `npm test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `npm run build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `npm run eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!** 35 | 36 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. 39 | 40 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `npm run build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /arkfrontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "arkfrontend", 3 | "proxy": "http://127.0.0.1:8000", 4 | "version": "0.1.0", 5 | "private": true, 6 | "dependencies": { 7 | "@testing-library/jest-dom": "^5.14.1", 8 | "@testing-library/react": "^11.2.7", 9 | "@testing-library/user-event": "^12.8.3", 10 | "axios": "^0.21.1", 11 | "react": "^17.0.2", 12 | "react-bootstrap": "^1.6.1", 13 | "react-dom": "^17.0.2", 14 | "react-redux": "^7.2.4", 15 | "react-router-bootstrap": "^0.25.0", 16 | "react-router-dom": "^5.2.1", 17 | "react-scripts": "4.0.3", 18 | "redux-devtools-extension": "^2.13.9", 19 | "redux-thunk": "^2.3.0", 20 | "web-vitals": "^1.1.2" 21 | }, 22 | "scripts": { 23 | "start": "react-scripts start", 24 | "build": "react-scripts build", 25 | "test": "react-scripts test", 26 | "eject": "react-scripts eject" 27 | }, 28 | "eslintConfig": { 29 | "extends": [ 30 | "react-app", 31 | "react-app/jest" 32 | ] 33 | }, 34 | "browserslist": { 35 | "production": [ 36 | ">0.2%", 37 | "not dead", 38 | "not op_mini all" 39 | ], 40 | "development": [ 41 | "last 1 chrome version", 42 | "last 1 firefox version", 43 | "last 1 safari version" 44 | ] 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /arkfrontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkfrontend/public/favicon.ico -------------------------------------------------------------------------------- /arkfrontend/public/images/airpods.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkfrontend/public/images/airpods.jpg -------------------------------------------------------------------------------- /arkfrontend/public/images/alexa.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkfrontend/public/images/alexa.jpg -------------------------------------------------------------------------------- /arkfrontend/public/images/camera.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkfrontend/public/images/camera.jpg -------------------------------------------------------------------------------- /arkfrontend/public/images/mouse.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkfrontend/public/images/mouse.jpg -------------------------------------------------------------------------------- /arkfrontend/public/images/phone.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkfrontend/public/images/phone.jpg -------------------------------------------------------------------------------- /arkfrontend/public/images/playstation.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkfrontend/public/images/playstation.jpg -------------------------------------------------------------------------------- /arkfrontend/public/images/sample.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkfrontend/public/images/sample.jpg -------------------------------------------------------------------------------- /arkfrontend/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 19 | 20 | 29 | React App 30 | 31 | 32 | 33 |
34 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /arkfrontend/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkfrontend/public/logo192.png -------------------------------------------------------------------------------- /arkfrontend/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arkprocoder/Django-react/40467caec1f18e95f787cf833ffa5412f828a7ee/arkfrontend/public/logo512.png -------------------------------------------------------------------------------- /arkfrontend/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /arkfrontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /arkfrontend/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /arkfrontend/src/App.js: -------------------------------------------------------------------------------- 1 | import "./App.css"; 2 | import { Container } from "react-bootstrap"; 3 | import { BrowserRouter as Router, Route } from "react-router-dom"; 4 | import Footer from "./components/Footer"; 5 | import Header from "./components/Header"; 6 | import HomeScreen from "./components/screens/HomeScreen"; 7 | import ProductScreen from "./components/screens/ProductScreen"; 8 | import CartScreen from "./components/screens/CartScreen"; 9 | import LoginScreen from './components/screens/LoginScreen'; 10 | import RegisterScreen from './components/screens/RegisterScreen'; 11 | 12 | 13 | function App() { 14 | return ( 15 | 16 |
17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 |