A comprehensive, production-ready template for AI-based projects with modern development practices, organized structure, and deployment-ready configurations.
โญ Star this repository if you find it useful!
๐ Use this template to create your new AI project
- ๐๏ธ Organized Structure: Clean separation of concerns with dedicated directories for issues, docs, deployment, and testing
- ๐ค AI/ML Ready: Built-in support for AI/ML workflows and model integration
- ๐งช Comprehensive Testing: Unit, integration, and E2E testing with coverage reporting
- ๏ฟฝ Deployment Ready: Multi-platform deployment configurations (Docker, Cloud platforms)
- ๐ Rich Documentation: Detailed documentation structure with automated generation
- ๐ CI/CD Pipelines: GitHub Actions workflows for automated testing and deployment
- ๐ Security First: Security best practices and automated vulnerability scanning
- ๐ Issue Management: Structured issue tracking with completion documentation
- โก Performance: Optimized for development speed and production performance
- ๐ ๏ธ Developer Experience: Modern tooling with TypeScript, ESLint, Prettier
- Click "Use this template" on GitHub to create your repository
- Clone your new repository:
git clone https://github.com/your-username/your-project-name.git cd your-project-name - Run the interactive setup:
./scripts/setup-template.sh
- Start developing:
npm install npm run dev
# Clone the template
git clone https://github.com/your-username/ai-project-template.git my-ai-project
cd my-ai-project
# Run setup script
./scripts/setup-template.sh
# Install dependencies
npm install
# Configure environment
cp .env.example .env
# Edit .env with your settings
# Start development
npm run devThis template is technology-agnostic and supports multiple stacks:
- React + TypeScript + Vite
- Vue.js + TypeScript + Vite
- Angular + TypeScript
- Static Sites (HTML/CSS/JS)
- Node.js + Express + TypeScript
- Python + FastAPI + Pydantic
- Python + Flask + SQLAlchemy
- Go + Gin + GORM
- Any other backend framework
- PyTorch - Deep learning framework
- TensorFlow - Machine learning platform
- Hugging Face - Pre-trained models and transformers
- OpenAI API - GPT models and embeddings
- Custom Models - Your own trained models
- MLflow - Experiment tracking and model registry
- Containers: Docker + Docker Compose
- AWS: ECS, Lambda, EC2, S3
- Azure: Container Apps, Functions, Blob Storage
- GCP: Cloud Run, Functions, Storage
- Edge: Vercel, Netlify, Cloudflare
- PostgreSQL - Primary database choice
- MongoDB - Document database
- Redis - Caching and sessions
- SQLite - Development and testing
your-ai-project/
โโโ .github/ # GitHub configuration
โ โโโ workflows/ # CI/CD pipelines
โ โโโ ISSUE_TEMPLATE/ # Issue templates
โ โโโ instructions/ # AI coding instructions
โโโ issues/ # Issue tracking and completion docs
โ โโโ issue1/ # Individual issue directories
โ โ โโโ README.md # Issue overview
โ โ โโโ completion.md # Implementation docs
โ โ โโโ handoff.md # Handoff notes
โ โโโ issue[N]/ # Additional issues
โโโ docs/ # Project documentation
โ โโโ ROADMAP.md # Development roadmap
โ โโโ API.md # API documentation
โ โโโ ARCHITECTURE.md # System architecture
โโโ deployment/ # Deployment configurations
โ โโโ container/ # Docker configurations
โ โโโ cloud/ # Cloud platform configs
โ โโโ local/ # Local development
โโโ testing/ # Test files and results
โ โโโ unit/ # Unit tests
โ โโโ integration/ # Integration tests
โ โโโ e2e/ # End-to-end tests
โ โโโ test-results/ # Test outputs and coverage
โโโ scripts/ # Development scripts
โ โโโ setup-template.sh # Template customization script
โโโ src/ # Source code
โ โโโ components/ # Reusable components
โ โโโ services/ # Business logic
โ โโโ utils/ # Utility functions
โ โโโ types/ # Type definitions
โโโ assets/ # Static assets
โโโ archive/ # Historical files
โโโ data/ # Data files and datasets
โโโ models/ # AI/ML models
โโโ config/ # Configuration files
โโโ frontend/ # Frontend application (if applicable)
- Node.js 18+ (for JavaScript/TypeScript projects)
- Python 3.11+ (for Python projects)
- Git for version control
- Docker (optional, for containerized development)
- Click "Use this template" button above
- Create your new repository
- Clone your repository locally
git clone https://github.com/hartou/ai-project-template.git my-ai-project
cd my-ai-project
rm -rf .git && git initRun the interactive setup script:
chmod +x scripts/setup-template.sh
./scripts/setup-template.shThis will prompt you for:
- Project name and description
- Technology stack choice
- Author information
- Deployment preferences
# Install Node.js dependencies
npm install
# For Python projects, also install Python dependencies
pip install -r requirements.txt # if using Python# Copy environment template
cp .env.example .env
# Edit with your configuration
nano .env # or use your preferred editor# Start development server
npm run dev
# Run tests
npm test
# Build for production
npm run build- Create issue directory:
issues/issue[N]/ - Document requirements in
README.md - Implement solution
- Document completion in
completion.md - Update tests and results
- Unit Tests: Test individual components
- Integration Tests: Test component interactions
- E2E Tests: Test complete user workflows
- AI/ML Tests: Test model performance and accuracy
- Development: Local development with hot reload
- Testing: Automated testing on every commit
- Staging: Deploy to staging environment for review
- Production: Deploy to production with approval
// Example: OpenAI API integration
import OpenAI from 'openai';
const openai = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
});
export async function generateResponse(prompt) {
const response = await openai.chat.completions.create({
model: 'gpt-3.5-turbo',
messages: [{ role: 'user', content: prompt }],
});
return response.choices[0].message.content;
}# Example: Hugging Face model integration
from transformers import pipeline
class TextClassifier:
def __init__(self):
self.classifier = pipeline(
"text-classification",
model="distilbert-base-uncased-finetuned-sst-2-english"
)
def classify(self, text):
result = self.classifier(text)
return result[0]# Example: Data processing workflow
import pandas as pd
from sklearn.preprocessing import StandardScaler
class DataProcessor:
def __init__(self):
self.scaler = StandardScaler()
def preprocess_data(self, df):
# Clean and transform data
cleaned_df = self.clean_data(df)
scaled_features = self.scaler.fit_transform(cleaned_df)
return scaled_features# Build container
docker build -f deployment/container/Dockerfile -t my-ai-project .
# Run locally
docker run -p 3000:3000 my-ai-project
# Deploy with Docker Compose
docker-compose -f deployment/local/docker-compose.yml up# Build and push to ECR
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin
docker tag my-ai-project:latest your-account.dkr.ecr.us-east-1.amazonaws.com/my-ai-project:latest
docker push your-account.dkr.ecr.us-east-1.amazonaws.com/my-ai-project:latest# Deploy to Azure Container Apps
az containerapp up --name my-ai-project --source .# Deploy to Vercel
vercel --prod- Development Guide - Setup and development workflow
- API Documentation - REST API reference
- Architecture Guide - System architecture and decisions
- Deployment Guide - Production deployment instructions
- Contributing Guide - How to contribute to the project
# Generate API documentation
npm run docs:generate
# Serve documentation locally
npm run docs:serve
# Check documentation health
npm run docs:lint
npm run docs:link-check- Environment Variables: Secure configuration management
- Input Validation: Data validation with Joi/Pydantic
- Rate Limiting: API rate limiting protection
- CORS Configuration: Cross-origin resource sharing setup
- Security Headers: HTTP security headers with Helmet
- Dependency Scanning: Automated vulnerability scanning
- Container Security: Security-focused Docker configurations
We welcome contributions to make this template even better! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch
- Make your improvements
- Add tests for new functionality
- Submit a pull request
- New integrations: Add support for more AI/ML frameworks
- Deployment options: Add new cloud platform configurations
- Testing improvements: Enhance testing frameworks and coverage
- Documentation: Improve guides and examples
- Bug fixes: Fix issues and improve stability
- Organized project structure
- Multi-stack support (Node.js, Python)
- Comprehensive testing framework
- Docker containerization
- CI/CD with GitHub Actions
- Security best practices
- Documentation structure
- Template Marketplace: Specialized templates for different AI use cases
- CLI Tool: Command-line tool for easier project setup
- VS Code Extension: Integrated development experience
- More Integrations: Support for more AI/ML platforms
- Performance Monitoring: Built-in monitoring and alerting
- Multi-language Support: Java, Go, Rust, C# templates
- Visual Project Builder: GUI for customizing templates
- Cloud IDE Integration: GitHub Codespaces, GitPod templates
- Enterprise Features: Team collaboration and governance tools
Projects built with this template:
- [Your Project Here] - Submit a PR to showcase your project!
Want to feature your project? Open an issue or submit a pull request!
- AI Dev Toolkit Template - Add AI assistance to existing projects
- AI Project Template - Start new AI projects (this repo)
This project is licensed under the MIT License - see the LICENSE file for details.
- Microsoft AI - For inspiring modern AI development practices
- Vercel - For excellent deployment platform and developer experience
- GitHub - For comprehensive development platform and Actions
- Open Source Community - For amazing tools and frameworks that make this possible
- ๐ Documentation: Check our comprehensive docs first
- ๐ฌ Discussions: Join our GitHub Discussions
- ๐ Issues: Report bugs or request features via GitHub Issues
- โญ Star: Star this repo if you find it useful!
Happy Building! ๐ Build amazing AI projects with confidence using this template.