Skip to content

surya4419/StitchAPI

Repository files navigation

StitchAPI - Full Stack Application

A full-stack application with React frontend and Node.js/Express/MongoDB backend.

Project Structure

stitchapi/
├── frontend/                    # React + Vite Frontend
│   ├── src/
│   │   ├── components/         # UI Components
│   │   │   ├── ConnectModal.tsx
│   │   │   └── Icon.tsx
│   │   ├── context/            # React Context
│   │   │   ├── AuthContext.tsx
│   │   │   └── HexContext.tsx
│   │   ├── pages/              # Page Components
│   │   │   ├── Builder.tsx
│   │   │   ├── Console.tsx
│   │   │   ├── Dashboard.tsx
│   │   │   ├── Landing.tsx
│   │   │   ├── Login.tsx
│   │   │   └── Settings.tsx
│   │   ├── services/           # API Services
│   │   │   ├── api.ts          # Backend API calls
│   │   │   ├── apiConnectors.ts
│   │   │   ├── backend.ts
│   │   │   └── aiService.ts
│   │   ├── App.tsx
│   │   ├── constants.ts
│   │   ├── index.tsx
│   │   └── types.ts
│   ├── index.html
│   ├── package.json
│   ├── tsconfig.json
│   ├── vite.config.ts
│   ├── .env.example
│   └── .gitignore
│
├── backend/                     # Node.js + Express + MongoDB Backend
│   ├── src/
│   │   ├── models/             # Mongoose Models
│   │   │   ├── User.ts
│   │   │   └── Endpoint.ts
│   │   ├── routes/             # API Routes
│   │   │   ├── auth.ts
│   │   │   ├── endpoints.ts
│   │   │   └── execution.ts
│   │   ├── services/           # Business Logic
│   │   │   └── executionService.ts
│   │   └── server.ts           # Express Server
│   ├── package.json
│   ├── tsconfig.json
│   ├── .env.example
│   └── .gitignore
│
├── package.json                 # Root package.json for scripts
├── .gitignore
└── README.md

Setup Instructions

Backend Setup

  1. Navigate to backend directory:

    cd backend
  2. Install dependencies:

    npm install
  3. Create .env file:

    copy .env.example .env
  4. Update .env with your MongoDB connection string

  5. Start the development server:

    npm run dev

Backend will run on http://localhost:5000

Frontend Setup

  1. Navigate to frontend directory:

    cd frontend
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm run dev

Frontend will run on http://localhost:5173

MongoDB Setup

Make sure MongoDB is installed and running locally, or use MongoDB Atlas for a cloud database.

Local MongoDB: mongodb://localhost:27017/stitchapi

API Endpoints

Authentication

  • POST /api/auth/login - User login
  • POST /api/auth/signup - User signup

Endpoints Management

  • GET /api/endpoints - List user endpoints
  • POST /api/endpoints - Create endpoint
  • GET /api/endpoints/:id - Get single endpoint
  • DELETE /api/endpoints/:id - Delete endpoint

Execution

  • POST /api/execution/:endpointId - Execute endpoint

YouTube Integration (18 Endpoints)

  • GET /api/youtube/channel - Get channel information
  • GET /api/youtube/channel/statistics - Get channel statistics
  • GET /api/youtube/channel/uploads - Get uploaded videos
  • GET /api/youtube/subscriptions - Get subscriptions
  • GET /api/youtube/playlists - Get playlists
  • GET /api/youtube/playlists/:playlistId/items - Get playlist items
  • GET /api/youtube/liked-videos - Get liked videos
  • GET /api/youtube/rated-videos - Get rated videos (like/dislike)
  • GET /api/youtube/watch-later - Get Watch Later playlist
  • GET /api/youtube/watch-history - Get watch history
  • GET /api/youtube/subscription-videos - Get subscription activities
  • GET /api/youtube/subscription-feed - Get recent videos from subscriptions
  • GET /api/youtube/videos/:videoId - Get video details
  • GET /api/youtube/videos/:videoId/comments - Get video comments
  • GET /api/youtube/search - Search videos/channels/playlists
  • GET /api/youtube/trending - Get trending videos
  • GET /api/youtube/categories - Get video categories
  • GET /api/youtube/channels/:channelId - Get channel by ID

Supported API Integrations

StitchAPI supports real-time integration with multiple APIs:

  • GitHub - Repository stats, issues, pull requests
  • Spotify - Playlists, current track, top artists/tracks
  • Gmail - Inbox, sent, labels, message details
  • YouTube - Channel stats, subscriptions, playlists, liked videos, watch later
  • Weather - Current conditions via OpenWeatherMap
  • And more coming soon!

For detailed setup instructions:

Technologies

Frontend

  • React 19
  • TypeScript
  • Vite
  • React Router
  • Recharts
  • Lucide Icons

Backend

  • Node.js
  • Express
  • MongoDB + Mongoose
  • TypeScript
  • CORS
  • OAuth 2.0 Integration

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages