ScriptShare - Bash Script Library

A modern, community-driven platform for discovering, sharing, and collaborating on bash scripts for system administration, automation, and development.

Features

  • 🚀 Browse & Search: Find scripts by category, OS compatibility, and other filters
  • 📝 Submit Scripts: Share your scripts with the community
  • 🔍 Advanced Filtering: Filter by OS, categories, date added, and more
  • 👥 User Profiles: Manage your scripts and track contributions
  • 🛡️ Community Review: All scripts are reviewed for quality and security
  • 📊 Analytics: Track script views, downloads, and popularity
  • Rating System: Community ratings and feedback
  • 🎨 Modern UI: Beautiful, responsive design with dark/light themes
  • 🔐 Authentication: Secure user accounts and profiles

Tech Stack

  • Frontend: React 18 + TypeScript + Vite
  • Styling: Tailwind CSS + shadcn/ui components
  • Database: MySQL (Digital Ocean Managed Database)
  • ORM: Drizzle ORM
  • State Management: React Query + React Context
  • Routing: React Router DOM
  • Forms: React Hook Form + Zod validation

Getting Started

  1. Install dependencies:

    npm install
    
  2. Set up environment variables:

    cp .env.example .env.local
    # Edit .env.local with your database credentials
    
  3. Set up the database:

    npm run db:generate
    npm run db:migrate
    
  4. Start development server:

    npm run dev
    
  5. Open your browser: Navigate to http://localhost:5173

Database Setup

This app uses a MySQL database hosted on Digital Ocean. You'll need to:

  1. Create a managed MySQL database on Digital Ocean
  2. Get your connection credentials
  3. Update the .env.local file with your database details

Superuser Admin Setup

Run the interactive setup script to create your first superuser account:

npm run create-superuser

This will prompt you for:

  • Email address
  • Username
  • Display name
  • Password
  • Bio (optional)
  • Avatar URL (optional)

Option 2: Default Superuser Setup

Create a default superuser with predefined credentials:

npm run create-default-superuser

This creates a superuser with:

  • Email: admin@scriptshare.com
  • Username: admin
  • Password: admin123

Option 3: Oliver Super Admin Setup

To set up 'Oliver' as the super admin (as requested):

  1. Open the setup tool: Open setup-oliver-admin.html in your browser
  2. Click Setup: Click the "Setup Oliver Super Admin" button
  3. Navigate to ScriptShare: Go to your ScriptShare application
  4. Refresh the page: You should now be logged in as Oliver Super Admin

Oliver Super Admin Details:

  • Email: oliver@scriptshare.com
  • Username: oliver
  • Display Name: Oliver
  • Role: Super Administrator
  • Permissions: Full system access (12 permissions)

Admin Panel Features

Once logged in as a superuser, you can access the admin panel which includes:

  • Dashboard: System overview and quick actions
  • User Management: Create new admin users, promote existing users
  • Script Review: Approve/reject submitted scripts
  • Analytics: View system statistics and user activity
  • System Configuration: Manage application settings

Permission Levels

  • Super User: Full access to all features and permissions
  • Admin: Can manage users, moderate content, and view analytics
  • Moderator: Can approve/reject scripts and moderate comments
  • Regular User: Can submit scripts, comment, and rate content

Access Instructions

  1. Log in with your superuser/admin account
  2. Click on your user avatar in the top-right corner
  3. Select "Super Admin" (for superusers) or "Admin Panel" (for admins)
  4. Navigate between different admin views using the sidebar

Script Submission Process

  1. Users submit scripts through the /submit page
  2. Scripts are reviewed by community moderators
  3. Approved scripts appear in the public library
  4. Users can rate and download approved scripts

Contributing

We welcome contributions! Please see our contributing guidelines for more details.

License

This project is licensed under the MIT License.

Description
No description provided
Readme 311 KiB
Languages
TypeScript 86.1%
JavaScript 7.7%
Dockerfile 2.1%
HTML 1.9%
PowerShell 1.2%
Other 1%