Skip to content

Muhammad-Rayyan-Moosani/TrackerFlow-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TrackerFlow AI

An AI-powered web application that generates custom trackers for tasks, habits, expenses, studies, and more. Built with Flask, React, and Claude AI, with Supabase for data storage and synchronization.

πŸš€ Features

  • AI-Powered Tracker Generation: Describe what you want to track in natural language, and the AI creates a custom tracker structure for you
  • Dynamic Field Types: Supports text, number, time, date, and boolean field types
  • Tracker History: View and manage all your previously created trackers
  • Data Persistence: All tracker templates and entries are stored in Supabase for seamless synchronization
  • Modern UI: Clean and intuitive React-based user interface

πŸ› οΈ Tech Stack

Backend

  • Flask: Python web framework
  • Anthropic Claude AI: For intelligent tracker generation
  • Supabase: Database and backend-as-a-service
  • Flask-CORS: Cross-origin resource sharing

Frontend

  • React 19: Modern React with hooks
  • Vite: Fast build tool and dev server
  • ESLint: Code linting and quality

πŸ“‹ Prerequisites

Before you begin, ensure you have the following installed:

  • Python 3.8 or higher
  • Node.js 16 or higher
  • npm or yarn
  • A Supabase account and project
  • An Anthropic API key (Claude AI)

πŸ”§ Installation

1. Clone the Repository

git clone https://github.com/Muhammad-Rayyan-Moosani/TrackerFlow-AI.git
cd TrackerFlow-AI

2. Backend Setup

# Navigate to backend directory
cd backend

# Create a virtual environment (recommended)
python -m venv venv

# Activate virtual environment
# On macOS/Linux:
source venv/bin/activate
# On Windows:
venv\Scripts\activate

# Install dependencies
pip install -r Requirements.txt

3. Frontend Setup

# Navigate to frontend directory
cd frontend

# Install dependencies
npm install

4. Environment Variables

Create a .env file in the backend directory with the following variables:

SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_key
CLAUDE-API-KEY=your_anthropic_api_key

πŸ—„οΈ Database Setup

You'll need to create the following tables in your Supabase database:

tracker_templates table

CREATE TABLE tracker_templates (
  id SERIAL PRIMARY KEY,
  user_id TEXT NOT NULL,
  tracker_name TEXT NOT NULL,
  fields_schema JSONB NOT NULL,
  created_at TIMESTAMP DEFAULT NOW()
);

tracker_entries table

CREATE TABLE tracker_entries (
  id SERIAL PRIMARY KEY,
  template_id INTEGER REFERENCES tracker_templates(id) ON DELETE CASCADE,
  data JSONB NOT NULL,
  created_at TIMESTAMP DEFAULT NOW()
);

πŸš€ Running the Application

Start the Backend

cd backend
python app.py

The Flask server will run on http://127.0.0.1:5000

Start the Frontend

cd frontend
npm run dev

The React app will run on http://localhost:5173 (or another port if 5173 is occupied)

πŸ“– Usage

  1. Generate a Tracker: Enter a description of what you want to track (e.g., "Daily exercise tracker with exercise type, duration, and calories burned")
  2. Fill in Data: The AI generates a custom form with appropriate fields based on your description
  3. Submit Entry: Save your tracker entry to the database
  4. View History: Access all your previously created trackers and their entries

🎯 Example Prompts

  • "I want a daily tasks tracker with Task, Start Time, End Time, Notes"
  • "Create a habit tracker for reading with book title, pages read, and date"
  • "Make an expense tracker with item name, amount, category, and date"
  • "Build a workout tracker with exercise type, sets, reps, and weight"

πŸ“ Project Structure

TrackerFlow-AI/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app.py              # Flask application and API routes
β”‚   β”œβ”€β”€ prompt.txt          # AI prompt template for tracker generation
β”‚   β”œβ”€β”€ Requirements.txt    # Python dependencies
β”‚   └── .env                # Environment variables (not in repo)
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ App.jsx         # Main application component
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ TrackerInput.jsx      # Tracker generation form
β”‚   β”‚   β”‚   β”œβ”€β”€ TrackerHistory.jsx    # History of created trackers
β”‚   β”‚   β”‚   └── TrackerEntries.jsx    # Display tracker entries
β”‚   β”‚   β”œβ”€β”€ StylesSheet.css # Application styles
β”‚   β”‚   └── main.jsx        # React entry point
β”‚   β”œβ”€β”€ package.json        # Node.js dependencies
β”‚   └── vite.config.js      # Vite configuration
└── README.md

πŸ”Œ API Endpoints

POST /generate-tracker

Generates a tracker structure based on user prompt.

Request Body:

{
  "prompt": "I want a daily tasks tracker"
}

Response:

{
  "tracker_name": "Daily Tasks Tracker",
  "fields": [
    {"name": "Task", "type": "text"},
    {"name": "Start Time", "type": "time"},
    {"name": "End Time", "type": "time"},
    {"name": "Notes", "type": "text"}
  ]
}

POST /data-entries

Saves a tracker entry to the database.

Request Body:

{
  "user_id": "user123",
  "tracker_name": "Daily Tasks Tracker",
  "fields_schema": [...],
  "entry_data": {...}
}

GET /get-tracker-templates?user_id={user_id}

Retrieves all tracker templates for a user.

GET /get-tracker-entries?id={tracker_id}

Retrieves all entries for a specific tracker.

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“ License

This project is open source and available under the MIT License.

πŸ‘€ Author

Muhammad Rayyan Moosani

πŸ™ Acknowledgments

  • Anthropic for Claude AI
  • Supabase for the backend infrastructure
  • The React and Flask communities

About

Creating an AI-powered Chrome extension that generates custom trackers for tasks, habits, expenses, studies, and more. Uses content scripts to extract page data and a Flask + OpenAI backend to build dynamic tracker structures. Stores and syncs user data with Supabase for a seamless, automated experience.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors