Back to Coding

Admin Panel Development

Prompt

You are tasked with designing and implementing a modular, scalable, and optimized admin panel application featuring both backend and frontend components using the specified tech stack (Node.js with Express.js and MySQL for backend; Next.js with Tailwind CSS for frontend). The admin panel should support admin user signup/login and offer a dashboard with five sidebar modules: Dashboard (static data initially), Team, Blog, Portfolio, and Users (admin users), plus a logout button at the sidebar bottom. Your objective is to guide Cursor AI, step by step, like a senior Google developer, from zero to completion, ensuring every feature, code quality, and best practice is followed without errors. Use a detailed checklist approach with checkboxes for every key task and milestone to ensure clear progress tracking and thorough implementation. --- # Detailed Instructions and Steps for Cursor AI: - [ ] **1. Preparation and Understanding:** - [ ] Analyze the provided JSON data files for Blog, Portfolio, and Team modules to fully understand the data structures and relationships. - [ ] Define a precise database schema in MySQL that exactly matches the JSON data formats. - [ ] **2. Backend Development:** - [ ] Create a modular Express.js backend with: - [ ] CRUD RESTful APIs for Team, Blog, Portfolio, and Users modules - [ ] Authentication system for admin users (signup/login) with secure password handling and token-based authentication - [ ] Implement validation that matches JSON data formats for all operations - [ ] Develop seed scripts to populate the MySQL database with initial JSON data - [ ] Test each API endpoint thoroughly, with examples of requests and responses; ensure zero errors - [ ] **3. Frontend Development:** - [ ] Build the Next.js frontend dashboard incorporating Tailwind CSS with: - [ ] Responsive and modern UI featuring a collapsible sidebar with these five modules: - Dashboard (static data for now) - Team - Portfolio - Blog - Users - [ ] Logout button placed at the bottom of the sidebar - [ ] For each module: - [ ] Display data in tables with pagination, sorting, and searching capabilities - [ ] Provide bulk action options (e.g., bulk delete) - [ ] Show functional back button navigation - [ ] Include Add button that opens forms for creating new entries - [ ] Forms must: - [ ] Match the data structure exactly - [ ] Have validations consistent with the backend and data formats - [ ] Support edit, view, delete options at the top right corner of the table or individual rows - [ ] Connect frontend components properly to backend APIs ensuring smooth data flow and error handling - [ ] **4. Code Quality and Maintainability:** - [ ] Ensure all code is clear, well-commented, and follows best practices akin to senior developers - [ ] Structure files and modules in a scalable and maintainable fashion - [ ] **5. Documentation:** - [ ] Prepare in-depth documentation covering: - [ ] Project setup instructions - [ ] Database schema details and seed data import - [ ] API endpoint definitions with sample requests/responses - [ ] Frontend usage guide - [ ] Authentication and security details - [ ] **6. Continuous Improvement Workflow:** - [ ] Maintain three separate files for Cursor AI: - [ ] File 1: All code and configuration files used to build the admin panel - [ ] File 2: Your own version of the file mirroring File 1 to cross-verify and check progress against requirements step-by-step - [ ] File 3: Log file to record issues encountered, research notes, and market analysis of other compatible admin panel solutions — use these findings to drive improvements - [ ] **7. Final Validation:** - [ ] Cross-check both development files against the checklist - [ ] Implement improvements identified from research and user feedback into the main project - [ ] Conduct final round of testing for functionality, UX consistency, and security compliance # Output Format - Deliver a documented, modular backend API codebase with tested CRUD endpoints and authentication - Provide SQL schema scripts and JSON-seeded data import scripts - Deliver a fully functional Next.js frontend project demonstrating the admin panel UI and modular features - Include comprehensive documentation as outlined - Present the three files for project tracking and iterative improvement as detailed in step 6 --- This prompt is to be followed precisely with methodical, checkbox-verified progression, reasoning for each stage, and clear, commented code to ensure Cursor AI can create a flawless, enterprise-grade admin panel from scratch without omissions or errors.

Related Coding Prompts

Write Code

As a seasoned programmer, your task is to write code in [programming language] to [perform action]. The code should be efficient, well-structured, and optimized for performance. Make sure to follow best practices and industry standards while implementing the necessary algorithms and logic to achieve the desired functionality. Test the code thoroughly to ensure it functions as intended and meets all requirements. Additionally, document the code properly for future reference and maintenance.

Debug Code

Act as a seasoned programmer with over 20 years of commercial experience. Analyze the provided [piece of code] that is causing a specific [error]. Your task involves diagnosing the root cause of the error, understanding the context and functionality intended by the code, and proposing a solution to fix the issue. Your analysis should include a step-by-step walkthrough of the code, identification of any bugs or logical mistakes, and a detailed explanation of how to resolve them. Additionally, suggest any improvements or optimizations to enhance the performance, readability, or maintainability of the code based on your extensive experience. Ensure that your solution adheres to best practices in software development and is compatible with the current development environment where the code is being executed.

Do Code Review

As a seasoned programmer with over 20 years of commercial experience, your task is to perform a comprehensive code review on the provided [piece of code]. Your review should meticulously evaluate the code's efficiency, readability, and maintainability. You are expected to identify any potential bugs, security vulnerabilities, or performance issues and suggest specific improvements or optimizations. Additionally, assess the code's adherence to industry standards and best practices. Your feedback should be constructive and detailed, offering clear explanations and recommendations for changes. Where applicable, provide examples or references to support your suggestions. Your goal is to ensure that the code not only functions as intended but also meets high standards of quality and can be easily managed and scaled in the future. This review is an opportunity to mentor and guide less experienced developers, so your insights should be both educational and actionable.