A comprehensive web-based platform for managing devotional bhajans with role-based access control, content review workflow, and user reporting features.
- Browse & Search: Explore bhajans with advanced search and tag filtering
- CRUD Operations: Create, read, update, and delete bhajans
- Tagging System: Categorize bhajans with multiple tags
- Rich Metadata: Title, description, lyrics, and creator information
- Role-Based Access Control: User, Editor, and Admin roles
- Email/Password Authentication: Secure signup and login via Supabase Auth
- Protected Routes: Route guards based on user permissions
- Draft System: Editors create bhajans as drafts
- Review Queue: Admins review and approve/reject submissions
- Review Comments: Feedback system for submitters
- Status Tracking: Draft → Pending Review → Approved/Rejected
- User Reports: Report incorrect lyrics, offensive content, copyright issues
- Admin Dashboard: Manage all reports with status tracking
- Resolution Workflow: Open → Under Review → Resolved/Dismissed
- Statistics Overview: Total bhajans, pending reviews, open reports
- User Management: Promote users to editor/admin roles
- Audit Log: Track all system activities
- Recent Activity: Monitor latest actions
- Frontend: Vue.js 3 with Composition API
- Build Tool: Vite
- State Management: Pinia
- Routing: Vue Router 4
- Styling: Tailwind CSS
- Backend: Supabase (PostgreSQL + Auth)
- Deployment: Vercel/Netlify (Frontend), Supabase Hosting (Backend)
bhajan-tool/
├── src/
│ ├── components/ # Reusable Vue components
│ │ ├── BhajanCard.vue
│ │ ├── BhajanForm.vue
│ │ ├── TagSelector.vue
│ │ ├── ReviewPanel.vue
│ │ ├── ReportForm.vue
│ │ └── Navbar.vue
│ ├── pages/ # Page components
│ │ ├── Home.vue
│ │ ├── BhajanDetail.vue
│ │ ├── BhajanCreate.vue
│ │ ├── BhajanEdit.vue
│ │ ├── MyBhajans.vue
│ │ ├── AdminDashboard.vue
│ │ ├── ReviewQueue.vue
│ │ ├── ReportsPage.vue
│ │ ├── Login.vue
│ │ └── Signup.vue
│ ├── stores/ # Pinia stores
│ │ ├── authStore.js
│ │ ├── bhajanStore.js
│ │ ├── reportStore.js
│ │ └── tagStore.js
│ ├── services/ # API services
│ │ ├── supabaseClient.js
│ │ ├── authService.js
│ │ ├── bhajanService.js
│ │ ├── tagService.js
│ │ ├── reportService.js
│ │ ├── auditService.js
│ │ └── adminService.js
│ ├── router/ # Vue Router config
│ │ └── index.js
│ ├── App.vue
│ ├── main.js
│ └── style.css
├── supabase/
│ └── migrations/
│ └── 001_initial_schema.sql
├── public/
├── index.html
├── vite.config.js
├── tailwind.config.js
├── package.json
└── README.md
- Node.js 18+ and npm
- A Supabase account (free tier is sufficient)
git clone <your-repo-url>
cd bhajan-toolnpm install- Go to supabase.com
- Click "New Project"
- Fill in project details and click "Create new project"
- Wait for the project to be provisioned
- In your Supabase dashboard, go to SQL Editor
- Open
supabase/migrations/001_initial_schema.sql - Copy the entire contents
- Paste into the SQL Editor and click "Run"
- Verify all tables were created successfully
- Go to Authentication → Providers
- Enable Email provider
- Configure email templates (optional)
- Go to Settings → API
- Copy your Project URL (looks like
https://xxxxx.supabase.co) - Copy your anon/public key
Create a .env.local file in the root directory:
cp .env.example .env.localEdit .env.local and add your Supabase credentials:
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key-here
VITE_APP_NAME=Bhajan Managernpm run devThe application will be available at http://localhost:5173
- Browse approved bhajans
- Search and filter bhajans
- Report issues
- View own reports
- All User permissions
- Create bhajans (saved as drafts)
- Edit own bhajans
- Submit bhajans for review
- View own submissions
- All Editor permissions
- Review and approve/reject bhajans
- Manage all bhajans (edit/delete any)
- View and manage all reports
- Access admin dashboard
- Promote users to editor/admin roles
- View audit logs
- Sign up for a new account through the UI
- Go to your Supabase dashboard
- Navigate to Table Editor → user_profiles
- Find your user record
- Edit the
rolefield and change it toadmin - Save the changes
- Refresh your application and you'll have admin access
- user_profiles: Extended user information with roles
- bhajans: Bhajan content with status tracking
- bhajan_tags: Many-to-many relationship for tags
- reports: User-submitted issue reports
- audit_log: System activity tracking
- Row Level Security (RLS) policies for data protection
- Automatic timestamp updates
- Foreign key relationships with cascade deletes
- Full-text search indexes
- Audit logging triggers
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview- Use Composition API with
<script setup> - Follow Vue.js 3 best practices
- Use Tailwind CSS utility classes
- Keep components small and focused
- Use Pinia for state management
- Push your code to GitHub
- Go to vercel.com
- Click "New Project"
- Import your repository
- Add environment variables:
VITE_SUPABASE_URLVITE_SUPABASE_ANON_KEYVITE_APP_NAME
- Click "Deploy"
- Push your code to GitHub
- Go to netlify.com
- Click "Add new site" → "Import an existing project"
- Connect your repository
- Set build settings:
- Build command:
npm run build - Publish directory:
dist
- Build command:
- Add environment variables
- Click "Deploy site"
Your Supabase backend is already hosted! Just ensure:
- Database is configured with the migration
- RLS policies are enabled
- Email auth is configured
- Backups are enabled (Project Settings → Database → Backups)
- ✅ RLS policies protect all data access
- ✅ JWT-based authentication
- ✅ Environment variables for sensitive data
- ✅ Input validation on client and server
- ✅ Role-based authorization
- ✅ Secure password requirements (6+ characters)
⚠️ Consider adding rate limiting for production⚠️ Configure email verification for new accounts
- Lazy loading for route components
- Pagination for large lists
- Debounced search input
- Indexed database queries
- Optimized Tailwind CSS (purge unused styles)
- Vite build optimization
Problem: Can't sign in
- Check Supabase credentials in
.env.local - Verify email auth is enabled in Supabase
- Check browser console for errors
Problem: User created but no profile
- Ensure the trigger
on_auth_user_createdexists - Check if migration ran successfully
Problem: RLS policy errors
- Verify you're authenticated
- Check user role in
user_profilestable - Ensure RLS policies were created correctly
Problem: Can't see data
- Check RLS policies match your user role
- Verify data exists in the tables
- Check network tab for error responses
Problem: Build fails
- Run
npm installto ensure dependencies are installed - Check Node.js version (18+ required)
- Clear
node_modulesand reinstall if needed
- 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
MIT License - feel free to use this project for your own purposes!
For issues and questions:
- Check the troubleshooting section
- Review Supabase documentation
- Check Vue.js documentation
- Open an issue on GitHub
- Add media support (audio/video)
- Implement favorites/bookmarks
- Add social sharing features
- Create mobile app (React Native)
- Add batch operations for admins
- Implement advanced search with AI
- Add user profiles and contributions
- Create API for third-party integrations
Built with ❤️ using Vue.js and Supabase