Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2025
8,767
2
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.30 KB | None | 2 0
  1. Project Summary:
  2.  
  3. <PROJECT_SUMMARY>
  4.  
  5. Technical Requirements:
  6.  
  7. - MongoDB for database.
  8. - GraphQL API for the frontend.
  9. - React frontend.
  10.  
  11. Documentation and Comments:
  12.  
  13. - Write meaningful comments and documentation only when necessary.
  14. - Don't use personal pronouns like "I" or "we" in comments or documentation.
  15. - Write documentation for all functions, classes, and modules.
  16. - Write meaningful docstrings that describe the intention and behavior of the function, class, or module, and explain assumptions.
  17. - Keep docstrings up to date and to the point.
  18.  
  19. Error Handling:
  20.  
  21. - Don't wrap code in try except blocks unless you're catching a specific exception.
  22.  
  23. Printing and Logging:
  24.  
  25. - Use a logger for all logging needs.
  26.  
  27. Dependencies:
  28.  
  29. - Init all dependencies in the dependencies.py file.
  30. - Pass dependencies to classes when they are initialized.
  31.  
  32. Configuration:
  33.  
  34. - Write the configuration in the config.py file.
  35.  
  36. Naming Conventions:
  37.  
  38. - Start private class variables with an underscore.
  39. - Use UPPERER_SNAKE_CASE for constants.
  40. - Always write MongoDB and not Mongo.
  41.  
  42. Execution Flow:
  43.  
  44. - When writing code, always write the tests first.
  45. - Always run the tests to make sure the code works.
  46.  
  47. Clean Code:
  48.  
  49. - Write clean, readable, and maintainable code.
  50. - Keep functions small and focused.
  51. - Keep variables and functions names descriptive.
  52. - Keep comments and documentation meaningful.
  53.  
  54. Development Flow:
  55.  
  56. - Always write the tests first.
  57. - Always run the tests to make sure the code works.
  58. - When given a task, write code and run it until it works well.
  59.  
  60. File Structure:
  61.  
  62. - Leave the **init**.py files empty.
  63.  
  64. Code Style:
  65.  
  66. - Always use single quotes for strings.
  67.  
  68. Rewrite, Improve, and Refactor:
  69.  
  70. - When refactoring or fixing code, make sure to keep the code clean and easy to understand without duplicating code.
  71. - Keep the code clean and easy to understand.
  72. - Keep the code DRY (Don't Repeat Yourself).
  73. - Keep the code clean and easy to understand.
  74. - After fixing an issue, mention the case in the docstring so future changes won't break it again.
  75.  
  76. Tests:
  77.  
  78. - Always write the tests first.
  79. - Always run the tests to make sure the code works.
  80. - Always keep the tests clean and up to date.
  81. - Always run the tests in the venv.
  82.  
  83. Debugging:
  84.  
  85. - If you are not sure what the solution is, add debug prints to the code and run the tests.
  86. - After fixing an issue remove the debug prints.
  87.  
  88. Async:
  89.  
  90. - Always use async unless the function is a simple function that doesn't need to be async.
  91.  
  92. Memory:
  93.  
  94. - When you need to remember something, update the .cursormemory.md file.
  95. - Refer to the .cursormemory.md file to view the memory.
  96. - Update the memory with project specifications, requirements, flow of the code, and other relevant information.
  97. - Add instructions for development like how to add new GraphQL mutations and queries to the memory.
  98.  
  99. Planning:
  100.  
  101. - Always plan the code before writing it.
  102. - Think about how the new code will fit into the existing codebase.
  103. - Think about how the new code will interact with the other parts of the codebase.
  104. - Think about how the new code will handle errors and edge cases.
  105. - Think about how the new code will be used by the frontend.
  106. - Think about how the new code will be used by the users.
  107. - Think about how the new code will be used by the developers.
  108.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement