- Overview
- Core Features
- Architecture
- Technology Stack
- Project Structure
- Getting Started
- API Documentation
- Authentication & Security
- Database Schema
- Deployment
- Development Workflow
- Contributing
- Support
Toolify is an innovative AI-powered platform that revolutionizes how users interact with tools and machinery. By combining advanced computer vision, natural language processing, and real-time web research, Toolify enables users to:
- Identify tools from images instantly using AI vision
- Generate comprehensive manuals with safety guidelines and usage instructions
- Access audio-guided tutorials for hands-free learning
- Research tools with real-time web data and YouTube tutorials
- Chat with AI for tool-related questions and guidance
Repository: https://github.com/iwstech3/Toolify.git
- Gemini Vision Integration: Upload an image of any tool, and Gemini's advanced vision model identifies it with high accuracy
- Multi-modal Analysis: Processes images alongside text descriptions for enhanced recognition
- Automatic Research: Once identified, the system automatically researches the tool using Tavily AI to gather comprehensive information
- Safety Analysis: Generates safety tips and PPE requirements specific to each recognized tool
- Comprehensive Documentation: Automatically generates detailed user manuals including:
- Tool overview and specifications
- Step-by-step usage instructions
- Safety precautions and PPE requirements
- Maintenance guidelines
- Troubleshooting tips
- Multi-language Support: Generate manuals in different languages
- Structured Format: Well-organized markdown output with clear sections
- Quick Summaries: Condensed versions for rapid reference
- Text-to-Speech Conversion: Converts generated manuals into high-quality audio files
- YarnGPT Integration: Uses YarnGPT API for natural-sounding voice synthesis
- Cloud Storage: Audio files are stored in Supabase Storage for easy access
- Accessibility: Enables hands-free learning and accessibility for visually impaired users
- Contextual Conversations: Chat with AI about tools, usage, and safety
- Multi-modal Input: Supports text, images, and voice input
- Chat History: Persistent conversation storage with user-specific access
- Real-time Responses: Streaming responses powered by Google Gemini
- Tavily AI Integration: Autonomous web research for the latest tool information
- YouTube Integration: Automatic discovery of relevant tutorial videos
- Transcript Analysis: Processes YouTube transcripts to verify content relevance
- Source Citations: Provides links to original sources for verification
Toolify follows a modern monorepo architecture with clear separation between frontend and backend:
┌─────────────────────────────────────────────────────────┐
│ Frontend (Next.js 15) │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Landing │ │ Chat │ │ Auth │ │
│ │ Page │ │ Interface │ │ (Clerk) │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │ │ │ │
│ └──────────────────┴──────────────────┘ │
│ │ │
│ API Client (lib/api.ts) │
└────────────────────────────┬────────────────────────────┘
│ HTTPS + Bearer Auth
▼
┌─────────────────────────────────────────────────────────┐
│ Backend (FastAPI) │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Auth Routes │ │ Chat Routes │ │Manual Routes │ │
│ │(dependencies)│ │ │ │ │ │
│ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌──────────────────────────────────────────────────┐ │
│ │ Services Layer │ │
│ │ ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐ │ │
│ │ │ Vision │ │ Tavily │ │ Audio │ │Supabase│ │ │
│ │ │Service │ │Service │ │Service │ │Client │ │ │
│ │ └────────┘ └────────┘ └────────┘ └────────┘ │ │
│ └──────────────────────────────────────────────────┘ │
│ │ │ │ │
│ └──────────────────┴──────────────────┘ │
└────────────────────────────┬────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ External Services & Storage │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Supabase │ │Google Gemini │ │ Tavily AI │ │
│ │ (PostgreSQL │ │ (Vision + │ │ (Research) │ │
│ │ + Storage) │ │ Text Gen) │ │ │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ YarnGPT │ │ Clerk │ │
│ │ (Audio) │ │ (Auth) │ │
│ └──────────────┘ └──────────────┘ │
└─────────────────────────────────────────────────────────┘
- User uploads image via frontend
- Frontend sends image + auth token to
/api/chat - Backend validates JWT with Clerk/Supabase
- Image uploaded to Supabase Storage
- Gemini Vision analyzes image
- Tavily researches identified tool
- Results stored in Supabase database
- Response returned to frontend with tool info, safety tips, and YouTube links
- User requests manual for specific tool
- Frontend calls
/api/generate-manualwith tool name - Backend chains LangChain prompts for comprehensive manual
- Tavily fetches real-time usage tips and maintenance info
- Manual content cleaned and formatted
- Audio generated via YarnGPT (optional)
- Audio uploaded to Supabase Storage
- Manual and audio URLs returned to user
- User sends message (text/image/voice)
- Frontend streams to
/api/chat - Backend processes with Gemini
- Response streamed back in real-time
- Chat history saved to Supabase
| Technology | Version | Purpose |
|---|---|---|
| Next.js | 15.0.0 | React framework with App Router |
| React | 19.0.0 | UI library |
| TypeScript | 5.0+ | Type-safe development |
| Tailwind CSS | 4.1.17 | Utility-first styling |
| Clerk | 6.36.1 | Authentication & user management |
| Supabase JS | 2.88.0 | Database client |
| Lucide React | 0.556.0 | Icon library |
| next-themes | 0.4.6 | Dark mode support |
| Technology | Version | Purpose |
|---|---|---|
| FastAPI | Latest | High-performance Python web framework |
| Python | 3.10+ | Programming language |
| Google Gemini | Latest | Vision + text generation AI |
| LangChain | Latest | LLM orchestration & chains |
| Tavily | Latest | Autonomous web research |
| Supabase | Latest | PostgreSQL database + storage |
| Uvicorn | Latest | ASGI server |
| Pydantic | Latest | Data validation |
| Service | Purpose |
|---|---|
| Vercel | Frontend hosting |
| Render | Backend API hosting |
| Supabase | Database, authentication, storage |
| Clerk | User authentication |
| YarnGPT | Text-to-speech audio generation |
| GitHub | Version control & CI/CD |
Toolify-abimmost/
├── frontend/ # Next.js 15 application
│ ├── app/ # App Router pages
│ │ ├── (auth)/ # Auth-related pages
│ │ │ ├── sign-in/ # Sign-in page
│ │ │ └── sign-up/ # Sign-up page
│ │ ├── (main)/ # Main application pages
│ │ │ ├── chat/ # Chat interface
│ │ │ └── dashboard/ # User dashboard
│ │ ├── layout.tsx # Root layout with providers
│ │ ├── page.tsx # Landing page
│ │ └── globals.css # Global styles
│ ├── components/ # React components
│ │ ├── chat/ # Chat-related components
│ │ │ ├── ChatInterface.tsx # Main chat UI
│ │ │ ├── ChatInput.tsx # Input with voice/image
│ │ │ └── MessageList.tsx # Message display
│ │ ├── ui/ # Reusable UI components
│ │ ├── Navbar.tsx # Navigation bar
│ │ ├── Hero.tsx # Hero section
│ │ └── Footer.tsx # Footer component
│ ├── lib/ # Utility libraries
│ │ ├── api.ts # API client with error handling
│ │ ├── supabase.ts # Supabase client setup
│ │ └── utils.ts # Utility functions
│ ├── middleware.ts # Clerk auth middleware
│ ├── .env.local.example # Environment template
│ └── package.json # Dependencies
│
├── backend/ # FastAPI application
│ ├── app/
│ │ ├── routes/ # API endpoints
│ │ │ ├── auth.py # Authentication routes
│ │ │ ├── chat.py # Chat endpoints
│ │ │ └── manual.py # Manual generation routes
│ │ ├── services/ # Business logic
│ │ │ ├── vision_service.py # Gemini Vision integration
│ │ │ ├── tavily_service.py # Web research service
│ │ │ └── audio_service.py # Audio generation service
│ │ ├── chains/ # LangChain workflows
│ │ │ └── tool_manual_chain.py # Manual generation chain
│ │ ├── model/ # Pydantic schemas
│ │ │ └── schemas.py # Request/response models
│ │ ├── config.py # Configuration management
│ │ ├── dependencies.py # Auth & DI
│ │ └── main.py # FastAPI app entry point
│ ├── audio/ # Temporary audio storage
│ ├── .env.example # Environment template
│ └── README.md # Backend documentation
│
├── requirements.txt # Python dependencies
├── render.yaml # Render deployment config
├── INTEGRATION_GUIDE.md # Integration documentation
└── toolify-docs.md # This file
- Node.js 20.x or higher
- Python 3.10 or higher
- Git for version control
- API Keys:
- Google Gemini API key
- Tavily API key
- Clerk authentication keys
- Supabase project credentials
- YarnGPT API key
-
Clone the repository
git clone https://github.com/iwstech3/Toolify.git cd Toolify/frontend -
Install dependencies
npm install
-
Configure environment variables
Create
.env.localin thefrontenddirectory:# Clerk Authentication NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_publishable_key CLERK_SECRET_KEY=your_secret_key CLERK_JWT_KEY=your_jwt_key # Backend API NEXT_PUBLIC_RENDER_API_URL=https://toolify-api.onrender.com # Supabase NEXT_PUBLIC_SUPABASE_URL=your_supabase_url NEXT_PUBLIC_SUPABASE_KEY=your_supabase_anon_key
-
Start development server
npm run dev
Visit http://localhost:3000
-
Navigate to backend directory
cd backend -
Install dependencies
# From project root pip install -r requirements.txt -
Configure environment variables
Create
.envin thebackenddirectory:# AI Services GOOGLE_API_KEY=your_gemini_api_key TAVILY_API_KEY=your_tavily_api_key YARNGPT_API_KEY=your_yarngpt_api_key # Supabase SUPABASE_URL=https://your-project.supabase.co SUPABASE_SERVICE_KEY=your_service_role_key SUPABASE_ANON_KEY=your_anon_key # Server Settings HOST=0.0.0.0 PORT=8000 CORS_ORIGINS=http://localhost:3000 # AI Model Configuration GEMINI_MODEL=gemini-2.5-flash TEMPERATURE=0.7 MAX_TOKENS=2048
-
Start development server
cd backend python -m uvicorn app.main:app --reloadAPI available at http://localhost:8000
Interactive docs at http://localhost:8000/docs
The backend provides comprehensive API endpoints for tool recognition, manual generation, and chat functionality.
- Development:
http://localhost:8000 - Production:
https://toolify-api.onrender.com
All protected endpoints require a Bearer token in the Authorization header:
Authorization: Bearer <clerk_jwt_token>
-
GET
/- Returns welcome message and available endpoints
- Auth: Not required
-
GET
/health- Returns API health status
- Auth: Not required
-
POST
/api/chat- Send text, image, or voice message
- Auth: Required
- Request Body:
Or
{ "message": "How do I use a drill?", "chat_id": "uuid-optional" }multipart/form-datafor image/audio uploads - Response:
{ "response": "AI-generated response text", "chat_id": "uuid", "scan_id": "uuid-if-tool-recognized" }
-
GET
/api/chats- Retrieve user's chat history
- Auth: Required
- Response: Array of chat objects
-
GET
/api/chats/{chat_id}- Get specific chat with messages
- Auth: Required
- Response: Chat object with messages array
-
POST
/api/generate-manual- Generate comprehensive tool manual
- Auth: Required
- Request Body:
{ "tool_name": "Power Drill", "language": "English", "generate_audio": true, "voice": "en-US-Journey-F" } - Response:
{ "tool_name": "Power Drill", "manual_content": "# Power Drill Manual...", "summary": "Brief summary...", "audio_url": "https://storage.url/audio.mp3", "youtube_info": {...} }
-
POST
/api/tool-research- Research tool and generate summary
- Auth: Required
- Request Body:
{ "tool_name": "Circular Saw" } - Response: Tool research data with web sources
- GET
/api/verify-token- Verify JWT token validity
- Auth: Required
- Response:
{ "user_id": "uuid", "email": "user@example.com" }
All endpoints return consistent error responses:
{
"detail": "Error message description"
}Status Codes:
200- Success400- Bad Request (invalid input)401- Unauthorized (missing/invalid token)404- Not Found500- Internal Server Error
Toolify uses Clerk for frontend authentication and Supabase Auth for backend verification:
-
User Sign-Up/Sign-In
- User authenticates via Clerk on frontend
- Clerk issues a JWT token
-
Token Validation
- Frontend includes JWT in
Authorization: Bearer <token>header - Backend validates token using Clerk's JWKS (JSON Web Key Set)
- Backend creates Supabase client with validated user context
- Frontend includes JWT in
-
Row-Level Security (RLS)
- Supabase enforces RLS policies on all tables
- Users can only access their own data
- Service role key bypasses RLS for admin operations
- ✅ JWT Validation: All protected routes verify Clerk-issued tokens
- ✅ CORS Protection: Configured origins prevent unauthorized access
- ✅ Environment Variables: Sensitive keys stored securely
- ✅ HTTPS: All production traffic encrypted
- ✅ RLS Policies: Database-level access control
- ✅ Input Validation: Pydantic schemas validate all inputs
- ✅ Rate Limiting: (Implemented via Render/Vercel)
Frontend middleware (middleware.ts) protects these routes:
{
routes: ["/chat/:path*", "/dashboard/:path*", "/api/:path*"];
}Toolify uses Supabase (PostgreSQL) with the following schema:
Stores user profile information synced from Clerk.
| Column | Type | Description |
|---|---|---|
id |
UUID | Primary key, matches Clerk user ID |
email |
TEXT | User email |
created_at |
TIMESTAMP | Account creation time |
updated_at |
TIMESTAMP | Last update time |
Stores chat conversations.
| Column | Type | Description |
|---|---|---|
id |
UUID | Primary key |
user_id |
UUID | Foreign key to profiles |
title |
TEXT | Chat title (auto-generated) |
created_at |
TIMESTAMP | Chat creation time |
updated_at |
TIMESTAMP | Last message time |
RLS Policy: Users can only access their own chats.
Stores individual chat messages.
| Column | Type | Description |
|---|---|---|
id |
UUID | Primary key |
chat_id |
UUID | Foreign key to chats |
user_id |
UUID | Foreign key to profiles |
role |
TEXT | 'user' or 'assistant' |
content |
TEXT | Message content |
created_at |
TIMESTAMP | Message timestamp |
RLS Policy: Users can only access messages from their own chats.
Stores tool recognition scan results.
| Column | Type | Description |
|---|---|---|
id |
UUID | Primary key |
user_id |
UUID | Foreign key to profiles |
image_url |
TEXT | Supabase Storage URL |
tool_name |
TEXT | Identified tool name |
description |
TEXT | Tool description |
safety_tips |
JSONB | Safety information |
youtube_links |
JSONB | Tutorial links |
created_at |
TIMESTAMP | Scan timestamp |
RLS Policy: Users can only access their own scans.
Stores uploaded tool images.
- Path:
{user_id}/{timestamp}_{filename} - Access: Private, RLS enforced
Stores generated audio manuals.
- Path:
{user_id}/{tool_name}_{timestamp}.mp3 - Access: Private, RLS enforced
-
Connect Repository
- Link GitHub repository to Vercel
- Vercel auto-detects Next.js configuration
-
Configure Environment Variables
Add these in Vercel project settings:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEYCLERK_SECRET_KEYCLERK_JWT_KEYNEXT_PUBLIC_RENDER_API_URLNEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_KEY
-
Deploy
git push origin main
Vercel automatically builds and deploys.
Production URL: https://toolify-gpt.vercel.app
The backend is configured for deployment via render.yaml:
-
Create Render Account
- Sign up at render.com
-
Create New Web Service
- Connect GitHub repository:
https://github.com/iwstech3/Toolify.git - Render auto-detects
render.yaml
- Connect GitHub repository:
-
Configure Environment Variables
Set these in Render dashboard:
GOOGLE_API_KEYTAVILY_API_KEYYARNGPT_API_KEYSUPABASE_URLSUPABASE_SERVICE_KEYSUPABASE_ANON_KEY
-
Deploy
- Render automatically builds and deploys
- Webhook available for manual deployments
Production URL: https://toolify-api.onrender.com
The render.yaml file includes:
services:
- type: web
name: Toolify API
env: python
repo: https://github.com/iwstech3/Toolify.git
branch: main
region: frankfurt
buildCommand: "pip install -r requirements.txt"
startCommand: "cd backend && uvicorn app.main:app --host 0.0.0.0 --port $PORT"
plan: freemain (production)
↑
└─ feature/your-feature-name (development)
Workflow:
-
Create feature branch:
git checkout -b feature/add-new-feature
-
Make changes and commit:
git add . git commit -m "Add: description of changes"
-
Push and create PR:
git push origin feature/add-new-feature
-
Request review and merge to
main
- Style: ESLint + Prettier
- Components: Functional components with hooks
- Naming: PascalCase for components, camelCase for functions
- Types: Explicit TypeScript types for all props and functions
- Style: PEP 8
- Type Hints: Required for all function signatures
- Docstrings: Required for public functions
- Async: Use
async/awaitfor I/O operations
Before submitting a PR:
- Code passes linting (
npm run lint/black+flake8) - All environment variables documented
- Tested locally with both frontend and backend running
- No console errors or warnings
- Authentication flows tested
- Error handling verified
-
Read Documentation
- Backend:
backend/README.md - Frontend:
frontend/README.md+frontend/SETUP.md - Integration:
INTEGRATION_GUIDE.md
- Backend:
-
Setup Development Environment
- Follow setup instructions for frontend and backend
- Create
.envfiles with test API keys - Verify everything runs locally
-
Join Communication Channels
- Slack:
#toolify-frontendand#toolify-backend - GitHub: Watch repository for updates
- Slack:
-
Pick a Task
- Check GitHub Issues for open tasks
- Ask team lead for assignment
- Start with "good first issue" labels
Title Format: [Type]: Brief description
Types:
Add: New featureFix: Bug fixRefactor: Code improvementDocs: Documentation updateStyle: UI/CSS changes
Description Template:
## What does this PR do?
Brief description of changes
## Why is this needed?
Justification for the change
## How has this been tested?
Testing steps performed
## Screenshots (if UI changes)
[Attach screenshots]
## Checklist
- [ ] Code follows style guidelines
- [ ] Self-reviewed code
- [ ] Tested locally
- [ ] Documentation updated- Backend API: http://localhost:8000/docs (Swagger UI)
- Integration Guide:
INTEGRATION_GUIDE.md - Frontend Setup:
frontend/SETUP.md
Issue: "Cannot find module '@clerk/nextjs'"
- Solution: Delete
node_modules, runnpm install
Issue: "Missing environment variables"
- Solution: Verify
.env.localexists and contains all required keys
Issue: "Authentication failed"
- Solution: Check Clerk keys, verify token in browser DevTools
Issue: "Signature has expired"
- Solution: Clerk token caching issue, restart backend server
Issue: "Foreign key constraint violation"
- Solution: User profile not synced to Supabase, check
dependencies.py
Issue: "Audio generation fails"
- Solution: Verify YarnGPT API key, check audio bucket exists
- Slack: #toolify-support
- Email: team-lead@example.com
- GitHub Issues: Report bugs
- ✅ Tool recognition via image upload
- ✅ Manual generation with audio
- ✅ Chat interface with history
- ✅ Clerk authentication
- ✅ Supabase storage and RLS
- ✅ YouTube integration
- Offline mode for manuals
- Multi-tool comparison
- AR tool identification via mobile camera
- Community-contributed manuals
- Advanced search and filtering
- Manual versioning and updates
- Real-time collaboration on manuals
- Integration with IoT tools for smart guidance
- Marketplace for premium manuals
- Multi-language expansion (10+ languages)
- Mobile native apps (iOS/Android)
This project is proprietary software developed for Toolify. All rights reserved.
Development Team:
- Frontend: Next.js + TypeScript specialists
- Backend: FastAPI + AI/ML engineers
- DevOps: Vercel + Render deployment
- Design: UI/UX designers
Technologies:
- Google Gemini - AI vision and text generation
- Clerk - Authentication
- Supabase - Database and storage
- Tavily - Web research
- Next.js - React framework
- FastAPI - Python web framework
Last Updated: December 19, 2024
Version: 1.0.0
Maintained By: Toolify Development Team