Transform AI-generated content into natural, human-like text that bypasses AI detection tools using advanced OpenAI technology.
- AI Text Humanization: Convert AI-generated content to human-like text using OpenAI
- Document Processing: Upload and process .txt, .docx, and .pdf files
- Customizable Options: Adjust readability level, writing purpose, and humanization strength
- User Authentication: Secure user accounts with Supabase Auth
- Credit System: Track usage with built-in credit management
- History Tracking: View and manage your humanization history
- Real-time Processing: Live text transformation with instant feedback
- Responsive Design: Works seamlessly on desktop and mobile devices
Visit the live application: AI Humanizer
- Frontend: React 18, TypeScript, Vite
- UI Framework: Tailwind CSS, shadcn/ui
- Backend: Supabase (Database, Authentication, Edge Functions)
- AI Integration: OpenAI API for text humanization
- Deployment: GitHub Pages with GitHub Actions
- State Management: TanStack React Query
- Routing: React Router DOM
- Icons: Lucide React
- Node.js 18+ and npm
- Supabase account
- OpenAI API key
-
Clone the repository
git clone https://github.com/jeet-51/wordcraft-rewriter-hub.git cd wordcraft-rewriter-hub -
Install dependencies
npm install
-
Set up Supabase
- Create a new Supabase project
- Run the SQL migrations (see Database Setup section)
- Configure authentication providers
-
Configure environment variables
- Update
src/integrations/supabase/client.tswith your Supabase project details - Add your OpenAI API key to Supabase Edge Function secrets
- Update
-
Start development server
npm run dev
-
Open your browser Navigate to
http://localhost:8080
The application uses Supabase as the backend. Run these SQL commands in your Supabase SQL editor:
-- Create profiles table
CREATE TABLE public.profiles (
id uuid NOT NULL REFERENCES auth.users ON DELETE CASCADE,
username text,
credits_total integer DEFAULT 10,
credits_used integer DEFAULT 0,
plan text DEFAULT 'free',
created_at timestamp with time zone DEFAULT now(),
updated_at timestamp with time zone DEFAULT now(),
PRIMARY KEY (id)
);
-- Create humanizations table
CREATE TABLE public.humanizations (
id uuid NOT NULL DEFAULT gen_random_uuid(),
user_id uuid NOT NULL REFERENCES auth.users ON DELETE CASCADE,
original_text text NOT NULL,
humanized_text text NOT NULL,
created_at timestamp with time zone DEFAULT now(),
PRIMARY KEY (id)
);
-- Create contact_messages table
CREATE TABLE public.contact_messages (
id uuid NOT NULL DEFAULT gen_random_uuid(),
user_id uuid REFERENCES auth.users ON DELETE CASCADE,
name text NOT NULL,
email text NOT NULL,
message text NOT NULL,
created_at timestamp with time zone DEFAULT now(),
PRIMARY KEY (id)
);
-- Create payment_history table
CREATE TABLE public.payment_history (
id uuid NOT NULL DEFAULT gen_random_uuid(),
user_id uuid NOT NULL REFERENCES auth.users ON DELETE CASCADE,
plan_id text NOT NULL,
plan_name text NOT NULL,
amount text NOT NULL,
created_at timestamp with time zone DEFAULT now(),
PRIMARY KEY (id)
);
-- Enable Row Level Security
ALTER TABLE public.profiles ENABLE ROW LEVEL SECURITY;
ALTER TABLE public.humanizations ENABLE ROW LEVEL SECURITY;
ALTER TABLE public.contact_messages ENABLE ROW LEVEL SECURITY;
ALTER TABLE public.payment_history ENABLE ROW LEVEL SECURITY;
-- Create RLS policies
CREATE POLICY "Users can view own profile" ON public.profiles FOR SELECT USING (auth.uid() = id);
CREATE POLICY "Users can update own profile" ON public.profiles FOR UPDATE USING (auth.uid() = id);
CREATE POLICY "Users can view own humanizations" ON public.humanizations FOR SELECT USING (auth.uid() = user_id);
CREATE POLICY "Users can insert own humanizations" ON public.humanizations FOR INSERT WITH CHECK (auth.uid() = user_id);
-- Create trigger for new user profiles
CREATE OR REPLACE FUNCTION public.handle_new_user()
RETURNS trigger AS $$
BEGIN
INSERT INTO public.profiles (id, username, credits_total, credits_used, plan)
VALUES (new.id, new.raw_user_meta_data->>'username', 10, 0, 'free');
RETURN NEW;
END;
$$ LANGUAGE plpgsql SECURITY DEFINER;
CREATE TRIGGER on_auth_user_created
AFTER INSERT ON auth.users
FOR EACH ROW EXECUTE PROCEDURE public.handle_new_user();The application uses a Supabase Edge Function for OpenAI integration. The function is located at supabase/functions/humanize-text/index.ts.
Required secrets in Supabase:
OPENAI_API_KEY: Your OpenAI API key
The project is configured for automatic deployment to GitHub Pages using GitHub Actions:
-
Enable GitHub Pages
- Go to your repository settings
- Navigate to Pages section
- Select "GitHub Actions" as the source
-
Workflow Permissions
- Go to Settings β Actions β General
- Set "Workflow permissions" to "Read and write permissions"
- Enable "Allow GitHub Actions to create and approve pull requests"
-
Deploy
- Push to the main branch
- GitHub Actions will automatically build and deploy your site
- Sign up/Login to your account
- Navigate to the Humanizer tab
- Paste your AI-generated text (minimum 50 characters)
- Adjust humanization options:
- Readability level (High School to Doctorate)
- Writing purpose (General, Academic, Business, etc.)
- Humanization strength (0.1 - 0.9)
- Click "Humanize Text" and wait for results
- Copy the humanized text or view it in your history
- Go to the Documents tab
- Upload a .txt, .docx, or .pdf file (max 10MB)
- Extract text from the document
- Humanize the extracted text with one click
- View results in the History tab
- View credit usage in the dashboard
- Access humanization history
- Upgrade your plan for more credits
- Contact support for assistance
interface HumanizationOptions {
readability?: 'High School' | 'University' | 'Doctorate' | 'Journalist' | 'Marketing';
purpose?: 'General Writing' | 'Academic' | 'Business' | 'Creative' | 'Technical';
strength?: number; // 0.1 to 0.9
}interface Profile {
id: string;
username?: string;
credits_total: number;
credits_used: number;
plan: 'free' | 'basic' | 'premium';
created_at: string;
updated_at: string;
}The project is pre-configured for GitHub Pages deployment:
# Push to main branch
git push origin main
# GitHub Actions will automatically deploy to:
# https://jeet-51.github.io/wordcraft-rewriter-hub/# Build for production
npm run build
# Preview build locally
npm run previewnpm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLintsrc/
βββ components/ # Reusable UI components
β βββ ui/ # shadcn/ui components
β βββ dashboard/ # Dashboard-specific components
β βββ humanizer/ # Humanizer tool components
β βββ document/ # Document processing components
βββ hooks/ # Custom React hooks
βββ lib/ # Utility functions and Supabase client
βββ pages/ # Page components
βββ context/ # React context providers
βββ integrations/ # Third-party integrations
HumanizerTool: Main text humanization interfaceDocumentExtractor: File upload and text extractionuseTextHumanization: Hook for text processing logicAuthContext: User authentication management
- Row Level Security: Implemented on all database tables
- User Authentication: Secure authentication via Supabase Auth
- API Protection: Edge functions with proper error handling
- Input Validation: Client and server-side validation
- CORS: Properly configured for secure API calls
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow TypeScript best practices
- Use Tailwind CSS for styling
- Implement proper error handling
- Add tests for new features
- Keep components small and focused
- Follow the existing code style
- Documentation: Project Wiki
- Issues: GitHub Issues
- Contact: Use the contact form in the application
- OpenAI for AI text processing
- Supabase for backend infrastructure
- shadcn/ui for beautiful UI components
- Tailwind CSS for styling
- Lucide for icons
- β Core humanization functionality
- β User authentication and profiles
- β Document processing
- β Credit system
- β History tracking
- β GitHub Pages deployment
- π Payment integration (in progress)
- π Advanced analytics (planned)
Built with β€οΈ using React, TypeScript, and Supabase