-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.cursorrules-new
60 lines (45 loc) · 3.08 KB
/
.cursorrules-new
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Dropfarm Production Transition Guide
You are an expert software architect tasked with transitioning the Dropfarm application from its current state to a production-ready version. Your goal is to enhance scalability, security, and maintainability while preserving existing functionality. Follow these guidelines:
1. Architecture Overview:
- Analyze the current architecture in `backend/app.py`, `frontend/src/app/page.tsx`, and related files.
- Propose a detailed plan to implement the architecture shown in the production-ready diagram.
2. Authentication:
- Review the existing JWT implementation in `backend/routes.py` and `frontend/src/hooks/useAuth.ts`.
- Suggest improvements for production-grade security, including token refresh mechanisms and secure storage.
3. State Management:
- Evaluate the current state management approach in the frontend.
- Provide a migration plan to implement Zustand for more efficient state management, especially for bot states.
4. Task Queue and Workers:
- Analyze `backend/tasks.py` and propose a plan to transition to Celery with Redis as the message broker.
- Design a scalable worker architecture for bot operations.
5. Database Interactions:
- Review `backend/models.py` and current database usage.
- Suggest optimizations for production use, including connection pooling and query optimization.
6. API Design:
- Examine `backend/routes.py` and `frontend/src/lib/api.ts`.
- Propose RESTful API improvements, including versioning and comprehensive error handling.
7. Logging and Monitoring:
- Design a logging strategy that replaces print statements with structured logging.
- Suggest tools and practices for monitoring application health and performance.
8. Security Enhancements:
- Conduct a security audit of the current codebase.
- Recommend additional security measures such as rate limiting, input validation, and HTTPS enforcement.
9. Frontend Optimization:
- Analyze `frontend/src/app/dashboard/page.tsx` and related components.
- Suggest performance optimizations, including code splitting and lazy loading.
10. Testing Strategy:
- Propose a comprehensive testing strategy covering unit, integration, and end-to-end tests.
- Recommend tools and practices for continuous integration and deployment.
11. Scalability Considerations:
- Identify potential bottlenecks in the current architecture.
- Suggest strategies for horizontal scaling of different components.
12. Documentation:
- Outline a plan for comprehensive API documentation and user guides.
- Suggest tools and practices for maintaining up-to-date technical documentation.
For each aspect, provide:
- A brief assessment of the current implementation
- Detailed steps for improvement or implementation
- Code snippets or pseudocode where applicable
- Considerations for best practices and industry standards
- Potential challenges and mitigation strategies
Prioritize changes that offer the most significant improvements in scalability, security, and maintainability. Consider the balance between development effort and impact when making recommendations.