This repository offers an interactive IDE for creating Java extensions for MIT App Inventor using a drag-and-drop interface powered by Blockly (Website). It provides tools to generate Java code from visual blocks, making it suitable for both beginners and advanced developers.
- Drag-and-Drop Interface: Build extensions visually using Blockly blocks.
- Code Generation: Automatically generate Java code from designed blocks.
- Custom Blocks: Create and use custom blocks for extension-specific logic.
- Theming and Translation: Supports multiple themes and languages.
- Save and Load: Save your projects and reload them anytime.
-
Java Runtime:
- Install the latest Java JDK for your operating system.
- Ensure
java
is available in your PATH.
-
Fast CLI:
- Download Fast CLI from Fast CLI GitHub.
- Place the
fast.jar
in the following directory:- Linux/MacOS:
~/.local/share/Fast/fast.jar
- Windows:
%USERPROFILE%\.local\share\Fast\fast.jar
- Linux/MacOS:
-
Python:
- Python 3.8+ is required to run the Flask server.
-
SSL Certificates:
- Generate
localhost.crt
andlocalhost.key
in the same directory asserver.py
orserver.js
.
- Generate
git clone https://github.com/iagolirapasssos/CodeCrafterAIX.git cd Blockly-Extension-Builder-for-MIT-App-Inventor
- Clone the repository:
bash git clone https://github.com/iagolirapasssos/CodeCrafterAIX.git
- Open index.html in your browser to start using the IDE.
The IDE supports predefined and custom blocks to generate Java code for:
- Properties
- Methods
- Events
- Control Structures
- Math Operations
- Logic
- Text Manipulation
- Dictionaries and Lists
- Colors
Blockly.Blocks['property_declaration'] = {
init: function() {
this.appendDummyInput()
.appendField(new Blockly.FieldTextInput("myProperty"), "PROPERTY_NAME")
.appendField("type")
.appendField(new Blockly.FieldDropdown([
["String", "String"],
["int", "int"],
["boolean", "boolean"],
["double", "double"]
]), "TYPE");
this.appendStatementInput("PROPERTY_SETTER")
.setCheck(null)
.appendField("Setter");
this.appendStatementInput("PROPERTY_GETTER")
.setCheck(null)
.appendField("Getter");
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.setColour(160);
this.setTooltip("Declares a property");
}
};
Generated Code:
private String myProperty;
public void setMyProperty(String value) {
this.myProperty = value;
}
public String getMyProperty() {
return this.myProperty;
}
We are actively looking for:
- Frontend Developers: Enhance the UI/UX, add new themes, and improve drag-and-drop functionalities.
- Backend Developers: Integrate with Fast CLI for seamless code compilation and manage cloud storage for user projects.
- Designers: Create modern, intuitive designs and block themes.
Contributing Guide:
- Fork the repository.
- Create a branch:
git checkout -b feature-name
- Make changes and commit:
git commit -m "Added new feature"
- Push to your branch:
git push origin feature-name
- Open a pull request.
This project is ideal for beginners who want to learn Java by experimenting with visual programming:
- Start with simple math or logic blocks.
- Gradually build your first Java methods and classes.
- Explore the generated Java code to understand its structure and syntax.
Join us in enhancing this project to empower developers worldwide. Whether you're a beginner or an experienced programmer, your contributions will make a difference!
- Submit Issues for bugs or feature requests.
- Telegram Group for brainstorming and sharing ideas.
This project is licensed under the MIT License. See the LICENSE file for more details.