A modern web application built with React, TypeScript, and Vite for managing crowd-funding and loan operations.
- Frontend Framework: React 18.3
- Language: TypeScript
- Build Tool: Vite
- State Management: Redux Toolkit
- Styling: TailwindCSS
- UI Components: Radix UI
- Authentication: Supabase Auth
- Routing: React Router DOM
- Form Handling: Custom Form Components
- Date Handling: Day.js
- Analytics: React GA4
- Toast Notifications: Sonner
src/
βββ _Hooks/ # Custom React hooks
βββ _Variables/ # Global variables and constants
βββ assets/ # Static assets
βββ components/ # Reusable UI components
β βββ Cards/ # Card components
β βββ Form/ # Form components
β βββ Layout/ # Layout components
β βββ Modal/ # Modal dialogs
β βββ Sheets/ # Sheet components
β βββ Skeleton/ # Loading states
β βββ Text/ # Text components
β βββ ui/ # Base UI components
βββ config/ # Configuration files
βββ lib/ # Utility functions
βββ pages/ # Application pages
β βββ Authenticated/ # Protected routes
β βββ GeneralPages/ # Public routes
β βββ utils/ # Routing utilities
βββ store/ # Redux store configuration
β βββ API/ # API integration
β βββ Slices/ # Redux slices
β βββ hooks/ # Store hooks
βββ types/ # TypeScript types and interfaces
- Clone the repository
- Install dependencies:
npm install
- Copy
.env.exampleto.envand configure environment variables - Start development server:
npm run dev
npm run dev- Start development servernpm run build- Build for productionnpm run lint- Run ESLintnpm run preview- Preview production build
- Supabase-based authentication system
- Protected routes for authenticated users
- Password reset functionality
- Session management
- Personal details management
- Address information
- Professional details
- University information
- Profile completion tracking
- Create and manage crowdfunding posts
- Detailed view of funding requests
- Progress tracking
- Interactive funding process
- Loan request creation
- Loan details viewing
- Status tracking
- Document management
CrowdFundingPost: Displays crowdfunding opportunitiesPost: Generic post display component- Profile Cards:
AddressDetails: User address informationPersonalDetails: Basic user informationProfessionCard: Professional informationUniversityDetails: Educational background
- Custom form components with validation
- Pre-built templates for common forms
- Input fields with error handling
- Text area components
- Responsive navbar with mobile support
- Footer component
- Mobile sidebar for navigation
- Theme-aware components
- Base modal component
- Delete confirmation modal
- Sheet components for profile sections
- Crowdfunding interaction sheets
The application uses Redux Toolkit for state management with the following slices:
userSlice: User authentication and profile datasystemSlice: Application-wide settings and statesnotificationsSlice: Toast notifications and alerts
useAuthStateChange: Manages authentication state changesuseControlledState: Controlled form state managementuseRemainingHeight: Dynamic height calculationsuseTheme: Theme management
- User signs up/logs in through Supabase Auth
- Authentication state is managed through Redux
- Protected routes are handled by RouteLogic component
- Session persistence using redux-persist
API calls are organized in the store/API directory:
tableDataAPI: Database table operationsuserAuthAPI: Authentication-related operations
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a pull request
The project uses a custom ESLint configuration with:
- TypeScript support
- React-specific rules
- Strict type checking
- Custom configuration with animations
- Theme support
- Responsive design utilities
-
Component Structure
- Atomic design principles
- Separation of concerns
- Reusable base components
-
State Management
- Centralized Redux store
- Local state when appropriate
- Persistent storage for critical data
-
Routing
- Protected routes
- Role-based access
- Clean URLs
-
Performance
- Code splitting
- Lazy loading
- Optimized builds
The project uses TypeScript with:
- Strict type checking
- Interface-first design
- Enum usage for constants
- Comprehensive type definitions
Types are organized in:
types/interface.ts: Interface definitionstypes/types.ts: Type aliasestypes/enum.ts: Enumerations
-
Code Style
- Use functional components
- Implement proper error handling
- Write meaningful comments
- Follow TypeScript best practices
-
Testing
- Write unit tests for utilities
- Component testing
- Integration testing
-
Performance
- Optimize renders
- Implement proper memoization
- Monitor bundle size
-
Security
- Implement proper authentication
- Validate user input
- Handle sensitive data appropriately
- React and React DOM
- Redux Toolkit and React-Redux
- Supabase for authentication
- Radix UI components
- TailwindCSS for styling
- Day.js for date handling
- React Router for navigation
- TypeScript
- ESLint
- Vite
- Various type definitions
- Development utilities
The application can be deployed using:
- Build the application:
npm run build - Preview the build:
npm run preview - Deploy the
distdirectory to your hosting platform
For support, please:
- Check existing documentation
- Review issue tracker
- Create a new issue if needed
This project is maintained with β€οΈ by the CrowdCredit team.





