This guide will help you set up the admin system for content management without coding.
- Content Management: Create, edit, and delete announcements, notes, resources, projects, and events
- Role-Based Access: Three permission levels (Admin, Moderator, Editor)
- Rich Content Editor: Easy-to-use interface for content creation
- Dynamic Display: Content automatically appears on the website
- User Management: Add/remove admin users with different permissions
- Supabase account and project
- Environment variables set up in your
.envfile:VITE_SUPABASE_URL=your-supabase-url VITE_SUPABASE_ANON_KEY=your-supabase-anon-key
-
Run the SQL Schema
- Open your Supabase project dashboard
- Go to the SQL Editor
- Copy and paste the contents of
database-setup.sql - Execute the SQL to create tables and policies
-
Add Your First Admin User
- Sign up for an account on your website
- Copy your user ID from Supabase Auth dashboard
- In Supabase SQL Editor, run:
INSERT INTO admin_users (id, email, role, is_active) VALUES ('your-user-id-here', 'your-email@example.com', 'admin', true);
- ✅ Manage users (add/remove admins)
- ✅ Create, edit, delete all content
- ✅ Access all admin features
- ❌ Cannot manage users
- ✅ Create, edit, delete all content
- ✅ Access content management
- ❌ Cannot manage users
- ❌ Cannot delete content
- ✅ Create and edit content
- Announcements - Important updates and news
- Notes - General information and updates
- Resources - Helpful guides and materials
- Projects - Showcase completed projects
- Events - Upcoming events and activities
- Log in to your account
- Click on your profile avatar in the top navigation
- Select "Admin Panel" (only visible to admin users)
- Go to Admin Dashboard
- Click "Create Content" button
- Fill in title, content, and settings
- Choose content type and status
- Add tags if needed
- Toggle "Featured" to highlight content
- Click "Create Content"
- Go to Admin Dashboard → Content tab
- Use filters to find specific content
- Click edit button to modify content
- Click delete button to remove content
- Use status dropdown to publish/unpublish
- Go to Admin Dashboard → Users tab
- Click "Add Admin" to invite new users
- Enter email and select role
- Existing users can have roles changed
- Remove users by clicking the trash icon
- Featured Content: Homepage hero section
- Announcements: Homepage announcements section
- Resources: Homepage resources section
- All Published Content: Respective category pages
- Update the
typeenum indatabase-setup.sql - Add the new type to TypeScript interfaces in
src/types/admin.ts - Update content forms and displays accordingly
Edit the RLS policies in database-setup.sql to change permission logic.
- Ensure you're added as an admin user in the database
- Check that your user account is active
- Verify RLS policies are properly set
- Check content status is set to "published"
- Verify the content type matches the display component
- Check browser console for any errors
- Verify Supabase URL and keys in environment variables
- Check Supabase project is active and accessible
- Ensure database tables were created successfully
If you encounter any issues:
- Check the browser console for error messages
- Verify database tables and policies are set up correctly
- Ensure your user has proper admin permissions
- Contact your development team for technical support
Note: This admin system is designed to be user-friendly for non-technical team members. No coding knowledge is required to manage content once the initial setup is complete.