Toothless AI is an intelligent AI-powered personal healthcare assistant designed to simplify daily health management through natural language conversations and structured health tracking.
Unlike traditional healthcare applications that focus on a single feature, Toothless AI combines conversational AI, symptom monitoring, medication management, mood tracking, health record organization, and wellness insights into one unified platform.
Powered by Claude AI, FastAPI, and SQLAlchemy, the application demonstrates how modern Large Language Models (LLMs) can be integrated into a scalable healthcare system while following clean software engineering principles.
Managing personal healthcare often requires using multiple disconnected applications:
- π Notes for symptoms
- π Medication reminder apps
- π Calendar reminders
- π Health journals
- π€ AI chatbots
- π Medical records
Switching between different applications makes health management fragmented and inefficient.
Toothless AI solves this problem by providing a centralized AI-driven healthcare platform where users can:
- Communicate naturally with an AI assistant
- Store personal medical records
- Track medications
- Monitor mood and wellness
- Maintain conversation history
- Organize health-related information in one place
|
|
|
Screenshots will be added here after deployment.
| Dashboard | AI Chat | Health Records |
|---|---|---|
![]() |
![]() |
![]() |
| Medication | Mood Tracker | Analytics |
|---|---|---|
![]() |
![]() |
![]() |
| Category | Technologies |
|---|---|
| Programming Language | Python |
| Backend Framework | FastAPI |
| AI Model | Claude AI (Anthropic) |
| Database ORM | SQLAlchemy |
| Database | SQLite |
| Frontend | HTML5, CSS3, JavaScript |
| Validation | Pydantic |
| API | RESTful APIs |
flowchart TD
A[π€ User]
B[π Frontend]
C[β‘ FastAPI Backend]
D[π§ Claude AI]
E[(π SQLite Database)]
F[SQLAlchemy ORM]
A --> B
B --> C
C --> D
C --> F
F --> E
D --> C
C --> B
B --> A
- Project Overview
- Features
- Architecture
- Folder Structure
- Installation
- Usage
- API Documentation
- Database Design
- AI Workflow
- Screenshots
- Future Roadmap
- Contributing
- License
- Author
Toothless AI follows a modular, layered architecture that separates the user interface, backend logic, AI engine, and database into independent components. This design improves maintainability, scalability, and makes it easier to add new features in the future.
graph LR
U[π€ User]
F[Frontend<br>HTML β’ CSS β’ JavaScript]
API[β‘ FastAPI Backend]
VAL[Pydantic Validation]
AI[π§ Claude AI]
DB[(SQLite)]
ORM[SQLAlchemy]
U --> F
F --> API
API --> VAL
VAL --> API
API --> AI
API --> ORM
ORM --> DB
AI --> API
API --> F
F --> U
Every interaction inside Toothless AI follows a structured workflow to ensure data validation, AI processing, and secure storage.
sequenceDiagram
participant User
participant Frontend
participant FastAPI
participant ClaudeAI
participant Database
User->>Frontend: Ask Question / Submit Health Data
Frontend->>FastAPI: HTTP Request
FastAPI->>FastAPI: Validate Data
FastAPI->>ClaudeAI: Generate AI Response
ClaudeAI-->>FastAPI: AI Reply
FastAPI->>Database: Store Conversation
Database-->>FastAPI: Success
FastAPI-->>Frontend: JSON Response
Frontend-->>User: Display Response
AI_Bot_Toothless
β
βββ π frontend
β βββ π index.html
β βββ π style.css
β βββ π app.js
β
βββ π main.py
βββ π toothless_ai.py
βββ π database.py
βββ π models.py
βββ π schemas.py
βββ π config.py
βββ π demo.py
β
βββ π requirements.txt
βββ π README.md
βββ π .gitignore
βββ π LICENSE
The project has been intentionally divided into multiple modules, each with a clearly defined responsibility. This keeps the codebase organized, easier to debug, and scalable for future development.
The frontend directory contains the complete client-side application that users interact with through the browser.
Responsible for:
- Application layout
- Chat interface
- Health forms
- Dashboard components
- User interaction elements
Handles:
- Responsive layout
- Typography
- Colors
- Cards
- Buttons
- Animations
- Mobile compatibility
Acts as the bridge between the frontend and backend.
Responsibilities include:
- Sending API requests
- Receiving AI responses
- Updating the interface dynamically
- Rendering chat messages
- Handling user interactions
The backend is built using FastAPI and follows a modular design.
Each Python module has a dedicated purpose.
The application's main entry point.
This file starts the FastAPI server and exposes all REST API endpoints.
- Initialize FastAPI
- Register routes
- Handle incoming HTTP requests
- Validate request data
- Call AI services
- Connect to database
- Return JSON responses
Contains the complete AI layer of the application.
Instead of mixing AI logic with API endpoints, Toothless AI keeps every AI-related operation inside a dedicated module.
- Prompt engineering
- Claude AI communication
- Response formatting
- Conversation management
- AI error handling
Centralized database connection manager.
Responsibilities:
- Create SQLAlchemy engine
- Initialize database
- Manage sessions
- Handle transactions
- Close connections safely
Defines the application's database schema using SQLAlchemy ORM.
It maps Python objects directly to SQLite tables.
The ORM approach eliminates the need to write raw SQL queries for everyday operations.
Contains every Pydantic model used for validating requests and formatting responses.
Benefits include:
- Automatic validation
- Type safety
- Better API documentation
- Cleaner error handling
Stores all configuration values used throughout the application.
Examples include:
- Claude API configuration
- Database settings
- Environment variables
- Application constants
Keeping configuration isolated makes the project easier to maintain and deploy.
Provides a simple demonstration of the application's functionality without requiring the full frontend workflow.
Useful for:
- Development
- Debugging
- Testing
- Demonstrations
Every technology used in Toothless AI was selected for a specific reason.
| Technology | Why It Was Chosen |
|---|---|
| FastAPI | High-performance asynchronous API framework with automatic documentation |
| Claude AI | Natural language understanding and contextual healthcare conversations |
| SQLAlchemy | Robust ORM that simplifies database operations |
| SQLite | Lightweight relational database suitable for local development |
| Pydantic | Strong data validation and serialization |
| HTML/CSS/JavaScript | Lightweight frontend without unnecessary dependencies |
The AI workflow follows a clean and modular pipeline.
flowchart LR
A[User Input]
B[Input Validation]
C[Prompt Construction]
D[Claude AI]
E[Response Processing]
F[Store Conversation]
G[Return Response]
A --> B
B --> C
C --> D
D --> E
E --> F
F --> G
The project follows several modern software engineering principles.
- β Modular Architecture
- β Separation of Concerns
- β RESTful API Design
- β Layered Application Structure
- β Reusable Components
- β Easy Maintenance
- β Scalable Code Organization
- β Clean Code Practices
These principles make Toothless AI easier to understand, test, maintain, and extend as the project evolves.
This guide will help you set up Toothless AI on your local machine for development and testing.
Before running the project, ensure you have the following installed:
| Requirement | Version |
|---|---|
| Python | 3.10 or later |
| pip | Latest |
| Git | Latest |
| Claude API Key | Required |
Verify your Python version:
python --versiongit clone https://github.com/psyccho00/AI_Bot_Toothless.gitMove into the project directory:
cd AI_Bot_ToothlessInstall all required packages using:
pip install -r requirements.txtToothless AI requires a Claude API key to communicate with the AI model.
Depending on your implementation, configure the API key inside your configuration file or using environment variables.
Example:
CLAUDE_API_KEY="YOUR_API_KEY"Security Tip: Never commit your personal API keys to GitHub.
Create a .env file in the project root:
CLAUDE_API_KEY=your_api_key_here
DATABASE_URL=sqlite:///toothless.dbThen load it using python-dotenv (if your project supports it).
Start the FastAPI server:
uvicorn main:app --reloador
python main.pyAfter starting the server, open your browser:
http://127.0.0.1:8000
FastAPI automatically generates interactive API documentation.
Swagger UI:
http://127.0.0.1:8000/docs
ReDoc:
http://127.0.0.1:8000/redoc
These interfaces allow developers to test endpoints directly from the browser.
The backend exposes RESTful endpoints responsible for communication between the frontend, AI engine, and database.
Typical functionality includes:
- AI Conversations
- Health Data Management
- Mood Tracking
- Medication Records
- Medical History
- User Information
POST /chat
Content-Type: application/jsonExample Request:
{
"message": "I have had a headache since yesterday."
}Example Response:
{
"response": "I'm sorry to hear that. A headache can have many causes. If it persists or becomes severe, it's best to consult a healthcare professional."
}The project uses SQLite with SQLAlchemy ORM.
The ORM layer maps Python classes directly to relational tables, making database operations cleaner and easier to maintain.
Typical stored information includes:
- User profile
- Mood logs
- Medication records
- Conversation history
- Health check-ins
Before pushing changes, verify the following:
- β Backend starts successfully
- β Database initializes correctly
- β Claude AI responds correctly
- β Frontend loads without errors
- β API endpoints return expected responses
- β Health records are stored successfully
Testing each component individually helps maintain application stability.
The recommended workflow for contributors:
Clone Repository
β
βΌ
Create Virtual Environment
β
βΌ
Install Dependencies
β
βΌ
Configure API Key
β
βΌ
Run FastAPI Server
β
βΌ
Test Features
β
βΌ
Commit Changes
β
βΌ
Push to GitHub
Toothless AI has been designed with maintainability in mind.
Key design decisions include:
- Modular project structure
- Lightweight SQLite database
- SQLAlchemy ORM for abstraction
- FastAPI for high-performance APIs
- Separation of AI logic from API routes
- Reusable backend components
These choices make the application easier to extend and migrate to larger production environments.
Toothless AI follows a layered architecture where each component has a single responsibility. This separation keeps the code clean, maintainable, and easy to extend.
The overall execution flow is shown below:
flowchart TD
A[π€ User Opens Application]
B[Frontend Interface]
C[FastAPI Route]
D[Pydantic Validation]
E[Business Logic]
F[Claude AI]
G[SQLAlchemy ORM]
H[(SQLite Database)]
I[JSON Response]
A --> B
B --> C
C --> D
D --> E
E --> F
E --> G
G --> H
F --> I
G --> I
I --> B
The backend follows a modular design where every Python file has a clearly defined responsibility.
Instead of writing everything inside one file, the project separates routing, AI communication, database operations, validation, and configuration into independent modules.
This approach provides:
- Better readability
- Easier debugging
- Improved scalability
- Reusable code
- Cleaner project organization
main.py is the entry point of the application.
It initializes the FastAPI server, configures routes, validates incoming requests, communicates with the AI module, interacts with the database, and returns structured JSON responses to the frontend.
- Initialize FastAPI
- Register REST endpoints
- Handle HTTP requests
- Coordinate backend modules
- Return API responses
This module contains the AI engine of Toothless AI.
Instead of embedding AI logic directly inside API routes, all Claude AI communication is isolated here.
- Prompt construction
- Claude AI communication
- Response processing
- Conversation handling
- Exception management
This separation allows the AI model to be replaced in the future without changing the API layer.
Handles all database connectivity.
Responsibilities include:
- Creating the SQLAlchemy engine
- Managing database sessions
- Opening and closing connections
- Handling transactions
Having a dedicated database layer prevents duplicated connection logic throughout the project.
Defines the database schema using SQLAlchemy ORM.
Each class represents a table in the SQLite database.
The ORM automatically maps Python objects to relational database tables, reducing the need for raw SQL queries.
Contains all Pydantic models used for request validation and response serialization.
Benefits include:
- Automatic input validation
- Type checking
- Better error messages
- Cleaner API design
- Automatic documentation generation
Stores application-wide configuration values.
Typical examples include:
- Claude API configuration
- Database configuration
- Environment settings
- Project constants
Centralizing configuration makes deployment easier and reduces maintenance effort.
A lightweight demonstration script used during development for testing individual features without running the complete application.
The frontend provides a lightweight user interface built using standard web technologies.
Responsible for:
- Page structure
- Forms
- Layout
- Chat interface
Responsible for:
- Responsive design
- Typography
- Colors
- Cards
- Buttons
- Visual styling
Acts as the communication bridge between the frontend and backend.
Responsibilities include:
- Sending HTTP requests
- Receiving AI responses
- Updating the UI
- Rendering conversation history
- Handling user interactions
sequenceDiagram
participant User
participant Frontend
participant FastAPI
participant ClaudeAI
participant Database
User->>Frontend: Submit Message
Frontend->>FastAPI: HTTP POST
FastAPI->>FastAPI: Validate Request
FastAPI->>ClaudeAI: Generate AI Response
ClaudeAI-->>FastAPI: AI Response
FastAPI->>Database: Save Conversation
Database-->>FastAPI: Success
FastAPI-->>Frontend: JSON Response
Frontend-->>User: Display Result
This project has been developed primarily as a portfolio and educational application.
For production deployment, the following improvements are recommended:
- Store secrets using environment variables
- Never commit API keys
- Use HTTPS
- Implement user authentication
- Encrypt sensitive data
- Add rate limiting
- Validate all user input
- Configure CORS securely
- Maintain audit logs
- Perform regular dependency updates
The modular architecture allows Toothless AI to be deployed on a variety of platforms.
Possible deployment options include:
| Platform | Suitable |
|---|---|
| Render | β |
| Railway | β |
| AWS | β |
| Azure | β |
| Google Cloud | β |
| Docker | β |
Although SQLite is currently used for development simplicity, the architecture has been intentionally designed so that migrating to PostgreSQL or MySQL requires minimal changes.
Similarly, the AI layer is abstracted, allowing Claude AI to be replaced with another LLM if needed.
These design decisions make the project suitable for future expansion without major architectural changes.
Toothless AI has been designed with scalability in mind. While the current version demonstrates a complete AI-powered healthcare assistant, several advanced features can be added in future releases.
- Long-term conversation memory
- Personalized healthcare recommendations
- AI-generated weekly health summaries
- Nutrition and diet suggestions
- Personalized exercise recommendations
- Multi-language support
- Context-aware health insights
- Appointment scheduling
- Medication reminders and notifications
- Symptom trend analysis
- Daily wellness reports
- Health score dashboard
- Medical report uploads
- Vaccination tracking
- Emergency contact support
Future versions may include:
- Interactive dashboards
- Weekly health reports
- Monthly analytics
- Mood trend visualization
- Medication adherence tracking
- AI-generated wellness insights
Potential security improvements include:
- JWT Authentication
- Google OAuth
- GitHub OAuth
- Email verification
- Password reset
- Role-Based Access Control (RBAC)
The application architecture supports deployment to modern cloud platforms.
Possible deployment targets include:
- AWS
- Microsoft Azure
- Google Cloud Platform
- Railway
- Render
- Docker
- Kubernetes
The project should be tested at multiple levels to ensure reliability.
- API endpoint validation
- Request validation
- Database CRUD operations
- AI response handling
- Error handling
- User interface responsiveness
- API integration
- Form validation
- Browser compatibility
- Frontend β Backend communication
- Backend β Database interaction
- Backend β Claude AI integration
During the development of Toothless AI, several software engineering challenges were addressed.
Instead of placing all functionality in a single file, the project separates:
- API routes
- AI communication
- Database operations
- Validation
- Configuration
This makes the application easier to maintain and extend.
The Claude AI layer is isolated from the API routes.
This allows the AI provider to be replaced in the future without changing the overall application architecture.
Using SQLAlchemy ORM removes the need for raw SQL queries in most cases, resulting in cleaner and more maintainable code.
Building Toothless AI strengthened my understanding of:
- Python Backend Development
- FastAPI
- REST API Design
- SQLAlchemy ORM
- SQLite Database Design
- Pydantic Validation
- AI Integration using Claude API
- Prompt Engineering
- Frontend and Backend Communication
- Modular Software Architecture
- Clean Code Practices
Contributions are welcome!
If you would like to improve Toothless AI:
Click the Fork button on GitHub.
git clone https://github.com/your-username/AI_Bot_Toothless.gitgit checkout -b feature/new-featuregit commit -m "Add new feature"git push origin feature/new-featurePlease ensure your code:
- Follows the existing project structure
- Includes meaningful commit messages
- Maintains code readability
- Does not break existing functionality
This project is licensed under the MIT License.
You are free to use, modify, and distribute this project for educational and personal purposes.
For commercial usage, please review the terms of the MIT License.
Mechanical Engineering Graduate | AI & Data Science Enthusiast
Building intelligent applications using modern AI technologies, scalable backend systems, and clean software architecture.
π Python β’ β‘ FastAPI β’ π§ Claude AI β’ π SQLAlchemy β’ SQLite β’ π HTML β’ π¨ CSS β’ π JavaScript
If you found this project helpful or interesting:
- β Star the repository
- π΄ Fork the project
- π Report bugs
- π‘ Suggest new features
- π’ Share it with others
Your support helps improve the project and encourages future development.
This project was built using several outstanding open-source technologies.
Special thanks to:
- FastAPI
- SQLAlchemy
- Anthropic Claude AI
- SQLite
- Python Community





