Live site at https://shop-lytics-frontend.onrender.com This project is part of the Xeno FDE Internship Assignment – 2025.
If you don't have a shopify store or don't want to create one to see it's working, you can watch this YouTube Video. YouTube Link
Shop-Lytics is a web application for Shopify store analytics.
-
Clone the repository:
git clone https://github.com/ForkMeMaybe/Shop-Lytics.git cd shop-lytics -
Install dependencies: This project uses Pipenv for dependency management.
pipenv install pipenv shell
Alternatively, you can use the
requirements.txtfile:pip install -r requirements.txt
-
Run database migrations:
python manage.py migrate
-
Rename shop_lytics/settings/devv.py to shop_lytics/settings/dev.py
-
Configure the environement vars in dev.py
-
Start the development server:
python manage.py runserver
-
Run Redis:
docker run -d -p 6379:6379 redis -
Database SQLite For Quick Access OR Set up credentials for Postgres in dev.py (Recommended)
/auth/users/(CREATE User or GET basic info about them)/auth/users/me/(RUD details about the user)/auth/users/set_password//auth/users/reset_password//auth/users/reset_password_confirm//auth/jwt/create/(GET ACCESS Token)/auth/jwt/refresh/(Refresh ACCESS Token)
/send_otp//verify_otp//auth/shopify/(OAuth)/auth/shopify/callback/(OAuth)
/api/tenants//api/tenants/<int:pk>//api/customers//api/customers/<int:pk>//api/products//api/products/<int:pk>//api/orders//api/orders/<int:pk>//api/custom-events/
- User:
email(EmailField, unique)- Inherits from Django's
AbstractUser.
- Tenant:
user(OneToOneField to User)name(CharField)shopify_domain(CharField, unique)access_token(CharField)created_at(DateTimeField)
- Customer:
tenant(ForeignKey to Tenant)shopify_customer_id(BigIntegerField, unique)first_name(CharField)last_name(CharField)email(EmailField)phone(CharField)address1(CharField)address2(CharField)city(CharField)province(CharField)country(CharField)zip(CharField)company(CharField)created_at(DateTimeField)updated_at(DateTimeField)
- Product:
tenant(ForeignKey to Tenant)shopify_product_id(BigIntegerField, unique)title(CharField)description(TextField)price(DecimalField)sku(CharField)inventory_quantity(IntegerField)created_at(DateTimeField)updated_at(DateTimeField)
- Order:
tenant(ForeignKey to Tenant)shopify_order_id(BigIntegerField, unique)customer(ForeignKey to Customer)total_price(DecimalField)currency(CharField)financial_status(CharField)fulfillment_status(CharField)created_at(DateTimeField)updated_at(DateTimeField)
- OrderItem:
order(ForeignKey to Order)product(ForeignKey to Product)quantity(IntegerField)price(DecimalField)
- CustomEvent:
tenant(ForeignKey to Tenant)event_type(CharField)customer(ForeignKey to Customer)metadata(JSONField)created_at(DateTimeField)
access_tokenis not stored in encrypted form.
- Each user manages one store.
