This is a starter project for building a React.js frontend with libraries like TanStack Query, React Router DOM, Zod and Tailwind CSS.
- API Data Fetching: TanStack Query for efficient server state management.
- Authentication: Global 401 handling and token refresh mechanism to keep users authenticated.
- React Router: Client-side routing with React Router DOM.
- Form Validation: Zod for type-safe schema validation.
- Private Routes: Protected routes accessible only to authenticated users.
- UI Components: Styled using Tailwind CSS and ShadCN.
- Vite: Fast bundling and development server.
- React: Frontend library for building UI components.
- React Router DOM: Routing library for navigation.
- Zod: Validation library for data schema validation.
- TanStack Query: Data fetching and caching for server state.
- ShadCN and Tailwind CSS: Styling and component libraries for responsive design.
-
Clone the repository:
git clone https://github.com/IronJosh786/ts-react-client.git cd ts-react-client
-
Environment Variables:
Create a
.env
file in the root directory with the following keys:VITE_BASE_URL=http://localhost:3000/api # Backend API base URL
-
Install dependencies:
npm i
-
Run the server:
npm run dev
This project is licensed under the MIT License - see the LICENSE file for details.