Skip to content

ArunKushhhh/floww

Repository files navigation

Floww

A powerful web scraping workflow automation platform built with Next.js 16. Create visual workflows to automate browser-based tasks, extract data with AI, and deliver results via webhooks.

Next.js React TypeScript Prisma

✨ Features

Workflow Automation

  • Visual Workflow Editor - Drag-and-drop interface using React Flow
  • Scheduled Workflows - Cron-based scheduling with automatic execution
  • Execution History - Track all workflow runs with detailed logs

Browser Automation Tasks

  • Launch Browser - Start automated browser sessions
  • Page to HTML - Extract HTML content from pages
  • Extract Text from Element - Get text using CSS selectors
  • Fill Input - Automate form filling
  • Click Element - Simulate user clicks
  • Wait for Element - Wait for elements to appear
  • Navigate URL - Navigate to different pages
  • Scroll to Element - Scroll page to specific elements

AI & Data Processing

  • Extract Data with AI - Use Google Gemini to intelligently extract structured data
  • Read/Add JSON Properties - Manipulate JSON data within workflows
  • Deliver via Webhook - Send results to external services

Platform Features

  • User Authentication - Secure login with Clerk
  • Credits System - Pay-per-use billing with Stripe
  • Credentials Vault - Securely store API keys and passwords (encrypted)
  • Analytics Dashboard - Track workflow performance and credit usage

πŸš€ Getting Started

Prerequisites

  • Node.js >= 18.x
  • npm or yarn or pnpm
  • Stripe Account (for billing features)
  • Clerk Account (for authentication)
  • Google AI API Key (optional, for AI extraction features)

Installation

  1. Clone the repository

    git clone https://github.com/ArunKushhhh/floww.git
    cd floww
  2. Install dependencies

    npm install
  3. Set up environment variables

    Create a .env.local file in the root directory:

    cp .env .env.local

    Then fill in the required values (see Environment Variables below).

  4. Set up the database

    npx prisma generate
    npx prisma db push
  5. Run the development server

    npm run dev
  6. Open the app

    Visit http://localhost:3000 in your browser.


πŸ” Environment Variables

Create a .env.local file with the following variables:

Authentication (Clerk)

Variable Description Required
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY Clerk publishable key (starts with pk_) βœ…
CLERK_SECRET_KEY Clerk secret key (starts with sk_) βœ…
NEXT_PUBLIC_CLERK_SIGN_IN_URL Sign-in page URL βœ…
NEXT_PUBLIC_CLERK_SIGN_UP_URL Sign-up page URL βœ…
NEXT_PUBLIC_CLERK_SIGN_UP_FORCE_REDIRECT_URL Redirect URL after sign-up βœ…

Example:

NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_xxxxx
CLERK_SECRET_KEY=sk_test_xxxxx
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_SIGN_UP_FORCE_REDIRECT_URL=/setup

Database (Prisma)

Variable Description Required
DATABASE_URL Database connection string βœ…

Example (SQLite - default):

DATABASE_URL="file:./prisma/dev.db"

Application

Variable Description Required
NEXT_PUBLIC_APP_URL Base URL of your application βœ…
API_SECRET Secret key for API authentication (generate a random string) βœ…
ENCRYPTION_KEY 32-byte hex key for encrypting credentials βœ…
NEXT_PUBLIC_DEV_MODE Enable development features (true/false) ❌

Example:

NEXT_PUBLIC_APP_URL=http://localhost:3000
API_SECRET=your-random-api-secret-key
ENCRYPTION_KEY=your-64-character-hex-string
NEXT_PUBLIC_DEV_MODE=false

To generate an encryption key:

node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

Stripe (Payments)

Variable Description Required
STRIPE_SECRET_KEY Stripe secret key βœ…
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY Stripe publishable key βœ…
STRIPE_WEBHOOK_SECRET Stripe webhook signing secret βœ…
STRIPE_SMALL_PACK_PRICE_ID Price ID for Small credits pack βœ…
STRIPE_MEDIUM_PACK_PRICE_ID Price ID for Medium credits pack βœ…
STRIPE_LARGE_PACK_PRICE_ID Price ID for Large credits pack βœ…

Example:

STRIPE_SECRET_KEY=sk_test_xxxxx
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_xxxxx
STRIPE_WEBHOOK_SECRET=whsec_xxxxx
STRIPE_SMALL_PACK_PRICE_ID=price_xxxxx
STRIPE_MEDIUM_PACK_PRICE_ID=price_xxxxx
STRIPE_LARGE_PACK_PRICE_ID=price_xxxxx

Note: You need to create products and prices in your Stripe dashboard, then copy the price IDs here.


πŸ“¦ Available Scripts

Command Description
npm run dev Start development server with hot reload
npm run build Build for production
npm run start Start production server
npm run lint Run ESLint

πŸ› οΈ Tech Stack


πŸ“ Project Structure

floww/
β”œβ”€β”€ app/                    # Next.js App Router
β”‚   β”œβ”€β”€ (auth)/            # Authentication pages (sign-in, sign-up)
β”‚   β”œβ”€β”€ (dashboard)/       # Dashboard pages
β”‚   β”‚   β”œβ”€β”€ billing/       # Billing & credits management
β”‚   β”‚   β”œβ”€β”€ credentials/   # Credentials vault
β”‚   β”‚   └── workflows/     # Workflow management
β”‚   β”œβ”€β”€ api/               # API routes
β”‚   β”‚   β”œβ”€β”€ webhooks/      # Stripe webhooks
β”‚   β”‚   └── workflows/     # Workflow execution endpoints
β”‚   β”œβ”€β”€ setup/             # User setup page
β”‚   └── workflow/          # Workflow editor
β”œβ”€β”€ actions/               # Server actions
β”‚   β”œβ”€β”€ analytics/         # Analytics actions
β”‚   β”œβ”€β”€ billing/           # Billing actions
β”‚   β”œβ”€β”€ credentials/       # Credentials actions
β”‚   └── workflows/         # Workflow actions
β”œβ”€β”€ components/            # React components
β”œβ”€β”€ hooks/                 # Custom React hooks
β”œβ”€β”€ lib/                   # Utility libraries
β”‚   β”œβ”€β”€ stripe/            # Stripe configuration
β”‚   └── workflow/          # Workflow execution engine
β”œβ”€β”€ prisma/                # Database schema & migrations
β”œβ”€β”€ providers/             # React context providers
β”œβ”€β”€ schemas/               # Zod validation schemas
β”œβ”€β”€ types/                 # TypeScript type definitions
└── public/                # Static assets

πŸ’³ Credits System

Floww uses a credit-based billing system:

Pack Credits Price
Small 1,000 $9.99
Medium 5,000 $39.99
Large 10,000 $69.99

New users receive 100 free credits upon signup. Different tasks consume varying amounts of credits based on complexity.


πŸ”’ Security

  • Credentials Encryption: All stored credentials are encrypted using AES-256-GCM
  • Authentication: Secured with Clerk's enterprise-grade auth
  • API Protection: Internal APIs are protected with secret key validation
  • Webhook Verification: Stripe webhooks are verified using signatures

πŸ“„ License

This project is private and proprietary.


🀝 Contributing

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


πŸ“ž Support

If you have any questions or need help, please open an issue in the repository.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published