oneShotCodeGen
1.0.0
一種命令行接口工具,用於生成具有React Admin Frontend和Supabase後端的全堆棧應用程序。
2025-01-27(DocuSign + Web版本):
2024-01-24(Docker&Nginx集成):
2024-01-16(編輯流):
2024-01-10(優化的AI生成管道):
2024-12-20(將令牌用法降低了70%,精度降低了80%):
# For Ubuntu
sudo apt-get update
sudo apt-get install docker.io
sudo systemctl start docker
sudo systemctl enable docker
# For macOS/Windows
Download and install Docker Desktop from https://www.docker.com/products/docker-desktop # Navigate to the project root directory
cd oneShotCodeGen
# Build the base image
docker build -t base-image -f base.Dockerfile .
# Verify the image was created
docker images | grep base-image # For Ubuntu
sudo apt-get install nginx
sudo systemctl start nginx
sudo systemctl enable nginx
# For macOS
brew install nginx
# For Windows
Download and install Nginx from http://nginx.org/en/download.html # Add your user to nginx group
sudo usermod -aG nginx $USER
# Ensure nginx config directory is writable
sudo chown -R $USER : $USER /etc/nginx/conf.d注意:除非您更改Dockerfile,否則只需構建一個基本圖像。此基礎圖像包含所有必要的依賴關係和配置,這些依賴項和配置將用作所有生成的應用程序的基礎。
pip install -r requirements.txt .env中設置您的環境變量: OPENAI_API_KEY=your_openai_api_key
SUPABASE_PROJECT_URL=your_supabase_url
SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_DB_PASSWORD=your_db_password確保設置以下權限以使Frontend運行聚合查詢:
ALTER ROLE authenticator SET pgrst . db_aggregates_enabled = ' true ' ;
NOTIFY pgrst, ' reload config ' ;a. Latest version
# Just code generation
python -m src.cli create " Create an expense tracker app "
# With Docker only
python -m src.cli create " Create an expense tracker app " --docker
# With Docker and Nginx
python -m src.cli create " Create an expense tracker app " --docker --nginxb。使用舊模式(2個呼叫方法):
python -m src.cli create " Create an expense tracker app " --use-legacyc。添加自定義輸出目錄:
python -m src.cli create " Create an expense tracker app " --output-dir " path/to/
outputfolder " # Just code generation
python -m src.cli edit < project_dir > --description " Add a dashboard for expense
analytics "
# With Docker only
python -m src.cli edit < project_dir > --description " Add a dashboard " --docker
# With Docker and Nginx
python -m src.cli edit < project_dir > --description " Add a dashboard " --docker --nginx一個。本地開發(默認):
cd output/{output_folder_name}/frontend
npm install
npm run devb。 Docker部署:
http://localhost:<port>上提供。c。 docker with nginx:
http://localhost/{app_name}上提供。地方發展
Docker部署
帶有nginx的Docker
app-generator-cli/
├── src/ # Source code for the CLI
├── output/ # Generated applications
│ └── [timestamp]/ # Timestamp-based output directory
│ ├── frontend/ # React frontend application
│ ├── use_cases.json # Use case definitions
│ ├── entities.json # Entity model
│ ├── mock_users.json # Mock user data
│ ├── mock_data.json # Generated test data
│ ├── domain_model.json # Combined application model
│ ├── interface_model.json # UI/UX specifications
│ ├── sql/ # Generated SQL migrations
│ ├── src/ # Generated application source
│ └── generation.log # Generation process log
└── .env # Environment variables 編輯流系統使您可以在保持一致性和安全性的同時修改現有應用程序。這是使用它的方法:
python -m src.cli update " Add a dashboard for expense analytics "完全再生
部分更新
backups/backup_YYYYMMDD_HHMMSS/該工具通過以下結構生成一個React應用程序:
frontend/
├── src/
│ ├── components/ # Reusable UI components
│ │ ├── Button.jsx
│ │ ├── Card.jsx
│ │ ├── Chart.jsx
│ │ ├── Form.jsx
│ │ ├── Modal.jsx
│ │ └── Table.jsx
│ ├── pages/ # Application pages
│ ├── providers/ # Data and auth providers
│ └── App.js # Main application component
└── package.json # Project dependencies 歡迎捐款!請隨時提交拉動請求。
該項目是根據MIT許可證獲得許可的 - 有關詳細信息,請參見許可證文件。