{"id":24637936,"url":"https://github.com/tyaga001/clerk-qa-platform","last_synced_at":"2025-03-20T09:25:43.244Z","repository":{"id":271860321,"uuid":"914795765","full_name":"tyaga001/clerk-qa-platform","owner":"tyaga001","description":"A modern Q\u0026A platform built with Next.js, featuring role-based access control (RBAC) using Clerk. This full-stack app demonstrates enterprise-level authentication, authorization patterns, and responsive UI design.","archived":false,"fork":false,"pushed_at":"2025-02-10T08:41:36.000Z","size":309,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T09:32:49.140Z","etag":null,"topics":["clerk","neon-postgres","nextjs","rbac"],"latest_commit_sha":null,"homepage":"https://clerk.com/blog/nextjs-role-based-access-control","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tyaga001.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-10T10:19:45.000Z","updated_at":"2025-02-10T08:41:40.000Z","dependencies_parsed_at":"2025-01-10T11:29:54.643Z","dependency_job_id":"4d408295-61fa-4522-9f26-47e09e2d5c54","html_url":"https://github.com/tyaga001/clerk-qa-platform","commit_stats":null,"previous_names":["tyaga001/clerk-qa-platform"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyaga001%2Fclerk-qa-platform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyaga001%2Fclerk-qa-platform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyaga001%2Fclerk-qa-platform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyaga001%2Fclerk-qa-platform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tyaga001","download_url":"https://codeload.github.com/tyaga001/clerk-qa-platform/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244584422,"owners_count":20476543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clerk","neon-postgres","nextjs","rbac"],"created_at":"2025-01-25T10:12:35.938Z","updated_at":"2025-03-20T09:25:43.238Z","avatar_url":"https://github.com/tyaga001.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Q\u0026A Platform with RBAC\n\n\u003e A modern Q\u0026A platform built with Next.js and Clerk, featuring role-based access control. Ask questions, share knowledge, and learn from others in a secure, well-structured environment.\n\n![Q\u0026A Platform Screenshot](public/screenshot.png)\n\n## 📖 Complete Tutorial\n\nWant to understand how this platform was built? Check out this complete guide:\n\n[Implementing Role-Based Access Control in Next.js 15](https://clerk.com/blog/nextjs-role-based-access-control)\n\n![image](https://github.com/user-attachments/assets/7489a711-7653-4d41-9a58-5be17eebcadb)\n\n\n## 🌟 Features\n\n- **Authentication \u0026 Authorization**\n  - Secure authentication with Clerk\n  - Role-based access control (RBAC)\n  - Protected routes and API endpoints\n\n- **Core Functionality**\n  - Ask and answer questions\n  - Search users and questions\n  - Admin dashboard for content moderation\n  - Real-time updates\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- Node.js 18+\n- npm/yarn\n- A Clerk account\n- A Neon Database account\n\n### Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/tyaga001/clerk-qa-platform\ncd clerk-qa-platform\n```\n\n2. Install dependencies:\n```bash\nnpm install\n```\n\n3. Set up environment variables:\n```bash\n# Create a .env file in the root directory and add:\nNEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_publishable_key\nCLERK_SECRET_KEY=your_secret_key\nNEON_DATABASE_URL=your_database_url\n```\n\n4. Initialize the database:\n```bash\nnpx drizzle-kit push\n```\n\n5. Start the development server:\n```bash\nnpm run dev\n```\n\nVisit `http://localhost:3000` to see the application.\n\n## 🏗️ Project Structure\n\n```\nclerk-qa-platform/\n├── .idea/                # IDE configuration\n├── .next/                # Next.js build output\n├── drizzle/              # Drizzle ORM files\n├── node_modules/         # Dependencies\n├── public/              # Static files\n├── src/                 # Source code\n│   ├── app/            # Next.js app directory\n│   │   ├── admin/      # Admin dashboard\n│   │   ├── api/        # API routes\n│   │   ├── qa/         # Q\u0026A features\n│   │   └── searchUsers/# User search functionality\n│   ├── components/     # React components\n│   ├── db/            # Database configurations\n│   ├── lib/           # Utility libraries\n│   ├── types/         # TypeScript types\n│   └── utils/         # Utility functions\n├── .env               # Environment variables\n├── .gitignore        # Git ignore rules\n├── favicon.ico       # Site favicon\n├── globals.css       # Global styles\n├── layout.tsx        # Root layout\n├── middleware.ts     # Auth middleware\n└── page.tsx          # Root page\n```\n\n## 🔐 Role-Based Access Control\n\nThe platform implements three main roles:\n- **Admin**: Full access to all features\n- **Moderator**: Can moderate content\n- **User**: Can ask and answer questions\n\n## 📝 Environment Variables\n\nRequired environment variables:\n```bash\nNEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=\nCLERK_SECRET_KEY=\nNEON_DATABASE_URL=\n```\n\n## 🤝 Contributing\n\nContributions are welcome. Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## 📄 License\n\nThis project is licensed under the Creative Commons License - see the [LICENSE](LICENSE) file for details.\n\n## 👏 Acknowledgments\n\n- [Clerk](https://clerk.dev/) for authentication\n- [Neon](https://neon.tech/) for the database\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyaga001%2Fclerk-qa-platform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftyaga001%2Fclerk-qa-platform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyaga001%2Fclerk-qa-platform/lists"}