UNPKG

devkit-cli

Version:

Professional fullstack project generator CLI (FastAPI + React, Express + Vue, multi-db, Docker/Podman ready)

190 lines (130 loc) 4.66 kB
<!-- This project README is available in both English and Spanish. - [English](README.md) (current) - [Español / Spanish](README.es.md) --> # Devkit CLI Professional fullstack project generator with FastAPI + React or Express + Vue, supporting multiple databases and container deployment with Podman or Docker. ## Installation Install the CLI globally from npm: ```sh npm install -g devkit-cli ``` ## Quick Usage ### Fullstack Projects Create a complete fullstack project interactively: ```sh devkit create ``` Or skip questions and use default values: ```sh devkit create --skip-questions ``` ### Frontend Only Generate just the frontend (React or Vue): ```sh devkit create --frontend-only ``` With default settings: ```sh devkit create --frontend-only --skip-questions ``` ### Backend Only Generate just the backend (FastAPI or Express): ```sh devkit create --backend-only ``` With default settings: ```sh devkit create --backend-only --skip-questions ``` ### Main Options - `--frontend-only` Generate frontend only (React or Vue) - `--backend-only` Generate backend only (FastAPI or Express) - `--with-podman` Automatically starts the project with podman-compose after generation - `--skip-questions` Uses default configuration without interactive prompts ## What does it generate? ### Fullstack Projects - FastAPI (Python) or Express (Node.js) backend with example CRUD, optional JWT authentication, and database support - React (Vite) or Vue (Vite) frontend with login example, CRUD, and protected route consumption - Complete project structure with both frontend and backend ### Frontend Only - React (Vite) or Vue (Vite) project with modern tooling - Dockerfile and docker-compose.yml/podman-compose.yml for containerized development - Professional project structure and configuration ### Backend Only - FastAPI (Python) or Express (Node.js) API with CORS enabled - Database support: SQLite, PostgreSQL, MySQL, or MongoDB - Optional JWT authentication system - Dockerfile and compose files with database services - Environment configuration and professional structure ### Common Features - Configuration files for local development and containers (Docker/Podman) - `.gitignore` and professional project structure - Ready-to-use development environment ## Requirements - Node.js 20.19+ (for frontend creation with Vite) - Podman and podman-compose (optional, only if you use `--with-podman`) - Python 3.10+ (for backend) ## Example Workflows ### Fullstack Project ```sh # 1. Create the fullstack project devkit create # 2. Enter the generated folder cd my-project # 3. Start everything with Docker/Podman docker-compose up --build # or podman-compose up --build # 4. Access backend at http://localhost:8000 and frontend at http://localhost:5173 ``` ### Frontend Only ```sh # 1. Create React frontend devkit create --frontend-only # 2. Enter the generated folder cd my-frontend # 3. Start development server npm run dev # or with containers docker-compose up # 4. Access frontend at http://localhost:5173 ``` ### Backend Only ```sh # 1. Create FastAPI backend devkit create --backend-only # 2. Enter the generated folder cd my-backend # 3. Start with containers (includes database) docker-compose up --build # 4. Access API at http://localhost:8000 # 5. View docs at http://localhost:8000/docs ``` ## Customization ### Project Types & Customization #### Fullstack Projects - **Stack**: FastAPI + React or Express + Vue - **Database**: SQLite, PostgreSQL, MySQL, or MongoDB - **JWT Authentication**: Optional authentication system - **Frontend**: Official Vite installer or base template #### Frontend Only - **Framework**: React or Vue (both with Vite) - **Vite Installer**: Use official installer or base template - **Container Support**: Docker/Podman ready #### Backend Only - **Framework**: FastAPI (Python) or Express (Node.js) - **Database**: SQLite, PostgreSQL, MySQL, or MongoDB - SQLite: No extra configuration needed - PostgreSQL/MySQL: Host, port, user, password, database name - MongoDB: Full URI or separate connection details - **JWT Authentication**: Optional JWT implementation - **Container Tool**: Docker Compose or Podman Compose > **Note:** All generators create `.env` files, Dockerfiles, compose files, and ready-to-use configurations for each technology stack. ## Contributing This MVP is currently closed to external contributions. Suggestions and feedback are welcome, but pull requests may not be accepted until the project is open to the community. --- Template generated by [devkit-cli](https://www.npmjs.com/package/devkit-cli) --- Made with ❤️ by juanvidev1