A modern TypeScript React application for managing internal user interface components with a focus on network management, device monitoring, rewards systems, and wallet functionality.
- Dashboard Management: Comprehensive dashboard with analytics and monitoring
- Network Management: Device configuration, monitoring, and statistics
- Rewards System: Create, edit, and manage reward programs
- Wallet Management: Payment processing and transaction tracking
- Coupon System: Radius voucher creation and management
- Modern UI: Built with React, TypeScript, and shadcn/ui components
- Type Safety: Full TypeScript implementation with strict type checking
- Node.js 18+
- npm or yarn
- Docker and Docker Compose (for containerized deployment)
-
Clone the repository
git clone <repository-url> cd ui-internal-ts/ui
-
Create environment file
cp .example .env.local # Edit .env.local with your configuration -
Install dependencies
npm install
-
Run the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
-
Create environment file
cp .example .env.local # Edit .env.local with your configuration -
Run the setup script
chmod +x setup.sh ./setup.sh
-
Access the application Navigate to http://localhost:3000
ui-internal-ts/
├── ui/ # Frontend application
│ ├── src/
│ │ ├── app/ # Next.js app router pages
│ │ │ ├── dashboard/ # Dashboard pages
│ │ │ ├── network/ # Network management pages
│ │ │ ├── rewards/ # Rewards system pages
│ │ │ └── wallet/ # Wallet management pages
│ │ ├── components/ # React components
│ │ │ ├── ui/ # shadcn/ui components
│ │ │ ├── dashboard/ # Dashboard components
│ │ │ ├── devices/ # Device management components
│ │ │ ├── rewards/ # Rewards components
│ │ │ ├── wallet/ # Wallet components
│ │ │ └── coupons/ # Coupon management components
│ │ ├── lib/ # Utility functions and API calls
│ │ └── hooks/ # Custom React hooks
│ └── public/ # Static assets
├── Dockerfile # Docker configuration
├── docker-compose.yml # Docker Compose configuration
├── setup.sh # Automated setup script
└── README.md # This file
- Frontend: React 19, TypeScript, Next.js 15
- UI Components: shadcn/ui, Tailwind CSS
- State Management: React Context API
- HTTP Client: Axios
- Notifications: Sonner
- Charts: Recharts
- Icons: Lucide React, Tabler Icons
- Drag & Drop: @dnd-kit
- Tables: TanStack Table
- Forms: React Hook Form with Zod validation
Create a .env.local file in the ui/ directory with the following variables:
NEXT_PUBLIC_API_BASE_URL=https://your-api-domain.com/api/v1# Build and start the application
docker-compose up -d
# View logs
docker-compose logs -f
# Stop the application
docker-compose down
# Rebuild without cache
docker-compose build --no-cache
# Access container shell
docker-compose exec ui-internal-ts sh- Use TypeScript for all new code
- Follow ESLint configuration
- Use Prettier for code formatting
- Write meaningful component and function names
- Add JSDoc comments for complex functions
- Keep components small and focused
- Use composition over inheritance
- Implement proper TypeScript interfaces
- Handle loading and error states
- Use React.memo for performance optimization when needed
- Use React Context for global state
- Keep component state local when possible
- Use custom hooks for reusable logic
- Implement proper error boundaries
The application integrates with various APIs for:
- Device Management: CRUD operations for network devices
- User Management: Authentication and user data
- Rewards System: Reward creation and management
- Wallet Operations: Payment processing and transactions
- Network Monitoring: Real-time device statistics
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
# Run type checking
npm run type-check
# Run linting
npm run lint
npm run build
npm startdocker-compose -f docker-compose.prod.yml up -d-
Port 3000 already in use
# Kill the process using port 3000 lsof -ti:3000 | xargs kill -9
-
Docker permission issues
# Add user to docker group sudo usermod -aG docker $USER # Log out and back in
-
Environment variables not loading
- Ensure
.env.localis in the correct location - Restart the development server
- Check for typos in variable names
- Ensure
For issues and questions, please contact the development team or create an issue in the repository.
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.