10000 GitHub - heyimsteve/x4rce: X4RCE is a powerful AI workforce management platform that helps you create and manage specialized teams of AI agents. These agents collaborate to accomplish your tasks and projects efficiently.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

X4RCE is a powerful AI workforce management platform that helps you create and manage specialized teams of AI agents. These agents collaborate to accomplish your tasks and projects efficiently.

License

Notifications You must be signed in to change notification settings

heyimsteve/x4rce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

X4RCE - AI Workforce Management Platform

X4RCE Logo

X4RCE is a powerful AI workforce management platform that helps you create and manage specialized teams of AI agents. These agents collaborate to accomplish your tasks and projects efficiently.

Preview

Screenshot 2025-05-02 at 3 37 14β€―PM Screenshot 2025-05-02 at 2 55 07β€―PM Screenshot 2025-05-02 at 2 49 17β€―PM Screenshot 2025-05-02 at 2 49 42β€―PM Screenshot 2025-05-02 at 2 50 22β€―PM Screenshot 2025-05-02 at 2 50 38β€―PM Screenshot 2025-05-02 at 2 53 14β€―PM Screenshot 2025-05-02 at 2 53 46β€―PM

🌟 Features

  • AI Team Creation: Generate specialized AI teams based on your project needs
  • Task Management: Create and assign tasks to your AI team
  • Team Chat: Communicate directly with your AI team
  • Collaborative Workflow: AI agents work together in a defined sequence
  • Subscription Tiers: Free trial, Starter, and Pro plans with different resource limits
  • Admin Dashboard: Comprehensive admin tools for user and system management

πŸ“‹ Table of Contents

πŸš€ Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • npm (v8 or higher)
  • Supabase account
  • OpenAI API key (for AI agent functionality)
  • Google Gemini API key (optional, for alternative AI provider)
  • Stripe account (for subscription management)

Installation

  1. Clone the repository:

    git clone https://github.com/heyimsteve/x4rce.git
    cd x4rce
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm run dev

Environment Setup

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

VITE_SUPABASE_URL=your_supabase_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
VITE_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
VITE_STRIPE_SECRET_KEY=your_stripe_secret_key

πŸ—οΈ Project Structure

x4rce/
β”œβ”€β”€ public/                  # Static assets
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/          # Shared UI components
β”‚   β”œβ”€β”€ features/            # Feature-based modules
β”‚   β”‚   β”œβ”€β”€ admin/           # Admin dashboard
β”‚   β”‚   β”œβ”€β”€ agents/          # AI agent management
β”‚   β”‚   β”œβ”€β”€ auth/            # Authentication
β”‚   β”‚   β”œβ”€β”€ plans/           # Subscription plans
β”‚   β”‚   β”œβ”€β”€ settings/        # User settings
β”‚   β”‚   β”œβ”€β”€ shared/          # Shared components
β”‚   β”‚   β”œβ”€β”€ support/         # Support ticket system
β”‚   β”‚   β”œβ”€β”€ tasks/           # Task management
β”‚   β”‚   └── workforces/      # Project management
β”‚   β”œβ”€β”€ hooks/               # Custom React hooks
β”‚   β”œβ”€β”€ lib/                 # Utility libraries
β”‚   β”œβ”€β”€ services/            # Service layer
β”‚   β”‚   β”œβ”€β”€ agent/           # Agent collaboration services
β”‚   β”‚   └── llm/             # Language model services
β”‚   β”œβ”€β”€ store/               # Redux store
β”‚   β”œβ”€β”€ styles/              # Global styles
β”‚   β”œβ”€β”€ types/               # TypeScript type definitions
β”‚   β”œβ”€β”€ App.tsx              # Main application component
β”‚   └── main.tsx             # Application entry point
β”œβ”€β”€ supabase/
β”‚   β”œβ”€β”€ functions/           # Supabase Edge Functions
β”‚   └── migrations/          # Database migrations
β”œβ”€β”€ .env                     # Environment variables
β”œβ”€β”€ package.json             # Project dependencies
β”œβ”€β”€ tailwind.config.js       # Tailwind CSS configuration
β”œβ”€β”€ tsconfig.json            # TypeScript configuration
└── vite.config.ts           # Vite configuration

🧩 Key Components

Authentication

The platform uses Supabase Authentication for user management. Features include:

  • Email/password sign-up and sign-in
  • Profile management
  • Session handling
// Example usage of authentication
import { useAuth } from './features/auth/hooks/useAuth';

const { user, signIn, signUp, signOut } = useAuth();

Workforces (Projects)

Workforces are the main organizational unit, representing projects with specific goals:

  • Create and manage projects
  • Generate AI team workflows
  • View project analytics
// Example of creating a workforce
const { createWorkforce } = useCreateWorkforce();
const workforce = await createWorkforce('Project Name', 'Project Description');

AI Agents

AI agents are specialized team members with specific roles:

  • Create agents with defined roles and responsibilities
  • Customize agent behavior
  • Manage agent execution order
// Example of creating an agent
const { createAgent } = useCreateAgent();
const success = await createAgent({
  name: 'Agent Name',
  position: 'Research Analyst',
  role: 'You are a research analyst responsible for...',
  responsibilities: 'Conduct research, analyze data...',
  provider: 'openai',
  workforceId: 'workforce-id',
  status: 'active'
});

