An intuitive, block-based visual programming platform for IoT and AI/ML development
Features β’ Screenshots β’ Quick Start β’ Usage Guide β’ API Docs β’ Contributing
This platform enables students (school to university level) to design, build, and deploy IoT and AI/ML solutions without deep prior coding knowledgeβwhile allowing smooth transition to real code as skills grow.
| User Type | Use Cases |
|---|---|
| π School Students | Simple blocks, instant feedback, simulations |
| π« University Students | Advanced logic, real hardware, AI models |
| π¨βπ« Educators | Curriculum tools, assignments, assessment |
| π§ Makers & Beginners | Rapid prototyping, learning IoT/AI |
- Drag-and-drop programming with Google Blockly
- 50+ custom blocks for IoT and AI
- Real-time code generation (Python, C++, JavaScript)
- Event-driven programming support
- Hardware Support: Arduino, ESP32, Raspberry Pi
- Sensors: Temperature, humidity, distance, light, motion
- Actuators: LED, servo, buzzer, DC motors, displays
- Connectivity: WiFi, MQTT, HTTP/REST APIs
- Device Simulator: Learn without physical hardware
- Computer Vision: Image classification, object detection, face detection
- Speech: Speech-to-text, text-to-speech, voice commands
- Prediction: Time-series forecasting, anomaly detection
- Pre-trained Models: MobileNet, COCO-SSD, and more
- Custom Models: Train your own with AutoML
- Project management and organization
- Device status monitoring
- Sensor data visualization
- Learning progress tracking
- Interactive tutorials and courses
- Difficulty levels (Beginner β Advanced)
- XP and achievement system
- Curriculum-aligned content
# Clone the repository
git clone https://github.com/yourusername/iot-ai-platform.git
cd iot-ai-platform
# Install all dependencies (frontend + backend)
npm run install:all
# Start development servers
npm run dev| Service | URL |
|---|---|
| π Frontend | http://localhost:5173 |
| π§ Backend API | http://localhost:8000 |
| π API Documentation | http://localhost:8000/docs |
- Open the application at http://localhost:5173
- Explore the Dashboard to see your projects and learning progress
- Click "New Project" or navigate to the Block Editor
Navigate to the Block Editor from the sidebar or click "Start Building" on the dashboard.
From the toolbox on the left, drag blocks onto the workspace:
- Events β Start with "when program starts"
- IoT - Digital β Add "set digital pin" blocks
- Time β Add "wait" blocks for delays
β‘ when program starts
βββ π repeat forever
βββ π‘ set LED pin 13 ON
βββ β° wait 1000 ms
βββ π‘ set LED pin 13 OFF
βββ β° wait 1000 ms
The right panel shows the generated Python/C++ code in real-time.
- Click Run to test in the simulator
- Click Export to download the code
- Click Save to save your project
π‘οΈ read temperature DHT11 pin 4 β Returns temperature in Β°C
π§ read humidity DHT11 pin 4 β Returns humidity %
π read distance trig 9 echo 10 β Returns distance in cm
π‘ read light level pin A0 β Returns 0-1023
π motion detected pin 7 β Returns true/false
π‘ set LED pin 13 ON/OFF β Control LEDs
π set servo pin 9 angle 90 β Control servo motors
π buzzer pin 8 frequency 1000 Hz β Play tones
π motor A forward speed 255 β Control DC motors
π‘ connect WiFi "SSID" "password" β Connect to WiFi
π connect MQTT broker "url" 1883 β Connect to MQTT
π€ MQTT publish to "topic" message β Send MQTT message
π₯ MQTT subscribe to "topic" β Receive MQTT messages
π HTTP GET "url" β Make HTTP requests
π· capture image from camera β Take a photo
π·οΈ classify image MobileNet β Identify objects
π detect objects COCO-SSD β Find multiple objects
π€ detect faces β Find faces in image
π€ listen for speech β Speech to text
π speak "Hello World" β Text to speech
π― wait for command "turn on" β Voice commands
π predict from data [...] β Time series prediction
π·οΈ classify data [...] β Data classification
β οΈ is anomaly value β Anomaly detection
- Navigate to Devices from the sidebar
- Click "Add Device" to register new hardware
- Select device type: Arduino, ESP32, Raspberry Pi, or Simulator
- Enter device details (name, IP address if applicable)
- Use Configure to adjust device settings
- Click Reconnect if a device goes offline
- Go to Learn from the sidebar
- Continue Learning - Resume your current course
- Tutorials - Browse by category (IoT/AI) and difficulty
- Complete tutorials to earn XP and track progress
- Locked tutorials unlock as you progress
iot-ai-platform/
βββ frontend/ # React + TypeScript frontend
β βββ src/
β β βββ components/ # Reusable UI components
β β β βββ Layout.tsx # Main layout wrapper
β β β βββ Sidebar.tsx # Navigation sidebar
β β β βββ Header.tsx # Top header bar
β β β βββ CodeView.tsx # Code display panel
β β β βββ SimulatorPanel.tsx
β β βββ pages/ # Page components
β β β βββ Dashboard.tsx # Home dashboard
β β β βββ Editor.tsx # Block editor
β β β βββ Projects.tsx # Project management
β β β βββ Devices.tsx # Device management
β β β βββ AIModels.tsx # AI model management
β β β βββ Learn.tsx # Tutorials & courses
β β β βββ Settings.tsx # User settings
β β βββ blocks/ # Custom Blockly blocks
β β β βββ index.ts # IoT & AI block definitions
β β βββ services/ # API services
β β β βββ api.ts # Axios API client
β β βββ store/ # Zustand state management
β β β βββ index.ts # Global state store
β β βββ App.tsx # Root component
β β βββ main.tsx # Entry point
β βββ package.json
β βββ vite.config.ts
β
βββ backend/ # FastAPI Python backend
β βββ app/
β β βββ api/ # API routes
β β β βββ routes/
β β β β βββ auth.py # Authentication
β β β β βββ projects.py # Project CRUD
β β β β βββ devices.py # Device management
β β β β βββ ai_models.py # AI model management
β β β β βββ code.py # Code generation
β β β β βββ tutorials.py # Learning system
β β β βββ __init__.py # Router aggregation
β β βββ core/ # Core utilities
β β β βββ config.py # Settings & configuration
β β β βββ database.py # Database setup
β β β βββ security.py # JWT authentication
β β βββ models/ # SQLAlchemy models
β β β βββ __init__.py # Database models
β β βββ schemas/ # Pydantic schemas
β β β βββ __init__.py # Request/Response schemas
β β βββ services/ # Business logic
β β β βββ code_generator.py
β β βββ main.py # FastAPI app entry
β βββ requirements.txt
β
βββ docs/ # Documentation
β βββ screenshots/ # Application screenshots
βββ package.json # Root package.json
βββ README.md # This file
| Technology | Purpose |
|---|---|
| React 18 | UI framework |
| TypeScript | Type safety |
| Blockly | Visual programming |
| TailwindCSS | Styling |
| Zustand | State management |
| React Router | Navigation |
| Axios | HTTP client |
| Recharts | Data visualization |
| Technology | Purpose |
|---|---|
| FastAPI | Web framework |
| SQLAlchemy | ORM |
| SQLite/PostgreSQL | Database |
| Pydantic | Data validation |
| JWT | Authentication |
| MQTT | IoT messaging |
| Technology | Purpose |
|---|---|
| TensorFlow.js | Browser ML |
| MobileNet | Image classification |
| COCO-SSD | Object detection |
| Web Speech API | Voice features |
POST /api/auth/register
POST /api/auth/login
GET /api/auth/meGET /api/projects/ # List all projects
POST /api/projects/ # Create project
GET /api/projects/{id} # Get project
PUT /api/projects/{id} # Update project
DELETE /api/projects/{id} # Delete project
POST /api/projects/{id}/duplicateGET /api/devices/ # List devices
POST /api/devices/ # Register device
GET /api/devices/{id} # Get device
PUT /api/devices/{id} # Update device
DELETE /api/devices/{id} # Remove device
POST /api/devices/{id}/ping # Ping device
POST /api/devices/{id}/upload # Upload codePOST /api/code/generate # Generate code from blocks
POST /api/code/validate # Validate generated code
GET /api/code/templates/{name} # Get code templateFull API documentation available at http://localhost:8000/docs
# Terminal 1: Frontend
cd frontend && npm run dev
# Terminal 2: Backend
cd backend && uvicorn app.main:app --reload --port 8000# Build frontend
cd frontend && npm run build
# The built files will be in frontend/dist/Create a .env file in the backend directory:
SECRET_KEY=your-secret-key-here
DATABASE_URL=sqlite+aiosqlite:///./platform.db
MQTT_BROKER=localhost
MQTT_PORT=1883Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Blockly for the visual programming framework
- FastAPI for the excellent Python web framework
- TensorFlow.js for browser-based machine learning
Made with β€οΈ for IoT and AI education






