Build AI Base Project with jzero in One Click
Why Do You Need an AI Base Project?
Why Do You Need an AI Base Project?
- ✅ Unified Framework: Avoid repetitive technology selection and technical debt, ensure long-term maintainability
- ✅ Standardized Structure: Clear layered architecture, unified code organization and engineering practices, solving code chaos and maintenance difficulties
- ✅ Quality and Efficiency: Production-grade infrastructure including logging, monitoring, distributed tracing, rate limiting and circuit breaking out of the box, reducing 80% of repetitive work
- ✅ Team Standards: Built-in Go best practices, AI-friendly architecture design, reduced learning costs, improved collaboration efficiency
💡 Core Value: Through standardized framework + AI-assisted business logic, you don't need to reinvent the wheel, and AI doesn't need to "guess" framework specifications. Just focus on business logic itself!
Quick Start
Create Project
jzero provides various project templates to meet different scenario requirements:
1️⃣ API Project (RESTful Service)
jzero new myproject --frame apiUse Cases:
- ✅ RESTful API services
- ✅ Backend services for frontend-backend separation
- ✅ Mobile backend services
- ✅ API gateways in microservices
Features:
- 🚀 Lightweight and high performance
- 📝 Auto-generated Swagger documentation
- 🔒 Built-in JWT authentication
- 🎯 Comprehensive request validation
2️⃣ RPC Project (gRPC Service)
jzero new myproject --frame rpcUse Cases:
- ✅ Inter-service communication in microservices
- ✅ High-performance internal services
- ✅ Services requiring strongly-typed interfaces
Features:
- ⚡ High-performance binary transmission
- 🔄 Automatic load balancing
- 📡 Service discovery
- 🔐 Built-in retry and circuit breaking
3️⃣ Gateway Project (API Gateway)
jzero new myproject --frame gatewayUse Cases:
- ✅ Unified entry point management
- ✅ Multi-service aggregation
- ✅ Need to support both HTTP and gRPC
Features:
- 🌐 Support both HTTP and gRPC
- 🔄 Smart routing and forwarding
- ⚖️ Load balancing
- 🛡️ Unified authentication and authorization
Start Service
cd myproject
# Download dependencies
go mod tidy
# Start service
go run main.go server
# Access Swagger UI
open http://localhost:8001/swaggerOn-Demand Enablement: Optional Feature Modules
Your project might need databases, caching, and other features. jzero supports on-demand enablement:
# Need database + Redis cache
jzero new myproject --features model,redis
# Need database + database cache
jzero new myproject --features model,cache
# Need database + Redis + database cache
jzero new myproject --features model,redis,cacheFeature Description:
| Feature | Description | Use Cases |
|---|---|---|
model | Relational database support | Need persistent storage |
redis | Redis cache support | Need high-performance caching |
cache | Database query cache | Reduce database pressure |
🏢 Custom Enterprise Templates
jzero's default templates include standardized framework code and best practices, but enterprises typically need to add:
- 🔧 CI/CD Pipeline Configuration (Docker, K8s, GitHub Actions)
- 📊 Enterprise Monitoring and Alerting (Prometheus, Grafana, log standards)
- 🛡️ Security and Compliance Requirements (authentication, audit, encryption)
- 🏗️ Middleware Integration (MQ, OSS, third-party services)
- 📐 Team Code Standards (unified structure, naming, comments)
jzero supports custom enterprise templates to ensure all projects meet enterprise standards:
Using Custom Templates
# Create project using enterprise custom template
jzero new myproject --template https://github.com/your-org/jzero-templateCreating Enterprise Templates
- Create based on default template:
# Create project
jzero new myproject --frame api
# Enter project directory
cd myproject
# Add enterprise-specific files and configurations
# - Dockerfile
# - .github/workflows/ci.yml
# - deployment/k8s/
# - internal/middleware/ (enterprise middleware)
# - config/ (enterprise configuration)- Publish as template:
# Push project to enterprise repository
git init
git add .
git commit -m "feat: enterprise-grade base template"
git remote add origin https://github.com/your-org/jzero-template.git
git push -u origin main- Team usage:
# All team members use the unified template
jzero new service-a --template https://github.com/your-org/jzero-template
jzero new service-b --template https://github.com/your-org/jzero-templateTemplate Content Examples
A complete enterprise template typically includes:
jzero-template/
├── .github/
│ └── workflows/
│ └── ci.yml # CI/CD pipeline
├── deployment/
│ ├── docker/
│ │ └── Dockerfile # Container configuration
│ └── k8s/
│ └── deployment.yaml # Kubernetes configuration
├── internal/
│ └── middleware/
│ ├── audit.go # Audit logging
│ ├── ratelimit.go # Rate limiting
│ └── trace.go # Distributed tracing
├── config/
│ └── config.yaml # Enterprise configuration example
└── README.md # Enterprise development standards documentationAdvantages
✅ Unified Standards: All projects use the same architecture and standards
✅ Quick Start: New projects include all enterprise infrastructure
✅ Reduced Risk: Verified configurations and best practices
✅ AI Friendly: AI understands enterprise templates and generates standards-compliant code
From Base to Business: AI-Assisted Development in Action
With the AI base project, you only need to focus on business logic development. Let's see how to quickly develop a user management feature:
Scenario: Develop User Registration Feature
Using jzero + AI Skills:
# Just one sentence
"Use jzero-skills to create user registration feature, supporting username, email, password with validation and deduplication"AI Automatically Completes:
✅ Generate desc/api/user.api
✅ Generate desc/sql/user.sql
✅ Execute jzero gen to generate framework code
✅ Implement Logic layer business logic
✅ Include complete validation and error handlingSummary
jzero makes Go project development easier than ever through standardized framework + AI assistance:
- Quick Start: One command to create a project base with best practices
- Flexible Customization: Support custom enterprise templates to ensure unified team standards
- AI Enhanced: AI understands framework specifications and focuses on business logic implementation
Find it useful? Please give jzero a ⭐ Star to support our continued improvement!
GitHub: https://github.com/jzero-io/jzero
Jzero Website: https://jzero.io