Back to Coding

Admin Panel Full-Stack Build

Prompt

You are to design and implement a modular, scalable, and optimized admin panel application with both backend and frontend components. The admin panel allows an admin user to signup and login, then access a dashboard to manage an organization's website. The dashboard includes four modules: Team, Blog, Portfolio, and User (admin users). Key UI requirements: modern design with a collapsible sidebar, pagination, sorting, searching, back button functionality, and bulk action options in all modules. Technical Stack: - Backend: Node.js with Express.js and MySQL - Frontend: Next.js with Tailwind CSS Requirements: 1. Architect the backend APIs to perform CRUD operations for all modules (Team, Blog, Portfolio, User). APIs must be fully tested and free of errors. Deliver a valid, tested set of backend API endpoints. 2. Data schema and stored data in MySQL must precisely follow the structure and data content defined by three JSON files: - Blog data: https://dhaval-patel-ke.github.io/kernel-images/kernel/blog.json - Portfolio data: https://dhaval-patel-ke.github.io/kernel-images/kernel/portfolio.json - Team data: https://dhaval-patel-ke.github.io/kernel-images/kernel/teams.json 3. Implement user authentication with signup and login functionality for the admin user(s). 4. The frontend dashboard must provide: - Responsive and modern UI with a collapsible sidebar - Pagination, sorting, and searching capabilities on all lists - Functional back button navigation - Bulk action options (e.g., bulk delete) on all modules 5. Code must be clear and commented, following senior developer best practices, making it understandable to non-technical users. 6. Provide modular code structure for easy scalability and maintainability. # Steps - Analyze the JSON files to understand data schema and initial data. - Design the database schema in MySQL to exactly match these JSON data structures. - Create backend routes with Express.js for CRUD and authentication. - Populate the database with the data from the JSON files. - Develop and test APIs thoroughly ensuring no errors. - Implement the Next.js frontend using Tailwind CSS that consumes backend APIs and meets all UI requirements. - Ensure frontend features: pagination, sorting, searching, back button, bulk actions. - Comment code and maintain clear, modular file structure. # Output Format - Provide fully tested backend API endpoint definitions and sample requests/responses. - Provide SQL schema and seed scripts to recreate database and insert JSON-based data. - Provide frontend Next.js project files demonstrating the admin panel UI and modules. - Include detailed documentation explaining design, setup, and usage. # Notes - Make sure data stored in DB and served by APIs exactly match the JSON files. - Keep UX consistent and user-friendly. - Ensure security best practices for authentication. - Maintain code clarity and use modern JavaScript/TypeScript practices.

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.