حسابي

بحث

القائمة

BookStore Backend API - مشروع متجر إلكتروني لبيع الكتب أونلاين - الواجهة الخلفية

تفاصيل العمل

Project Name: BookStoreAPI.

project type: Django web applications project.

Programming Language: Python 3.11.9

Web Framework: Django==4.2.3.

Django REST framework: is a powerful and flexible toolkit for building Web APIs.(djangorestframework==3.14.0)

Code Editor: Visual Studio Code (VS Code) is a free, open-source, and cross-platform code editor developed by Microsoft.

Database: SQLite (can upgrade to PostgreSQL).

Authentication: JSON Web Tokens (JWT) - rest_framework_simplejwt.authentication.JWTAuthentication

Description: The BookStoreAPI project is a RESTful backend application, built with Django Rest Framework (DRF) and provides a powerful set of features to manage book information, users, commercial, and payment within a bookstore context. It is designed to be flexible and easy to use. Using Swagger/OpenAPI to provide you with a clean and intuitive API interface that makes it easy for developers to integrate with other systems. Whether you're building a mobile app, a web-based learning platform, or something else entirely.

the project consists of 3 applications:

1 - Book application - deals with managing book data and functionalities for book creating, updating, deleting, and retrieving. The interaction of the book with another system, for organization and easy to reach needs to relation to categories, tags, authors, and publishers. We need relations with the users who review and rate the books.

this application consists of 5 tables in the database, Category, Publisher, Author, Tag, Book, and Review.

2- User application - deals with users of the projects, starting from admin to normal customers of the store, authentication(JWTAuthentication), Register, confirm email, login(access token/ refresh token), logout, forget password change password. also users' profiles, creating, updating, deleting, and retrieving. permit user according to the type of user, Admin, or normal user(customer).

3- E-commerce application - deals with users' orders to buy the books, so it functionalities for order creating, updating, deleting, and retrieving also the status of order. and the payment using Stripe delas with the status of payment and .

also, I have used Third-party applications:

django-cors-headers 4.6.0: for handling the server headers required for Cross-Origin Resource Sharing (CORS).

django-phonenumber-field 8.0.0: for dealing with PhoneNumberField.

django-filter==23.2: provides a simple way to filter down a query set based on parameters a user provides.

Simple JWT(djangorestframework-simplejwt==5.2.2): A JSON Web Token authentication plugin for the Django REST Framework.

Pillow==10.0.0: PIL is the Python Imaging Library.

shortuuid==1.0.11: shortuuid is a simple Python library that generates concise, unambiguous, URL-safe UUIDs.

environs==11.0.0 : environs is a Python library for parsing environment variables, SECRET_KEY,DATABASE secret data and others.

also, I have used some tools and platforms:

swagger tool: Simplify my API development with open-source and professional tools, that help me efficiently design and document APIs at scale.

postman platform: a single platform for collaborative API development, testing, and demo of all my API endpoints in one place

In this project, I have modified endpoints written with clean and smart code, using the Django rest framework, the project consists of 3 main applications of many folders and files.

In general, each application consists of a urls.py file that contains the URL patterns of the paths to views in the views.py file, I have a view class inherited from APIView class that imports from rest_framework.views, also I have a view class inherited from ModelViewSet class that import from rest_framework.viewsets.In serializers.py files, I have modified the serializer class inherited from ModelSerializer that was imported from rest_framework.serializers also i have used validation serializers.ValidationError that raise errors if happend . Also in my project, I have used another function and technique that Django serves to developers, Django.db.models.signals, I have used 3 individual signals in the user application to call create_user_profile, send_confirmation_email, and post_save_generate_code functions considering a user model as a sender for these 3 signals.

The models.py files in each application In a Django project, is a central part of the application that contains the data models (also called database schemas). A model in Django is a Python class that defines the structure of a database table. It specifies the fields and behaviors of the data you want to store. Django's ORM (Object-Relational Mapping) allows you to interact with the database using these models instead of writing raw SQL queries. In the book application, I have models of (Category, Publisher, Author, Tag, Book, and Review).In the user application, I have models of (UserModel, UserProfile, SMSCode).In the e-commerce application, I have models of (OrderBook, Order, Payment).in each model I have used many types of fields for different types of data, so I have used these field types(CharField,IntegerField,DecimalField,BooleanField,DateTimeField,EmailField,ImageField,OneToOneField,ManyToManyField).

بطاقة العمل

اسم المستقل May A.
عدد الإعجابات 0
عدد المشاهدات 7
تاريخ الإضافة
تاريخ الإنجاز