Giter Club home page Giter Club logo

bensalman's Introduction

BenSalman

Pages ๐Ÿ“ƒ

Page Path
403 *
404 *
Cart /cart
Chair Reservation /chair
Kitchen /kitchen
Menu /menu
Sign In /login
Success /success

TODO

  • Improve page title to be dynamic

Features ๐ŸŽฎ

  • Modern and responsive layout
  • Written in TypeScript with predictable static types.
  • Use Redux with redux-toolkit Store
  • Integration with Axios for API requests
  • Lint using Eslint
  • Internationalization with i18next
  • Minimal need for any custom CSS using Sass.
  • Using Tailwindcss as class base utils
  • UI Components from Ant Design
  • Integration of Swiper library

Get Start ๐Ÿš€

These instructions will help you set up and run the project on your local machine for development and testing purposes.

Prerequisites

Make sure you have the following software installed on your system:

  • Node.js (v14 or higher)
  • npm (v6 or higher)

Using Git (recommended)

# clone it with git version control:
git clone https://github.com/Mohammed-Taysser/bensalman.git

# change directory:
cd bensalman

# Install dependencies:
npm install

Using manual download ZIP

  1. Download repository from Here
  2. Uncompressed to your desired directory

Available Scripts ๐Ÿค–

Development

# To start the development server:
# The application will be available at
# http://localhost:5173/
npm run dev

Linting

# To run ESLint for code linting:
npm run lint

Built With ๐Ÿงฐ

  • React: A JavaScript library for building user interfaces.
  • TypeScript: A statically-typed superset of JavaScript that compiles to plain JavaScript.
  • Redux Toolkit: A tool-set for managing state in React applications.
  • Axios: A promise-based HTTP client for making API requests.
  • React Icons: A collection of popular icon libraries for React.
  • React Router Dom: A routing library for React applications.
  • Ant Design: A UI library with a set of high-quality React components.
  • i18next: A internationalization library for translating applications.
  • Sass: A CSS extension language that adds power and elegance to the basic language.
  • Tailwind CSS: A utility-first CSS framework for rapidly building custom user interfaces.
  • Swiper: is a modern touch slider and carousel library for mobile and desktop browsers.

Docs

Local Storage

This class provides static methods for interacting with the browser's local storage.

The LocalStorage class imports Local_Storage_Keys from the config file. This import suggests that Local_Storage_Keys is an object containing key-value pairs for local storage keys.

The LocalStorage class includes three static methods:

  • set: This method sets a value in the local storage by accepting a key and a value as parameters. It checks if the key exists in Local_Storage_Keys, and if so, it store the value as a JSON string.

  • get: This method retrieves a value from the local storage based on a given key. If the key exists in Local_Storage_Keys, it retrieve the value. If the value is null, it returns the defaultValue (if provided), otherwise it returns null. It also handles parsing errors and logs them to the console.

  • remove: This method removes an item from the local storage based on a given key. It checks if the key exists in Local_Storage_Keys and remove the corresponding item.

This codebase provides a convenient way to interact with the browser's local storage by encapsulating the logic within a class and providing static methods for common operations like setting, getting, and removing values from the local storage.

API

This class encapsulates an Axios instance for making API requests to a server using the Axios library.

The axios module and AxiosInstance type are imported from the 'axios' package. The SERVER_URL constant is imported from the 'config' file. The LOCAL_STORAGE object is imported from the 'localStorage' file, and the routes object is imported from the 'routes' file.

The class includes several methods for making specific API requests. These methods use the Axios instance to send requests and return the response data. The methods are named after the corresponding API endpoints and accept optional request bodies or query parameters.

Resources โ˜๏ธ

bensalman's People

Contributors

mohammed-taysser avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.