main.tsx
(Entry file)vite-env.d.ts
(env type module)app
(Main folder)index.tsx
- HostsApp
component whichmain.tsx
file renders, it holdsProviders
andNavigator
componentsProviders.tsx
- Multiple provider (Usually external) components seperated fromApp
component. (Includes BrowserRouter, QueryClientProvider and MantineProviders)Navigator.tsx
- Main navigation file of the application, serves different pages withreact-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 frompages
folderLandingPage.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 DEFAULTsregex.ts
- Contains regexes
schemas
(Zod schemas folder)LoginSchema.ts
- Zod schema that is can potentially be used onLoginPage
store
(Zustand store folder)settings.store.ts
- ZustanduseSettings
hook, to store settings of the application
utils
(Utility functions)webStorage.ts
- Utility function for getting and settings values towindow.localStorage
api
(API Services)index.ts
- Configuration for API, contains abstractApi
,PublicApi
,PrivateApi
(uses interceptor) classesservices
auth.service.ts
- Auth Service Class
hooks
auth.hooks.ts
- Custom hooks to use Auth Service Class
mehdiasadli / start-vite-app Goto Github PK
View Code? Open in Web Editor NEWA Vite, React, Typescript template (Includes mantine, tabler-icons, router, axios, react-query, zod and zustand)