Skip to content

saifyea/ai-store-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 AI Store API

A RESTful AI-powered API built with FastAPI that provides product management, AI chat, content generation, and price analysis endpoints.

Built with Python, FastAPI, and Anthropic Claude API.

✨ Features

  • 🚀 REST API built with FastAPI

  • ❤️ Health Check endpoint

  • 📦 Product Management API

  • 🔍 Product Search

  • ➕ Add New Products

  • 🤖 AI Chat endpoint

  • ✍️ AI Marketing Content Generator

  • 💰 AI Price Analysis

  • 📄 Interactive Swagger API Documentation

  • 🧪 API Testing Script

  • 🔐 Environment Variable Support

    🛠️ Tech Stack

  • Python

  • FastAPI

  • Uvicorn

  • Anthropic Claude API

  • Pydantic

  • python-dotenv


⚙️ How It Works

Client
   │
   ▼
FastAPI Server
   │
   ├── Product API
   ├── AI Chat
   ├── Content Generator
   ├── Price Analysis
   │
   ▼
Anthropic Claude API

📋 API Endpoints

Method Endpoint Description
GET /health Health check
GET /products Get all products
GET /products/search?name= Search products by name
POST /products Add a new product
GET /products/{id} Get product by ID
POST /chat AI chatbot endpoint
POST /generate Generate marketing content
POST /price-check AI-powered price analysis

🚀 Installation

Clone the repository

git clone https://github.com/saifyea/ai-store-api.git
cd ai-store-api

Install dependencies

pip install -r requirements.txt

Configure environment variables

Rename .env.example to .env and add your API key:

ANTHROPIC_API_KEY=your_api_key

Run the API

uvicorn main:app --reload

Open Swagger UI

http://127.0.0.1:8000/docs

💼 Business Use Case

This project demonstrates how AI-powered REST APIs can automate business operations and provide intelligent services through a modern web API.

Example Use Cases

  • 🛍️ E-commerce platforms
  • 📦 Inventory management systems
  • 🤖 AI customer support services
  • ✍️ Marketing content generation
  • 💰 Product pricing analysis
  • 📱 Mobile and web application backends

The API can be integrated with websites, mobile apps, or other business systems to provide AI-powered functionality.


📸 Demo

Interactive Swagger UI

FastAPI automatically generates interactive API documentation where every endpoint can be tested directly from the browser.

Swagger UI


🔮 Future Improvements

  • 🔐 User authentication (JWT)
  • 🗄️ Database integration (PostgreSQL/MySQL)
  • 📦 Product update & delete endpoints
  • 📈 Analytics dashboard
  • ☁️ Cloud deployment
  • 🧠 RAG-powered knowledge base
  • 🔑 API key authentication

📄 License

This project is created for educational and portfolio purposes.

About

AI-powered REST API built with FastAPI for product management, AI chat, content generation, and price analysis.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages