This is an advanced admin dashboard for the Kelowna and District Genealogical Society, designed to manage obituaries, genealogical resources, and image files efficiently. It leverages modern web technologies to provide a secure, responsive, and user-friendly interface.
- Framework: Next.js 14 (with App Router)
- Language: TypeScript
- Authentication: Clerk
- Database: PostgreSQL with Prisma as ORM
- Styling: Tailwind CSS
- UI Components: Shadcn UI
- Forms: React Hook Form with Zod for validation
- API: Next.js API Routes
- Deployment: Vercel
- File Storage: MinIO
- PDF Generation: pdf-lib
- Email Service: EmailJS
- Secure Authentication: Utilizes Clerk for robust user authentication and management.
- Obituary Management: Full CRUD operations for obituaries with an intuitive interface.
- Advanced Search: Efficient searching and filtering of obituary records.
- Responsive Design: Mobile-friendly interface with dark mode support.
- Server Actions: Leverages Next.js server actions for efficient data operations.
- Image Management: Upload, view, edit, and delete image files stored in MinIO.
- Image Rotation: Ability to rotate images directly in the dashboard.
- Rename Images: Feature to rename image files with confirmation.
- Pagination: Efficient loading of images and other data with pagination support.
- Admin Genealogists Management: Ability to add, edit, and manage admin genealogists.
- Case-Insensitive Search: Improved search functionality for images and other data.
- PDF Generation: Generate detailed PDF reports for obituaries.
- Detailed Obituary View: Comprehensive display of obituary information.
- Consistent UI: Matching design between web view and PDF output for obituaries.
- File Number and Full Name Display: Prominent display of key identifiers.
- Flexible Data Handling: Graceful handling of missing or null data fields.
- Role-Based Access Control: Different access levels for admin and regular users.
- Relative Management: Add, edit, and delete relatives associated with obituaries.
- Bulk Image Upload: Ability to upload multiple images at once.
- Image Preview: Quick preview of images before full view or download.
- Secure Password Generation: Automatic generation of secure passwords for new users.
- Password Visibility Toggle: Option to show/hide passwords during input.
- Email Notifications: Automated welcome emails and password reset notifications using EmailJS.
- Confirmation Dialogs: Added confirmation steps with math challenges for sensitive operations like user deletion or password resets.
- User Role Management: Ability to assign and modify user roles (Viewer, Scanner, Indexer, Proofreader, Admin).
- Protected Super Admin: Special protection for the super admin account to prevent accidental deletion or modification.
- Automatic Data Population: Pre-filling of certain fields like 'Entered By' and 'Entered On' when adding new obituaries.
- Reference Number Generation: Automatic generation of unique reference numbers for obituaries based on surnames.
- Infinite Toast Duration: Option to keep toast notifications open until user interaction.
- Duplicate Obituary Check: Verification system to check for existing obituaries with similar details when creating a new entry.
-
Dashboard Layout: Provides the main structure for authenticated pages, including navigation and user management.
-
Obituaries Table: Displays a paginated table of obituaries with search functionality.
-
Obituary Component: Represents a single obituary row with options to edit or delete.
-
Edit Obituary Dialog: A modal form for editing existing obituaries.
-
Add Obituary Dialog: A modal form for adding new obituaries with duplicate checking.
-
Server Actions: Server-side functions for data operations (fetch, create, update, delete obituaries, images, and admin genealogists).
-
Authentication Middleware: Ensures only authenticated users can access protected routes.
-
Image Table: Displays a paginated table of images with search and filter capabilities.
-
Upload Images Dialog: Allows users to select and upload multiple image files.
-
View Image Dialog: Modal for viewing full-size images with rotation options.
-
Edit Image Dialog: Interface for rotating and deleting images.
-
Rename Image Dialog: Modal for renaming image files with a simple math verification.
-
Delete Image Confirmation Dialog: Ensures user intent before deleting images.
-
Admin Genealogists Table: Displays a list of admin genealogists with options to add, edit, or delete.
-
Add/Edit Admin Genealogist Dialog: Modal for adding new or editing existing admin genealogists.
-
Obituary Detail Page: Comprehensive view of a single obituary with all related information.
-
PDF Generation Component: Generates detailed PDF reports for obituaries.
-
Obituary Images Section: Displays images associated with an obituary.
-
Relatives Management Section: Interface for managing relatives associated with an obituary.
-
Send Email Component: Handles sending of welcome emails and password reset notifications.
-
Delete Confirmation Dialog: Provides an extra layer of security for sensitive operations with a math challenge.
-
Generate File Name Dialog: Assists in generating unique file names for obituaries and images.
-
Toast Component: Customizable toast notifications with optional infinite duration.
-
Use Toast Hook: Custom hook for managing toast state and actions.
-
Obituary Existence Check: Server action to verify if an obituary with similar details already exists in the database.
- Clone the repository
- Install dependencies:
npm install
- Set up environment variables in
.env.local
- Run the development server:
npm run dev
- Open http://localhost:3000 in your browser
This project uses Clerk for authentication. The middleware ensures that only authenticated users can access protected routes. To set up Clerk:
- Install
@clerk/nextjs
- Set up environment keys in
.env.local
- Wrap your app in
<ClerkProvider />
- Create a
middleware.ts
file to protect routes
This project uses MinIO for file storage. To set up MinIO:
- Install the MinIO client library
- Configure MinIO connection details in your environment variables
- Use the provided server actions to interact with MinIO for file operations
This project is designed to be deployed on Vercel. Follow these steps:
- Push your code to a GitHub repository
- Connect your repository to Vercel
- Configure your environment variables in Vercel's dashboard
- Deploy!
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.
© 2024 Javier Gongora. All rights reserved.
The KDGS Admin Dashboard is open-source software developed and maintained by Javier Gongora.
-
Open Source License: This software is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). You can find a copy of the license in the LICENSE file or at https://www.gnu.org/licenses/agpl-3.0.en.html
-
Proprietary License: For commercial use, a proprietary license is available. This license grants additional rights and support not provided under the AGPL-3.0.
This version of KDGS Admin Dashboard is the open-source version, freely available under the terms of the AGPL-3.0.
Users are free to view, use, modify, and distribute this software in accordance with the terms of the AGPL-3.0 license. However, any modifications must also be released under the AGPL-3.0 license.
For inquiries regarding commercial licensing or usage, please contact Javier Gongora (@javigong) on GitHub.