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
-
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env.local # Edit .env.local with your database credentials
-
Set up the database:
npm run db:generate npm run db:migrate
-
Start development server:
npm run dev
-
Open your browser: Navigate to
http://localhost:5173
Database Setup
This app uses a MySQL database hosted on Digital Ocean. You'll need to:
- Create a managed MySQL database on Digital Ocean
- Get your connection credentials
- Update the
.env.local
file with your database details
Superuser Admin Setup
Option 1: Interactive Setup (Recommended for First Time)
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):
- Open the setup tool: Open
setup-oliver-admin.html
in your browser - Click Setup: Click the "Setup Oliver Super Admin" button
- Navigate to ScriptShare: Go to your ScriptShare application
- 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
- Log in with your superuser/admin account
- Click on your user avatar in the top-right corner
- Select "Super Admin" (for superusers) or "Admin Panel" (for admins)
- Navigate between different admin views using the sidebar
Script Submission Process
- Users submit scripts through the
/submit
page - Scripts are reviewed by community moderators
- Approved scripts appear in the public library
- 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.