Todo-Full-Stack-Web-Application

AI-Powered Natural Language Todo Interface

This project implements an AI-powered todo management system that allows users to interact with their todo lists using natural language commands.

Architecture

The system consists of two main components:

  1. Backend - Built with FastAPI, SQLModel, and OpenAI Agents SDK
  2. Frontend - Built with Next.js and OpenAI ChatKit

Features

Tech Stack

Backend

Frontend

Setup Instructions

Backend Setup

  1. Navigate to the backend directory:
    cd backend
    
  2. Install dependencies:
    pip install -r requirements.txt
    
  3. Set up environment variables:
    cp .env.example .env
    # Edit .env and add your API keys and database URL
    
  4. Run the application:
    python -m src.main
    

Frontend Setup

  1. Navigate to the frontend directory:
    cd frontend
    
  2. Install dependencies:
    npm install
    
  3. Set up environment variables:
    cp .env.example .env.local
    # Edit .env.local and configure your API URLs
    
  4. Run the development server:
    npm run dev
    

API Endpoints

Environment Variables

Backend (.env)

DATABASE_URL=postgresql://username:password@localhost:5432/todo_db
OPENAI_API_KEY=your-openai-api-key
NEON_DATABASE_URL=your-neon-database-url
BETTER_AUTH_SECRET=your-secret-key
BETTER_AUTH_URL=http://localhost:3000

Frontend (.env.local)

NEXT_PUBLIC_API_BASE_URL=http://localhost:8000
NEXT_PUBLIC_BETTER_AUTH_URL=http://localhost:3000
NEXT_PUBLIC_OPENAI_DOMAIN_KEY=your-openai-domain-key

Note: The NEXT_PUBLIC_OPENAI_DOMAIN_KEY is required for authenticating with OpenAI services. You can obtain this key from your OpenAI dashboard.

Usage Examples

Once the application is running, you can interact with the AI assistant using natural language:

MCP Tools

The system exposes the following MCP tools for AI agents:

Testing

To run the integration tests:

cd backend
pytest test_integration.py

Security