A modern, production-ready React application built with Vite, featuring authentication with Clerk, data fetching with TanStack Query, and styled with Tailwind CSS.
- Modern React: Built with React 19 and latest JavaScript features
- Vite: Lightning-fast build tool and development server
- Tailwind CSS: Utility-first CSS framework for rapid UI development
- Clerk Authentication: Complete user authentication and management
- TanStack Query: Powerful data fetching and caching library
- React Router: Client-side routing with React Router v6
- shadcn/ui: Beautiful and accessible UI components
- Prettier: Code formatting for consistent style
- ESLint: Code linting for better code quality
- Frontend: React, JavaScript (ES6+)
- Build Tool: Vite
- Styling: Tailwind CSS, shadcn/ui
- Authentication: Clerk
- Data Fetching: TanStack Query (React Query)
- Routing: React Router DOM
- Code Quality: ESLint, Prettier
- Package Manager: npm
frontend/
├── src/
│ ├── components/ # Reusable UI components
│ │ ├── common/ # Common components
│ │ ├── course/ # Course-related components
│ │ ├── enrollment/ # Enrollment components
│ │ ├── exam/ # Exam components
│ │ ├── magicui/ # Magic UI components
│ │ ├── payment/ # Payment components
│ │ ├── shared/ # Shared components
│ │ ├── test/ # Test components
│ │ └── ui/ # shadcn/ui components
│ ├── config/ # Configuration files
│ ├── constants/ # Application constants
│ ├── context/ # React context providers
│ ├── data/ # Static data files
│ ├── hooks/ # Custom React hooks
│ │ └── lms/ # LMS-specific hooks
│ ├── lib/ # Library configurations
│ │ └── react-query/ # TanStack Query setup
│ ├── pages/ # Page components
│ ├── services/ # API services
│ │ ├── mutations/ # Query mutations
│ │ └── socket/ # Socket connections
│ ├── utils/ # Utility functions
│ │ └── lms/ # LMS-specific utilities
│ ├── _auth/ # Authentication pages
│ │ └── page/ # Auth page components
│ └── _root/ # Main application pages
│ ├── pages/ # Root pages
│ └── _profile/ # Profile pages
├── public/ # Static assets
├── .env.local # Environment variables
├── .gitignore # Git ignore rules
├── .prettierrc.json # Prettier configuration
├── components.json # shadcn/ui configuration
├── jsconfig.json # JavaScript configuration
├── package.json # Dependencies and scripts
├── tailwind.config.js # Tailwind configuration
└── vite.config.js # Vite configuration
- Node.js (v18 or higher)
- npm or yarn
- A Clerk account for authentication
-
Clone the repository
git clone <repository-url> cd notes-do
-
Navigate to frontend directory
cd frontend -
Install dependencies
npm install
-
Set up environment variables
Copy
.env.localand update with your Clerk keys:VITE_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key_here CLERK_SECRET_KEY=your_clerk_secret_key_here
-
Start the development server
npm run dev
-
Open your browser
Navigate to
http://localhost:5173
In the frontend directory, you can run:
npm run dev- Start the development servernpm run build- Build the project for productionnpm run preview- Preview the production build locallynpm run lint- Run ESLint to check code qualitynpm run format- Format code with Prettiernpm run format:check- Check if code is properly formatted
Create a .env.local file in the frontend directory with the following variables:
# Clerk Configuration
VITE_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key_here
CLERK_SECRET_KEY=your_clerk_secret_key_here
# API Configuration (optional)
VITE_API_BASE_URL=http://localhost:3000/apiThis project uses shadcn/ui for UI components. To add new components:
npx shadcn@latest add button
npx shadcn@latest add card
npx shadcn@latest add dialogAuthentication is handled by Clerk. The app includes:
- Sign in/Sign up modals
- Protected routes
- User profile management
- Session management
/- Home page/profile- User profile page (protected)
This project maintains code quality through:
- ESLint: Linting for JavaScript/React
- Prettier: Code formatting
- Git hooks: Pre-commit formatting (optional)
npm run buildThe build artifacts will be stored in the dist/ directory.
- Connect your repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically on push to main branch
- Connect your repository to Netlify
- Set build command:
npm run build - Set publish directory:
dist - Set environment variables in Netlify dashboard
- Fork the repository
- Create a feature branch:
git checkout -b feature/new-feature - Commit your changes:
git commit -am 'Add new feature' - Push to the branch:
git push origin feature/new-feature - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions:
- Check the existing issues on GitHub
- Create a new issue with detailed description
- Include steps to reproduce the problem
- React - UI library
- Vite - Build tool
- Tailwind CSS - CSS framework
- Clerk - Authentication
- TanStack Query - Data fetching
- shadcn/ui - UI components