A modern digital product store built with React, TypeScript, and Vite. This is the frontend application that connects to a separate backend API.
- Modern React 18 with TypeScript
- Vite for fast development and building
- Tailwind CSS for styling
- Framer Motion for animations
- Zustand for state management
- React Router for navigation
- Axios for API calls
- Stripe integration for payments
- Responsive Design with mobile-first approach
-
Clone the repository
git clone <repository-url> cd kartik-digital-store-react
-
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env
Update the
.envfile with your configuration:VITE_API_URL=http://localhost:5000/api VITE_STRIPE_PUBLISHABLE_KEY=pk_test_your-stripe-publishable-key
-
Start the development server
npm run dev
src/
├── components/ # Reusable UI components
│ ├── ui/ # Base UI components
│ └── layout/ # Layout components
├── contexts/ # React contexts
├── hooks/ # Custom hooks
├── lib/ # Utility functions and API
├── pages/ # Page components
├── store/ # Zustand store
└── types/ # TypeScript type definitions
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLintnpm run type-check- Run TypeScript type checking
This frontend requires a separate backend API. The backend should provide:
- Authentication endpoints (
/auth/login,/auth/register,/auth/me) - Product management (
/products,/products/:id) - Order management (
/orders,/checkout) - Blog management (
/blog,/blog/:slug) - Admin endpoints for management
The project uses:
- Tailwind CSS for utility-first styling
- CSS Custom Properties for theming
- Dark mode by default
- Responsive design with mobile-first approach
The app includes:
- JWT-based authentication
- Protected routes
- Role-based access (admin/customer)
- Persistent login state
- Stripe integration for secure payments
- Shopping cart functionality
- Order management
- Download links for digital products
The application is fully responsive and works on:
- Desktop (1024px+)
- Tablet (768px - 1023px)
- Mobile (320px - 767px)
-
Build the project
npm run build
-
Deploy the
distfolder to your hosting provider
Popular deployment options:
- Vercel (recommended for React apps)
- Netlify
- AWS S3 + CloudFront
- GitHub Pages
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
This project is licensed under the MIT License.
Kartik Singh
- GitHub: @kartik-singhhh03
- LinkedIn: Kartik Singh
- React team for the amazing framework
- Vite team for the fast build tool
- Tailwind CSS for the utility-first CSS framework
- All the open-source contributors