Tasks

Tasks are assignments for your AI team:

  • Create tasks with detailed descriptions
  • Execute tasks to trigger AI agent collaboration
  • View task results and agent contributions
// Example of creating a task
const { createTask } = useCreateTask();
const success = await createTask({
  title: 'Task Title',
  description: 'Detailed task description...',
  workforceId: 'workforce-id',
  status: 'pending'
});

Team Chat

Communicate directly with your AI team:

  • Ask questions to your AI team
  • Get responses from the most appropriate agent
  • Clear chat history as needed
// Example of sending a message
const { sendMessage } = useTeamChat(workforceId);
await sendMessage('Can you help me with...');

Subscription Management

Manage user subscriptions and resource limits:

  • Free trial, Starter, and Pro plans
  • Usage tracking for workforces, agents, and tasks
  • ReUp packages for additional resources
// Example of checking subscription
const { subscription, usageLimits } = useSubscription();

Support System

Built-in support ticket system:

  • Create and manage support tickets
  • Attach files to tickets
  • Track ticket status
// Example of creating a support ticket
const { createTicket } = useCreateTicket();
const success = await createTicket({
  subject: 'Ticket Subject',
  description: 'Detailed description...',
  priority: 'normal',
  files: []
});

Admin Dashboard

Comprehensive admin tools (for admin users only):

  • User management
  • Subscription management
  • Global API key configuration
  • Usage limits configuration
// Example of admin function
const { updateUserSubscription } = useUserDetails(userId);
await updateUserSubscription('pro');

πŸ—„οΈ Database Schema

The application uses Supabase as its database with the following main tables:

  • workforces: Projects containing AI teams
  • agents: AI team members with specific roles
  • tasks: Assignments for AI teams
  • task_messages: Messages from AI agents during task execution
  • workforce_chat: Team chat messages
  • subscriptions: User subscription information
  • usage_limits: Resource limits and usage tracking
  • support_tickets: Support ticket system
  • ticket_responses: Responses to support tickets
  • admin_settings: Global admin configuration

πŸ”Œ API Integration

The platform integrates with several external APIs:

OpenAI API

Used for generating AI agent responses and images.

// Example of OpenAI integration
const openai = new OpenAIService();
await openai.initialize();
const response = await openai.generateResponse(prompt);

Google Gemini API

Alternative AI provider for agent responses.

// Example of Gemini integration
const gemini = new GeminiService();
await gemini.initialize();
const response = await gemini.generateResponse(prompt);

Stripe API

Handles subscription payments and billing.

// Example of Stripe integration
const { redirectToCheckout } = useStripeCheckout();
await redirectToCheckout(tier, customerId);

🚒 Deployment

The project is configured for deployment on Netlify:

  1. Connect your GitHub repository to Netlify
  2. Set up the required environment variables
  3. Configure the build settings:
    • Build command: npm run build
    • Publish directory: dist

The netlify.toml file in the repository handles the configuration automatically.

πŸ‘¨β€πŸ’Ό Admin Configuration

Changing the Admin Email

The admin email is hardcoded in two locations in the codebase. To change the admin email, you need to modify both files:

  1. In src/App.tsx:

    // Find this line:
    const isAdmin = user?.email === 'heyimsteve.com@gmail.com';
    
    // Change it to your admin email:
    const isAdmin = user?.email === 'your-admin-email@example.com';
  2. In src/components/Sidebar.tsx:

    // Find this line:
    const isAdmin = user?.email === 'heyimsteve.com@gmail.com';
    
    // Change it to your admin email:
    const isAdmin = user?.email === 'your-admin-email@example.com';
  3. In Supabase database functions:

    You'll need to update the admin email check in several database functions. The easiest way to do this is to create a new migration file in the supabase/migrations directory with the following content:

    -- Create function to update admin email in all functions
    CREATE OR REPLACE FUNCTION update_admin_email(
      old_email text,
      new_email text
    )
    RETURNS void
    LANGUAGE plpgsql
    AS $$
    DECLARE
      func_name text;
      func_def text;
      updated_def text;
    BEGIN
      -- Loop through all functions that check for admin email
      FOR func_name, func_def IN
        SELECT p.proname, pg_get_functiondef(p.oid)
        FROM pg_proc p
        JOIN pg_namespace n ON p.pronamespace = n.oid
        WHERE n.nspname = 'public'
        AND pg_get_functiondef(p.oid) LIKE '%' || old_email || '%'
      LOOP
        -- Replace old email with new email
        updated_def := replace(func_def, old_email, new_email);
        
        -- Execute the updated function definition
        EXECUTE updated_def;
      END LOOP;
    END;
    $$;

    Then run this function through the Supabase SQL editor:

    SELECT update_admin_email('heyimsteve.com@gmail.com', 'your-admin-email@example.com');

After making these changes, the new email will have admin privileges throughout the application.

πŸ‘₯ Contributing

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

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgements

About

X4RCE is a powerful AI workforce management platform that helps you create and manage specialized teams of AI agents. These agents collaborate to accomplish your tasks and projects efficiently.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

0