-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.cursorrules
65 lines (56 loc) · 3.12 KB
/
.cursorrules
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
61
62
63
64
65
Instructions for Prompt
- App purpose: a user can submit a simple form to extract Telegram Groups (the user is admin or member) or Contacts (the user has in Telegram Contacts or has a DM with)
- When asking to create a new file, always mention where (folder or root)
- We use JavaScript (js, jsx, json), not TypeScript
Keep in mind:
- We are using Supabase and Vercel
- Supabase bases are set (users/Groups/Contacts)
- Vercel is set and ready to render any update
- For this MVP, we don't implement any login/auth logic yet
- It's an MVP with restricted access for testing
- We must always respect Telegram API TOS, rates, and limitations: THIS IS CRUCIAL
- On a 'form' page, the user submits API ID, API Hash, and Phone number
- These details are used to call Telegram API to get corresponding records
- The user selects Extract groups or Extract contacts, then clicks on fetch data
- Redirection to a new Page (Groups List or Contacts List) occurs after fetching data
- On the list pages, the user can select records and download a CSV
Current Issues:
- ReferenceError: apiId is not defined (in TelegramManager component)
- Warnings about missing Supabase environment variables during build
- Import path issues (need to use '@' alias consistently)
Next Steps:
1. Fix TelegramManager component
2. Address Supabase environment variable warnings
3. Review and fix import issues
4. Simplify current implementation to get basic form submission and redirection working
Development Approach:
- Work in short sprints (2-3 hours max per sprint)
- Focus on one issue at a time
- Test thoroughly after each change
Version Control and Deployment:
- We only have the main branch
- Use 'git push origin main' when pushing changes
- Use 'vercel --prod' for deploying to Vercel
Progress Made Today:
- Fixed TelegramManager component to handle form submission correctly
- Addressed Supabase environment variable warnings by updating the supabase.js file
- Reviewed and fixed import issues, ensuring consistent use of '@' alias
- Simplified the implementation to get basic form submission working
- Added error handling and loading states to the TelegramManager component
Challenges Faced:
- Encountered issues with Vercel deployment due to serverless function size limit
- ReferenceError: apiId is not defined (in TelegramManager component) - Resolved
- Import path inconsistencies - Resolved
Still Needs to be Done:
1. Resolve the Vercel deployment issue: "Error: A Serverless Function has exceeded the unzipped maximum size of 250 MB. : https://vercel.link/serverless-function-size"
2. Implement redirection to Groups List or Contacts List page after successful data fetching
3. Develop the Groups List and Contacts List components
4. Implement CSV download functionality for selected records
5. Add more robust error handling and user feedback
6. Optimize the application for better performance
7. Conduct thorough testing of all features and edge cases
Next Steps:
1. Investigate and resolve the Vercel deployment size issue
2. Implement the redirection logic after successful form submission
3. Create the Groups List and Contacts List components
4. Add CSV generation and download functionality