Neopric-Inc / NeoApps.AI-CodeGenerator

World's first no-code low-code app builder focuses on a data-first approach, allowing users to create applications from scratch. The code generator builds a drag-and-drop React application along with a .NET Core API and a MySQL database.
https://neoapps.ai/
BSD 3-Clause "New" or "Revised" License
18 stars 6 forks source link
admin-dashboard admin-panels app-builder crud internal-tool internal-tools low-code low-code-development low-code-development-platform low-code-framework low-code-platform lowcode no-code no-code-framework no-code-platform nocode nodejs self-hosted workflows

NeoApps.AI Logo

NeoApps.AI- Code Generator

Project Setup and App Generation Guide

Demo

Watch the demo - Manual Setup! [![Watch the video](https://github.com/Neopric-Inc/NeoApps.AI-CodeGenerator/blob/main/neoapps_ai_thumbnail.png)](https://www.youtube.com/watch?v=i2SOFnlYknU)
Watch the demo - Simplified Version -Streamlit App! [![Watch the video](https://github.com/Neopric-Inc/NeoApps.AI-CodeGenerator/blob/main/neoapps_ai_thumbnail.png)](https://youtu.be/F5bmjPtciLw)

Prerequisites

Before running the project, ensure you have the following installed:

  1. Visual Studio or Visual Studio Code
  2. .NET SDK
  3. Docker
  4. XAMPP
  5. Redis, RabbitMQ, and MinIO (S3)
  6. Node
  7. Python 3.x installed and pip3 or pip (Python package installer).

Simplified GUI Version with Streamlit App

  1. Pull the repository and check the prerequisites.
  2. Set up the Claude project according to the instructions.
  3. Generate the requirements for your project.
  4. Save the database file as app.sql.
  5. Drop the database file into the htdocs folder of XAMPP. Ensure that XAMPP is running and Docker is up and running.
  6. Navigate to the CodeGenerator folder and run pip install -r requirements.txt and then run ./codegenerator_script.sh**.
  7. The Streamlit app will open.
  8. Review the inputs: You can change the project name or leave it as is. Experiment with other settings once you're comfortable.
  9. Hit submit and scroll down to see the results.
  10. Go to the newly generated folder and execute the command dotnet run.
  11. After execution, copy the API URL.
  12. Terminate the Streamlit app with Ctrl+C.
  13. Re-run the app using ./codegenerator_script.sh.
  14. When the app reopens, click on Frontend and update the API URL you copied (replace localhost and the port number in the URL as needed, e.g., https://localhost:5001/v1/api/).
  15. Submit and experiment further if needed by following the instructions at the bottom of the page.
  16. A new project will be generated in the same folder named ReactTsOutput1.
  17. Open the newly generated React project.
  18. Install the necessary Node packages.
  19. Run the app.
  20. This will open the login window.
  21. Go to the database and copy the username and password (note: the password is not hashed for development purposes, but you can apply your own hashing algorithm).
  22. Login to the app and design your pages.
  23. Click Update UI to save your changes, Release UI to finalize it, and Preview UI to see a preview.
  24. Once satisfied, disable the DnD (drag and drop designer) by updating the .env file.
  25. Re-run the project using npm run dev, and it will open the newly designed app directly.
  26. Congratulations! You’ve created your first app without writing any code, but still built a custom-developed application.
  27. Deploy the app on a Docker container or contact us on Discord if you need help with deployment.

Manual Setup --------------------------

Docker Setup for Redis, RabbitMQ, and MinIO (S3)

Use the following Docker commands to set up Redis, RabbitMQ, and MinIO (S3):

Configuration

Add the following configurations to appsettings.json for MinIO (S3), Redis, and RabbitMQ:

{
  "MinIO": {
    "AccessKey": "${MINIO_ROOT_USER}",
    "SecretKey": "${MINIO_ROOT_PASSWORD}",
    "Endpoint": "http://localhost:9000"
  },
  "Redis": {
    "Connection": "localhost:6379,password=${REDIS_PASSWORD}"
  },
  "RabbitMQ": {
    "Connection": "amqp://${RABBITMQ_USER}:${RABBITMQ_PASSWORD}@localhost:5672/"
  }
}

Steps to Generate the Project

1. Database Schema Design

Ensure your database schema follows the guidelines provided by NeoApps.AI. You can find the guidelines here.

2. Save the Script

Save your database script in .sql format. Example scripts are available on the guidelines page.

3. Upload Script to XAMPP

Upload your script to XAMPP by placing it in the htdocs directory. This will allow it to be accessible via the XAMPP server.

4. Setup MySQL Database

Set up your MySQL database with the following parameters:

5. Update Launch Settings

Update launchSettings.json with the following parameters for backend generation:

"PARAMETER": "{project_id:1,server:localhost,uid:1,username:root,password:,databaseName:splitthebill,script:http://localhost/split_app_script.sql,statusOfGeneration:null,projectName:ContentPlannerTest,DBexists:No,port:3306,rabbitMQConn:amqp://user12345:12345@localhost:5672/,redisConn:localhost:6379,password=12345,apiflowurl:,fronttemplateurl:,Technology_Frontend:,Backend_technology:dotnet,buttonClicked:generate,projectType:,swgurl:,noderedurl:null}"

Update launchSettings.json with the following parameters for frontend generation:

"PARAMETER": "{project_id:1,server:localhost,uid:1,username:root,password:,databaseName:splitthebill,script:http://localhost/split_app_script.sql,statusOfGeneration:,projectName:ContentPlannerTest,DBexists:Yes,port:3306,rabbitMQConn:amqp://user12345:12345@localhost:5672/,redisConn:localhost:6379,password=12345,apiflowurl:,fronttemplateurl:,Technology_Frontend:reactts,Backend_technology:,buttonClicked:generate,projectType:dnd,swgurl:,noderedurl:}"

Configuration Parameters

Below is a list of configuration parameters used in the project setup, along with their explanations:

project_id

server

uid

username

password

databaseName

script

statusOfGeneration

projectName

DBexists

port

rabbitMQConn

redisConn

password (for Redis)

apiflowurl

fronttemplateurl

Technology_Frontend

Backend_technology

buttonClicked

projectType

swgurl

noderedurl

6. Generate Backend

Once you generate the project, the generated code will be available in the bin/debug folder.

7. Save the Generated Code

Copy the generated code folder and place it into your repository or preferred directory.

8. Run the Project

Open the project in Visual Studio or Visual Studio Code and run it. If you encounter any errors, check your database schema for issues.

9. Generate Frontend

Generate the frontend code and ensure both the frontend and backend projects are configured correctly. Copy them into your repository or preferred directory.

10. Regenerate Project

If you need to regenerate the project or make changes to the database schema, drop the existing database tables and rerun the project.

11. Run the .NET API

After copying the projects, run the .NET API as needed.


Follow these steps, and you should be able to run the project and generate the apps without any issues.

Documentation

Setup and Installation Guide For a detailed guide on setting up the project, generating the API, and hosting it locally, please refer to the Setup and Installation Guide.

This guide includes step-by-step instructions and a video tutorial to help you through the entire process.

To help you get started and make the most of NeoApps.ai, we have prepared comprehensive documentation: