Getting Started with IBW Admin Dashboard
Quick Start
-
Install Dependencies
npm install -
Set Environment Variables Create a
.envfile:VITE_BASE_URL=http://localhost:8080 -
Start Development Server
npm run dev -
Open Browser Navigate to
http://localhost:5173 -
Login Use your admin credentials to access the dashboard
Documentation Structure
Core Documentation
- Overview: Project overview, tech stack, and features
- Getting Started: This file - quick start guide
- Development Setup: Detailed setup instructions
Component Documentation
- UI Components: Reusable UI component library
- Quest Components: Quest-specific components
- Forms: Form components and patterns
- API Client: API client documentation
Feature Documentation
- Pages and Routing: Page components and routing
- Custom Hooks: React hooks documentation
- Authentication: Auth and security
API Documentation
- API Patterns: API usage patterns and best practices
Key Concepts
Project Structure
src/
├── components/ # React components
├── pages/ # Page components (routes)
├── hooks/ # Custom React hooks
├── lib/ # Utilities and API client
├── contexts/ # React contexts
└── assets/ # Static assetsMain Entry Points
src/main.tsx: Application entry pointsrc/App.tsx: Main app component with routingsrc/lib/api.ts: API client
Common Patterns
- Data Fetching: Use custom hooks (e.g.,
useUsers,useEvents) - Forms: Use form components (e.g.,
EventForm,ConferenceForm) - API Calls: Use
apiClientfrom@/lib/api - Navigation: Use React Router
LinkanduseNavigate - Notifications: Use
toastfromsonner
Next Steps
- Read the Overview for project details
- Review Development Setup for configuration
- Explore UI Components for available components
- Check API Client for API usage
- Review Custom Hooks for data fetching patterns
Common Tasks
Adding a New Page
- Create page component in
src/pages/ - Add route in
src/App.tsx - Add navigation item in
src/components/app-sidebar.tsx
Adding a New API Endpoint
- Add method to
ApiClientclass insrc/lib/api.ts - Create TypeScript interface for request/response
- Use in components or custom hooks
Creating a Custom Hook
- Create hook file in
src/hooks/ - Use
apiClientfor API calls - Manage loading, error, and data states
- Export hook for use in components
Getting Help
- Check the relevant documentation section
- Review existing code for patterns
- Check TypeScript types for API interfaces
- Review component examples in
src/pages/
Development Tips
- Use TypeScript: All code should be typed
- Follow Patterns: Use existing patterns for consistency
- Error Handling: Always handle errors and show user feedback
- Loading States: Show loading indicators during async operations
- Accessibility: Use semantic HTML and ARIA attributes