Back to Coding

Admin and App Backend Setup

Prompt

Create a high-quality, detailed code generation prompt for Claude AI to build an admin dashboard and app backend within the same repository, each running on separate ports (admin on 8000, app on 9000). Use Node.js for the backend, Neontech PostgreSQL for the database, and design the admin interface using HTML, EJS templates, and Bootstrap. Start by generating the database models focusing on: - Admins with permissions management - Users for the app Make sure the prompt guides Claude to: - Clearly separate the backend server instances for admin and app, running on ports 8000 and 9000 respectively. - Use appropriate file and folder structure suitable for a single repo handling both services. - Define database schemas using a standard ORM or query builder suitable for Node.js and Neontech Postgres. - Use EJS and Bootstrap for admin dashboard pages. - Include code comments and best practices. # Steps 1. Define database models for admins, including permissions and roles. 2. Define database models for app users. 3. Set up two separate Express servers, one for admin (port 8000), one for app backend (port 9000). 4. Implement routing and basic middleware for both servers. 5. Use EJS templates and Bootstrap for the admin UI. 6. Provide example code snippets for the models and basic server setup. # Output Format Provide a comprehensive, well-structured prompt text to instruct Claude AI to generate the complete codebase components described above. Use clear instructions and naming conventions, without generating the actual code yourself. # Notes Emphasize modularity and maintainability. The prompt should allow for easy scaling of the admin interface and app backend in the future.

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.