This project is a basic POC implementation application of an AI-powered tool designed to streamline the development of Minimum Viable Products (MVPs) on the Solana blockchain. The POC application possesses basic functionality in order to display and demonstrate the feasability to develop a fully functional tool in the future.
A comprehensive analysis report can be viewed on google docs: https://docs.google.com/document/d/1EtWiKpAvXo-ZEYBQapJniCfVljpFziPKsVWO4DSZlR0/edit?usp=sharing or as a PDF: https://github.com/hhdgknsn/solana-ai-mvp/blob/master/Analysis%20Report_%20AI-Powered%20Solana%20MVP%20Generator.pdf
solana-ai-mvp/
├── ai_model/
│ ├── Dockerfile
│ ├── app.py
│ ├── requirements.txt
├── backend/
│ ├── Dockerfile
│ ├── index.js
│ ├── package.json
├── frontend/
│ ├── Dockerfile
│ ├── package.json
│ └── src/
│ ├── App.js
│ ├── App.css
│ ├── index.js
│ └── public/
│ └── index.html
├── docker-compose.yml
├── .gitignore
├── README.md
Ensure you have the following installed:
- Docker Desktop
- Node.js
- Python 3.8
- Flask
- Solana CLI
- Anchor CLI
- Rust (on WSL Ubuntu if using Windows)
-
Clone the repository:
git clone https://github.com/yourusername/solana-ai-mvp.git cd solana-ai-mvp
-
Build and run the Docker containers:
docker-compose up --build
-
Access the application:
- Frontend:
http://localhost:3000
- Backend:
http://localhost:8000
- AI Model:
http://localhost:5000
- Frontend:
The AI Model service uses a pre-trained model to generate code based on user prompts. It is built using Flask and the Transformers library.
- app.py: Flask application that handles POST requests to generate code.
- Dockerfile: Docker configuration for building the AI Model service.
- requirements.txt: Python dependencies required for the AI Model service.
- POST /generate: Accepts a JSON object with a prompt and returns generated code.
The Backend service acts as an intermediary between the frontend and the AI model service. It is built using Node.js and Express.
- index.js: Main application file that sets up Express server and routes.
- Dockerfile: Docker configuration for building the Backend service.
- package.json: Node.js dependencies and scripts.
- POST /api/generate: Forwards the prompt to the AI model service and returns the generated code.
The Frontend service provides the user interface for inputting prompts and displaying generated code. It is built using React.
- src/App.js: Main React component that handles user interactions and displays generated code.
- src/App.css: CSS file for styling the frontend application.
- src/index.js: Entry point for the React application.
- public/index.html: HTML template for the React application.
- Dockerfile: Docker configuration for building the Frontend service.
- package.json: React dependencies and scripts.
Docker Compose is used to manage the multi-container application, including the AI model, backend, and frontend services.
- docker-compose.yml: Configuration file to set up and link the three services.