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に変更を加えない限り、ベース画像は1回だけ構築する必要があります。このベース画像には、生成されたすべてのアプリケーションの基礎として使用される必要なすべての依存関係と構成が含まれています。
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_passwordFrontEndが集計クエリを実行するために、次のアクセス許可が設定されていることを確認してください。
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 --nginxa。ローカル開発(デフォルト):
cd output/{output_folder_name}/frontend
npm install
npm run devb。 Docker展開:
http://localhost:<port>で入手できますc。 nginxを使用したDocker:
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/このツールは、次の構造で反応アプリケーションを生成します。
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ライセンスに基づいてライセンスされています。詳細については、ライセンスファイルを参照してください。