Welcome to Clave App - a sophisticated, privacy-focused AI interface designed for developers and enthusiasts who want a clean, powerful environment to interact with various AI models without the clutter.
Built with extensibility and customization in mind, Clave App serves as your personal "Clave" where you can think, create, and explore ideas with AI assistance. Whether you're looking to deploy your own private chat interface, build a custom AI tool, or learn how to integrate multiple AI models into a Node.js application, Clave App provides the perfect foundation.
- Multi-Model Support: Seamless integration with GPT-4o, GPT-3.5, and other leading AI models
- Advanced Image Generation: Create stunning visuals with DeepImg and Flux models
- Elegant UI/UX: Distraction-free, dark-mode interface built with EJS and Tailwind CSS
- Comprehensive API: Fully documented RESTful API with robust validation, error handling, and security features
- Developer-Centric: Designed for easy forking, customization, and deployment
- Extensible Architecture: Modular codebase that simplifies adding new features and models
- Runtime Environment: Node.js (v18 or higher)
- Web Framework: Express.js
- Template Engine: EJS
- Styling Framework: Tailwind CSS
- Icon Library: Lucide Icons
- Syntax Highlighting: Highlight.js
- Node.js (v18 or higher recommended)
- npm or yarn package manager
- API keys for desired AI services
-
Fork & Clone Repository Begin by forking this repository to your GitHub account, then clone it locally:
git clone https://github.com/1dev-hridoy/Clave-App.git cd Clave-App -
Install Dependencies Install all required packages using npm:
npm install
-
Launch Application Start the development server:
npm start
Access the application at
http://localhost:3000and begin exploring your AI sanctuary.
Clave App is built for flexibility and personalization:
- Branding & Identity: Modify
config/webConfig.jsonto customize site name, description, icons, and theme colors - AI Model Integration: Manage model configurations in
config/models.jsto add or remove AI services - UI/UX Styling: Leverage Tailwind CSS for comprehensive styling adjustments in
public/csswith view templates inviews/ - API Extensions: Extend functionality by adding new controllers in
controllers/and routes inroutes/
Comprehensive API documentation is available within the application. Once your server is running, visit /docs (e.g., http://localhost:3000/docs) for an interactive API reference.
POST /api/chat- Advanced chat completions with conversation historyPOST /api/image- High-quality image generation with style optionsPOST /api/reset- Secure conversation history clearingGET /api/status- System health and status monitoring
Here's how to interact with the API using common languages:
const response = await fetch('http://localhost:3000/api/chat', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-session-id': 'my-session-123'
},
body: JSON.stringify({
message: 'Hello, how are you?',
model: 'gpt-3.5'
})
});
const data = await response.json();
console.log(data.text);import requests
url = "http://localhost:3000/api/chat"
headers = {
"Content-Type": "application/json",
"x-session-id": "my-session-123"
}
data = {
"message": "Tell me a joke",
"model": "gpt-4o"
}
response = requests.post(url, json=data, headers=headers)
print(response.json()["text"])Current and planned enhancements for Clave App:
- Phase 1: Basic Chat Interface Implementation
- Phase 2: Image Generation Capabilities
- Phase 3: Comprehensive API Documentation
- Phase 4: Robust Global Error Handling
- Phase 5: Input Validation & Security Headers
- Phase 6: Response Streaming
- Phase 7: Markdown Rendering Improvements
- Phase 8: Dark/Light Mode Toggle
We take security seriously. Clave App comes with built-in protection:
- Input Validation: Comprehensive validation middleware for all API endpoints.
- XSS Protection: Automatic sanitization of user inputs.
- Secure Logging: Sensitive data (API keys, passwords) is automatically redacted from logs.
- Error Handling: Production-safe error responses that don't leak stack traces.
- Headers: Security headers configured for best practices.
Clave-App/
├── config/ # Configuration files (models, web settings)
├── controllers/ # Request handlers (chat, image, utility)
├── lib/ # AI model implementations
├── middleware/ # Express middleware (logger, error, validator)
├── public/ # Static assets (css, js, images)
├── routes/ # API and view routes
├── views/ # EJS templates
└── server.js # Application entry point
We welcome contributions from the developer community. To contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-enhancement) - Commit your changes (
git commit -m 'Add amazing enhancement') - Push to your branch (
git push origin feature/amazing-enhancement) - Open a Pull Request with a detailed description
Please review our contribution guidelines before submitting pull requests.
See CHANGELOG.md for details on releases and changes.
If Clave App has benefited your workflow or inspired your projects, please consider showing your support:
- ⭐ Star this repository on GitHub
- 🐦 Follow the maintainer on Twitter @1dev_hridoy
- 💬 Share your experience with others in the developer community
This project is distributed under the permissive MIT License, allowing for commercial use, modification, distribution, and patent use. See the LICENSE file for complete terms.
