3.8 KiB
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
- 💬 Comments & Ratings: Community feedback and discussion
- 🎨 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
ScriptShare includes a comprehensive admin system with superuser capabilities:
Creating Your First Superuser
You have two options for creating your first superuser:
Option 1: Quick Setup (Recommended for Development)
npm run create-default-superuser
This creates a default superuser with these credentials:
- Email: admin@scriptshare.com
- Password: admin123
- Username: admin
- Display Name: System Administrator
⚠️ Important: Change the password immediately after first login!
Option 2: Interactive Setup
npm run create-superuser
This prompts you to enter custom details for your admin account.
- Both scripts will output your superuser credentials and save them to JSON files
Admin Panel Features
- Dashboard: Overview of platform statistics and recent activity
- User Management: Create and manage admin users and moderators
- Content Moderation: Review and approve submitted scripts
- System Monitoring: Track platform health and performance
- Analytics: View usage statistics and trends
Permission Levels
- Super User: Full system access including user management and system configuration
- Admin User: Content moderation and user management capabilities
- Moderator: Basic content review and approval permissions
Accessing the Admin Panel
- Log in with your superuser account
- Navigate to
/admin
or click "Super Admin" in the user menu - Use the dashboard to manage the platform
Note: Only users with admin privileges can access the admin panel.
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, comment, 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.