nextpy
v1.1.1
Published
CLI tool to scaffold FastAPI + Next.js full-stack applications with Fox AI companion
Maintainers
Readme
NextPy CLI
Scaffold full-stack FastAPI + Next.js applications in seconds
NextPy is a powerful CLI tool that helps you quickly scaffold modern full-stack applications with FastAPI backend and Next.js frontend, complete with Docker support and multiple database options.
🚀 Quick Start
Recommended: Quick Start (Auto-confirm)
npx -y nextpy my-awesome-appAlternative Methods
# With confirmation prompt
npx nextpy my-awesome-app
# Always use latest version
npx nextpy@latest my-awesome-app
# Global install (no prompts, faster)
npm install -g nextpy
nextpy my-awesome-app✨ Features
- 🦊 Fox - Your Smart Dev Companion - Intelligent CLI mascot that remembers your preferences and provides contextual suggestions
- FastAPI Backend - Modern, fast Python web framework
- Next.js Frontend - React framework with TypeScript support
- Multiple Database Options - PostgreSQL, MongoDB, or SQLite
- Docker Ready - Complete Docker and Docker Compose setup
- TypeScript - Full TypeScript support for type safety
- Vite - Lightning-fast development with Vite
- Interactive CLI - Beautiful, user-friendly prompts with personality
- Smart Suggestions - Fox learns your preferences and suggests your usual stack
- Best Practices - Production-ready project structure
📦 What You Get
Backend (FastAPI)
- RESTful API structure
- Database integration (PostgreSQL/MongoDB/SQLite)
- Environment configuration
- CORS setup
- Health check endpoints
- Docker configuration
Frontend (Next.js)
- TypeScript configuration
- Vite for fast development
- API client setup
- Modern React patterns
- Responsive design ready
- Docker configuration
DevOps
- Docker Compose for local development
- Separate Dockerfiles for frontend and backend
- Environment variable management
- Production-ready configurations
🎯 Usage
Create a New Project
# Quick start (recommended)
npx -y nextpy my-project
# Or with prompt
npx nextpy my-projectThe CLI will guide you through:
- Project name
- Frontend framework (Next.js or Vite + React)
- Database choice (SQLite, PostgreSQL, or MongoDB)
- Docker support (yes/no)
- GitHub repository initialization (yes/no)
- Automatic setup and installation
Start Development
cd my-project
# Start with Docker Compose (recommended)
docker-compose up
# Or start services individually:
# Backend
cd backend
pip install -r requirements.txt
uvicorn main:app --reload
# Frontend
cd frontend
npm install
npm run dev🌐 Access Your Application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/docs
🦊 Meet Fox - Your Smart Dev Companion
Fox is NextPy's intelligent CLI mascot that makes project creation delightful and efficient!
What Fox Does:
- Remembers Your Preferences - "You usually go with Next.js + PostgreSQL. Use that again?"
- Smart Suggestions - Recommends the right database for your project type
- Celebrates Milestones - Special messages for your 1st, 5th, 10th, 25th, and 50th projects!
- Contextual Tips - Provides relevant advice based on your choices
- Personality Modes - Choose how chatty Fox should be
Fox Modes:
# Verbose - Maximum personality, tips, and commentary
nextpy my-project --fox-mode verbose
# Normal - Balanced helpfulness (default)
nextpy my-project --fox-mode normal
# Quiet - Essential messages only
nextpy my-project --fox-mode quiet
# Silent - No Fox messages
nextpy my-project --fox-mode silent
# Set globally with environment variable
export NEXTPY_FOX_MODE=verbose
nextpy my-projectQuick Commands:
# Use your last configuration
nextpy my-new-project --last
# Combine options
nextpy my-project --fox-mode verbose --lastFox Features:
- 🧠 Smart Memory - Tracks your preferences across projects
- 💡 Context-Aware - Detects project types (e-commerce, blog, API, etc.)
- 🎯 Intelligent Recommendations - Suggests appropriate tech stacks
- 🎉 Milestone Celebrations - Acknowledges your progress
- 🎨 Personality - Witty, dev-focused messages
📋 Requirements
- Node.js 18+ (for frontend)
- Python 3.11+ (for backend)
- Docker (optional, but recommended)
🛠️ Project Structure
my-project/
├── backend/
│ ├── main.py # FastAPI application
│ ├── requirements.txt # Python dependencies
│ ├── .env # Environment variables
│ └── Dockerfile
├── frontend/
│ ├── src/
│ │ ├── pages/ # Next.js pages
│ │ ├── components/ # React components
│ │ └── lib/ # Utilities
│ ├── package.json
│ └── Dockerfile
├── docker-compose.yml # Docker orchestration
└── README.md # Project documentation🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📄 License
MIT License - see the LICENSE file for details.
🔗 Links
💡 Why NextPy?
- Save Time: Skip the boilerplate and start building features immediately
- Best Practices: Pre-configured with industry standards
- Flexible: Choose your database and customize as needed
- Modern Stack: Use the latest and greatest technologies
- Docker Ready: Deploy anywhere with confidence
Made with ❤️ by VesperAkshay
