https://github.com/peterkyle01/sarhtaskhub
Modern Client Management System
https://github.com/peterkyle01/sarhtaskhub
drizzle-orm neondb nextjs15 payloadcms-v3 postgresql vercel
Last synced: 2 months ago
JSON representation
Modern Client Management System
- Host: GitHub
- URL: https://github.com/peterkyle01/sarhtaskhub
- Owner: peterkyle01
- Created: 2025-08-08T07:13:56.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-09-03T16:04:09.000Z (10 months ago)
- Last Synced: 2025-11-30T13:55:12.364Z (7 months ago)
- Topics: drizzle-orm, neondb, nextjs15, payloadcms-v3, postgresql, vercel
- Language: TypeScript
- Homepage: https://sarhtaskhub.vercel.app
- Size: 1.19 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SarhTaskHub
A comprehensive task management platform built with **Next.js 15**, **PayloadCMS 3.0**, and **PostgreSQL**. SarhTaskHub facilitates seamless collaboration between tutors, clients, and administrators in an educational environment.
## ๐ Features
- **Multi-Role Authentication**: Support for Super Admins, Admins, Tutors, and Clients
- **Task Management**: Create, assign, and track educational tasks with scoring
- **Subject & Topic Organization**: Hierarchical organization of educational content
- **Role-Based Access Control**: Granular permissions for different user types
- **Modern UI**: Built with Tailwind CSS and Radix UI components
- **Type-Safe**: Full TypeScript support with auto-generated types
- **Cloud Storage**: Integrated Vercel Blob storage for media files
- **Responsive Design**: Mobile-first design approach
## ๐๏ธ Tech Stack
- **Frontend**: Next.js 15, React 19, TypeScript
- **Backend**: PayloadCMS 3.0, PostgreSQL
- **Styling**: Tailwind CSS 4.0, Radix UI
- **Storage**: Vercel Blob Storage
- **Testing**: Vitest, Playwright
- **Package Manager**: pnpm
## ๐ Prerequisites
- Node.js (^18.20.2 || >=20.9.0)
- pnpm (^9 || ^10)
- PostgreSQL database
- Vercel Blob Storage token (for file uploads)
## ๐ง Installation
1. **Clone the repository**
```bash
git clone https://github.com/peterkyle01/sarhtaskhub.git
cd sarhtaskhub
```
2. **Install dependencies**
```bash
pnpm install
```
3. **Environment Setup**
```bash
cp .env.example .env
```
Configure the following environment variables:
```env
PAYLOAD_SECRET=your_secret_key
DATABASE_URI=postgresql://user:password@localhost:5432/sarhtaskhub
BLOB_READ_WRITE_TOKEN=your_vercel_blob_token
```
4. **Run database migrations**
```bash
pnpm payload migrate
```
5. **Start the development server**
```bash
pnpm dev
```
6. **Access the application**
- Frontend: http://localhost:3000
- Admin Panel: http://localhost:3000/superadmin
## ๐ณ Docker Development
For containerized development:
1. **Start the database**
```bash
docker-compose up -d
```
2. **Update your `.env` file**
```env
DATABASE_URI=postgresql://user:password@127.0.0.1:5432/sarhtaskhub
```
3. **Run the application**
```bash
pnpm dev
```
## ๐๏ธ Project Structure
```
src/
โโโ app/ # Next.js app directory
โ โโโ (frontend)/ # Frontend routes
โ โ โโโ admin/ # Admin dashboard
โ โ โโโ tutor/ # Tutor dashboard
โ โโโ (payload)/ # PayloadCMS admin
โโโ collections/ # PayloadCMS collections
โ โโโ Admins.ts
โ โโโ Clients.ts
โ โโโ Tasks.ts
โ โโโ Tutors.ts
โ โโโ ...
โโโ components/ # Reusable components
โ โโโ custom/ # Custom components
โ โโโ ui/ # UI components
โโโ server-actions/ # Next.js server actions
โโโ styles/ # Global styles
```
## ๐ฅ User Roles
- **Super Admins**: Full system access and user management
- **Admins**: Manage tutors, clients, tasks, and subjects
- **Tutors**: View and update assigned tasks, manage profile
- **Clients**: Task recipients (no authentication required)
## ๐ Collections
- **Tasks**: Educational assignments with scoring and status tracking
- **Tutors**: Authenticated educators with subject specializations
- **Clients**: Task recipients and students
- **Subjects**: Educational subjects (Math, Science, etc.)
- **Topics**: Hierarchical topic organization within subjects
- **Media**: File uploads and media management
## ๐งช Testing
- **Unit Tests**: `pnpm test`
- **E2E Tests**: `pnpm test:e2e`
- **Type Checking**: `pnpm type-check`
- **Linting**: `pnpm lint`
## ๐ Deployment
1. **Build the application**
```bash
pnpm build
```
2. **Start production server**
```bash
pnpm start
```
## ๐ Scripts
- `pnpm dev` - Start development server
- `pnpm build` - Build for production
- `pnpm start` - Start production server
- `pnpm lint` - Run ESLint
- `pnpm test` - Run unit tests
- `pnpm payload migrate:create` - Create new migration
- `pnpm generate:types` - Generate TypeScript types
## ๐ค Contributing
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests if applicable
5. Submit a pull request
## ๐ License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## ๐ Support
For questions, issues, or feature requests, please:
- Open an issue on GitHub
- Contact the development team
- Check the PayloadCMS documentation for CMS-related questions