Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Chat App Templates

This repository contains templates for creating AI-powered chat applications using the Chat CLI tool.

Templates

Django Backend Template

  • Location: django_backend_template/
  • Description: Django backend with AI integration and WebSocket support
  • Features:
    • Django 5.2+ with Channels for WebSocket support
    • Google Gemini AI integration with streaming responses
    • REST API endpoints for chat functionality
    • Redis for WebSocket channel layers
    • CORS support for frontend integration

React Frontend Template

  • Location: frontend_template/
  • Description: React frontend with real-time chat interface
  • Features:
    • React 18 with modern hooks
    • Tailwind CSS and shadcn/ui components
    • WebSocket integration for real-time communication
    • Responsive design for all devices
    • TypeScript support ready

Usage

These templates are used by the Chat CLI tool to generate new chat applications:

# Install Chat CLI
pip install chat-cli

# Create a new fullstack chat application
chat-cli create --name my-chat-app --template fullstack --gemini-api-key YOUR_API_KEY

# Create backend only
chat-cli create --name my-backend --template backend --gemini-api-key YOUR_API_KEY

# Create frontend only
chat-cli create --name my-frontend --template frontend --backend-url http://localhost:8000

Template Structure

my_templates/
├── django_backend_template/     # Django backend template
│   ├── chatapp/                # Django project (renamed during generation)
│   ├── chat/                   # Chat application
│   ├── requirements.txt        # Python dependencies
│   ├── .env.example           # Environment variables template
│   └── README.md              # Backend documentation
├── frontend_template/          # React frontend template
│   ├── src/                   # Source code
│   ├── package.json           # Node.js dependencies
│   ├── .env.example          # Environment variables template
│   └── README.md             # Frontend documentation
└── README.md                 # This file

Template Variables

The templates use placeholder variables that are replaced during project generation:

  • {{PROJECT_NAME}}: The name of the generated project
  • {{SECRET_KEY}}: Auto-generated Django secret key
  • {{BACKEND_URL}}: Backend URL for frontend configuration
  • {{GEMINI_API_KEY}}: Google Gemini API key for AI integration

Contributing

To contribute new templates or improve existing ones:

  1. Fork this repository
  2. Create your template in the appropriate directory
  3. Use the placeholder variables for dynamic content
  4. Test your template with the Chat CLI tool
  5. Submit a pull request

License

These templates are provided under the MIT License. See individual template directories for specific licensing information.

Support

For issues with templates or the Chat CLI tool:

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages