Welcome to the Marketplace project! This web application is built using React and TypeScript to create an interactive online marketplace experience. The project follows the principles of Atomic Design for structuring components and embraces a variety of modern tools and libraries for seamless development.
- User authentication through Google OAuth using
@react-oauth/google
andreact-google-oauth
. - Stylish UI components powered by
antd
andreact-bootstrap
for responsive design. - Data fetching and API communication managed with
axios
. - Decoding JSON Web Tokens facilitated by
jwt-decode
. - Efficient form handling and validation using
react-hook-form
. - Placeholder loading visuals created with
react-content-loader
. - Integration of icons using
react-icons
for enhanced user experience. - Smooth navigation between pages using
react-router-dom
. - User notifications managed through
react-toastify
. - Monitoring application performance with
web-vitals
. - Component organization based on Atomic Design principles.
The project structure demonstrates a well-organized architecture to manage components, templates, and controllers. The src
directory includes various folders:
pages
: Contains individual page components such asMainPage
,LoginScreen
, etc.templates
: Holds template components likeBuyerRegistrationPageTemplate
,NewsDetailsTemplate
, etc.controllers
: Contains API-related logic, including authentication and data retrieval.
The AppRoutes
component, utilizing useRoutes
from react-router-dom
, handles the routing of the application. Different paths correspond to specific components, ensuring seamless navigation between pages.
The controllers
directory contains modules for different aspects of the application, such as AuthController
, CommonController
, and ProductController
. These modules encapsulate the logic for authentication, fetching news and articles, and managing products.
The project uses ESLint for maintaining code quality. The .eslintrc
file configures linting rules for the project, ensuring consistent code style and formatting.
To get started with the project:
- Clone the repository to your local machine.
- Install the project dependencies using
npm install
. - Run the project using
npm start
.
npm start
: Starts the development server.npm build
: Builds the production-ready application.npm test
: Executes tests using the testing framework.npm lint
: Performs linting on the project files.npm lint:fix
: Fixes linting issues automatically.
The Marketplace project offers the following routes for navigation:
-
Main Page: The landing page of the application.
- Route:
/
- Route:
-
Login Screen: Allows users to log in.
- Route:
/login
- Route:
-
Registration Screen: Allows users to initiate the registration process.
- Route:
/registration
- Route:
-
Buyer Registration Page: Provides a template for buyer registration.
- Route:
/registration/buyer
- Route:
-
Seller Registration Page: Offers a template for seller registration.
- Route:
/registration/seller
- Route:
-
Password Confirmation Screen: Enables password confirmation during registration.
- Route:
/confirmation-password
- Route:
-
Password Reset Screen: Allows users to reset their password.
- Route:
/password-reset
- Route:
-
Product Details Screen: Displays details of a specific product.
- Route:
/products/:id
- Route:
-
News Details Template: Shows detailed information about a news item.
- Route:
/news/:id
- Route:
-
Useful Articles Detail Template: Provides detailed content for useful articles.
- Route:
/articles/:id
- Route:
-
Basket Pages: Displays the user's shopping cart.
- Route:
/cart
- Route:
-
Not Found Screen: Displays when no route matches the user's request.
- Route:
*
(wildcard)
- Route: