GithubHelp home page GithubHelp logo

mehdiasadli / start-vite-app Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 4.47 MB

A Vite, React, Typescript template (Includes mantine, tabler-icons, router, axios, react-query, zod and zustand)

JavaScript 0.85% HTML 0.67% TypeScript 98.32% CSS 0.16%

start-vite-app's Introduction

React + TypeScript + Vite (start-vite-app)

Folder Structure

src

  • main.tsx (Entry file)
  • vite-env.d.ts (env type module)
  • app (Main folder)
    • index.tsx - Hosts App component which main.tsx file renders, it holds Providers and Navigator components
    • Providers.tsx - Multiple provider (Usually external) components seperated from App component. (Includes BrowserRouter, QueryClientProvider and MantineProviders)
    • Navigator.tsx - Main navigation file of the application, serves different pages with react-router-dom
  • assets (Asset files)
  • components (Application's components)
  • config (Config files)
    • theme.ts - MantineTheme that is used by MantineProvider
  • hooks (Custom hooks)
    • useFetch.ts - Basically, useQuery hook of @tanstack/react-query with a bit more config.
    • useMutation.ts - Basically, useMutation hook of @tanstack/react-query with a bit more config.
    • useToast.ts - Toast hook which uses @mantine/notifications Notification
  • pages (Application's pages)
    • index.tsx - Exports all pages from pages folder
    • LandingPage.tsx - Public Page, rendered on /
    • LoginPage.tsx - Auth Page, rendered on /auth
    • ProfilePage.tsx - Private Page, rendered on /profile
  • resources (Data that will be used on the app)
    • constants.ts - Contains multiple constant values, mostly DEFAULTs
    • regex.ts - Contains regexes
  • schemas (Zod schemas folder)
    • LoginSchema.ts - Zod schema that is can potentially be used on LoginPage
  • store (Zustand store folder)
    • settings.store.ts - Zustand useSettings hook, to store settings of the application
  • utils (Utility functions)
    • webStorage.ts - Utility function for getting and settings values to window.localStorage
  • api (API Services)
    • index.ts - Configuration for API, contains abstract Api, PublicApi, PrivateApi (uses interceptor) classes
    • services
      • auth.service.ts - Auth Service Class
    • hooks
      • auth.hooks.ts - Custom hooks to use Auth Service Class

start-vite-app's People

Watchers

Mehdi Asadli 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.