A full-featured report/project management dashboard with Role-Based Access Control (RBAC), built on modern web technologies. β¨
-
π Authentication System
- JWT-based token authentication
- User registration and login
- Secure password hashing with bcrypt
-
π‘οΈ Role-Based Access Control (RBAC)
- Three default roles: Admin, Editor, Viewer
- Permission-based access management
- Role assignment to users
-
π Dashboard Modules
- Analytics - Overview with charts and statistics
- Reports - Report management and tracking
- Projects - Project management with progress tracking
- Team - User and role management
- Calendar - Event scheduling calendar
- Invoices - Invoice tracking and management
- Messages - Internal messaging system
- Settings - Application configuration
-
π¨ Theme System
- 6 Color Themes: Slate, Blue, Emerald, Rose, Amber, Purple
- Dark/Light mode support
- System preference detection
- Persistent theme preferences
-
π± Modern UI Components
- shadcn/ui-style components
- Responsive design
- Accessible components (Radix UI)
| Technology | Version |
|---|---|
| Next.js | 15.x |
| React | 19.x |
| TypeScript | 5.x |
| Tailwind CSS | 3.4.x |
| SQLite | (better-sqlite3) |
| Vitest | 2.x |
- Node.js 18+
- npm or pnpm
# Clone the repository
cd ReactTailwindAccessKit
# Install dependencies
npm install
# Copy environment file
cp .env.example .env
# Create admin user
npm run db:create-admin
# Start development server
npm run dev- Local: http://localhost:3000
- Login: Use credentials created with
db:create-admin
ReactTailwindAccessKit/
βββ app/ # Next.js App Router pages
β βββ api/ # API routes
β βββ dashboard/ # Dashboard pages
β βββ login/ # Login page
β βββ register/ # Registration page
β βββ layout.tsx # Root layout
β βββ page.tsx # Landing page
βββ components/ # React components
β βββ ui/ # shadcn/ui primitives
β βββ ThemeProvider.tsx # Theme context
β βββ ThemeSwitcher.tsx # Theme switcher
β βββ AuthProvider.tsx # Auth context
β βββ PermissionGuard.tsx # RBAC guard
β βββ RoleBadge.tsx # Role badge
βββ lib/ # Utilities
β βββ auth.ts # JWT utilities
β βββ db.ts # Database connection
β βββ cn.ts # classnames utility
β βββ themes.ts # Theme configuration
βββ hooks/ # Custom React hooks
β βββ use-permission.ts # Permission hook
β βββ use-roles.ts # Roles hook
β βββ use-users.ts # Users hook
βββ public/ # Static assets
βββ docs/ # Documentation
βββ scripts/ # Utility scripts
βββ Dockerfile # Docker build
βββ docker-compose.yml # Docker Compose
βββ package.json # Dependencies
βββ tailwind.config.js # Tailwind config
βββ tsconfig.json # TypeScript config
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run start |
Start production server |
npm run lint |
Run ESLint |
npm test |
Run tests |
npm run test:ui |
Run tests with UI |
npm run db:create-admin |
Create admin user |
- users - User accounts
- sessions - JWT session tokens
- roles - RBAC roles
- projects - Project data
- project_members - Project access control
| Role | Permissions |
|---|---|
| Admin | Full system access |
| Editor | Create/edit projects |
| Viewer | View only |
- Slate (default)
- Blue
- Emerald
- Rose
- Amber
- Purple
- Add colors to
tailwind.config.js - Add theme entry to
lib/themes.ts
docker-compose up --builddocker-compose -f docker-compose.yml up -f docker-compose.prod.yml up --build| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register |
Register new user |
| POST | /api/auth/login |
Login user |
| POST | /api/auth/logout |
Logout user |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/users |
List all users |
| POST | /api/users |
Create user |
| GET | /api/users/[id] |
Get user |
| PUT | /api/users/[id] |
Update user |
| DELETE | /api/users/[id] |
Delete user |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/roles |
List all roles |
| POST | /api/roles |
Create role |
| PUT | /api/roles/[id] |
Update role |
| DELETE | /api/roles/[id] |
Delete role |
| Variable | Description | Required |
|---|---|---|
JWT_SECRET |
Secret key for JWT signing | Yes |
NODE_ENV |
Environment (development/production) | No |
# Run all tests
npm test
# Run tests in watch mode
npm test -- --watch
# Run tests with coverage
npm test -- --coverageContributions are welcome! Please read the CONTRIBUTING.md file for guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.
For issues and feature requests, please open an issue on GitHub.
- shadcn/ui - UI component inspiration
- Radix UI - Accessible primitives
- Tailwind CSS - Styling framework
- Next.js - React framework



