Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
ed8d71b
adding payments and refactor services
MoatazFarid Nov 27, 2024
ed7d27b
adding readme
MoatazFarid Nov 28, 2024
346df82
adding basic modules xml structure
MoatazFarid Nov 28, 2024
99ebcb0
improving feeding rounds
MoatazFarid Nov 29, 2024
5681adf
adding payment Requests
MoatazFarid Nov 29, 2024
abeefa3
improving ui
MoatazFarid Nov 30, 2024
901c51a
Merge pull request #2 from MoatazFarid/improvements
MoatazFarid Nov 30, 2024
e6be080
delete paymentrequest feature is created
MoatazFarid Nov 30, 2024
8b1c556
adding auth with firebase
MoatazFarid Nov 30, 2024
b1d4993
adding auth with firebase
MoatazFarid Nov 30, 2024
dc1975d
Merge branch 'remove-requests' of https://github.com/MoatazFarid/Char…
MoatazFarid Nov 30, 2024
6d58790
Merge pull request #3 from MoatazFarid/remove-requests
MoatazFarid Dec 1, 2024
5b16ad8
tempfix
MoatazFarid Dec 4, 2024
fe1e20f
adding delete option for payment
MoatazFarid Dec 4, 2024
f484012
fixing donations
MoatazFarid Dec 4, 2024
bb586fd
fix payment and donations
MoatazFarid Dec 5, 2024
bd56864
fix payment and donations
MoatazFarid Dec 5, 2024
b1fa2db
Merge branch 'hotfix/calculations' of https://github.com/MoatazFarid/…
MoatazFarid Dec 5, 2024
056508a
navigation
MoatazFarid Dec 5, 2024
793e873
documentation
MoatazFarid Dec 24, 2024
6bf2b0d
Enhance testing setup and dashboard functionality
MoatazFarid Dec 24, 2024
85f74dd
Add delete functionality for donations, feeding rounds, and payment r…
MoatazFarid Dec 24, 2024
8d03440
Implement optimistic status updates in FeedingRoundList
MoatazFarid Dec 24, 2024
02fabf3
Enhance Feeding Round Management with Pagination and Performance Opti…
MoatazFarid Dec 25, 2024
23a428f
Add Transactions Management and UI Enhancements
MoatazFarid Dec 25, 2024
2abfd2f
Refactor Transaction Management and Enhance Donation Features
MoatazFarid Dec 25, 2024
0e334d8
Enhance Payment Management with Status Update and Transaction Recording
MoatazFarid Dec 25, 2024
d47a4b9
Refactor Payment Request Management and Remove Unused Components
MoatazFarid Dec 28, 2024
dce18fe
Merge pull request #4 from MoatazFarid/hotfix/calculations
MoatazFarid Dec 28, 2024
a151a89
Refactor Firebase Services and Enhance Data Management
MoatazFarid Dec 28, 2024
96ec5f5
Refactor Data Management and Migrate to useAllData Hook
MoatazFarid Dec 28, 2024
68a314f
Refactor DonationModal to Use useAllData Hook and Improve Loading States
MoatazFarid Dec 28, 2024
de2f9c9
Enhance Payment Modal and Beneficiary Combobox Functionality
MoatazFarid Dec 28, 2024
2a7f3a6
Refactor PaymentTable Component for Improved Expandable Rows and UI C…
MoatazFarid Dec 28, 2024
af29865
Add CONTRIBUTING and LICENSE files; Update README and RELEASE_NOTES
MoatazFarid Dec 28, 2024
c2b8e9f
Merge pull request #5 from MoatazFarid/fix/backward-compatibility
MoatazFarid Dec 28, 2024
0e6d140
Bump the npm_and_yarn group across 1 directory with 3 updates
dependabot[bot] Dec 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
always think before action. be precise
its preferable to implement unittest for the section you are working on.
properly comment your algorithm and write cleancode
think deeply when debugging before action
when you debug and find you see that you need a tool to fix the issue, start implementing it and save it in tools folder and use virtual environment to use it.

# React Hook Migration Guidelines
1. Deprecated Hook Migration:
- Replace useFirebaseQuery with useAllData for better data management
- Update component destructuring to match useAllData return type
- Ensure proper typing of data fields
- Handle null/undefined cases with default values
- Update query invalidation to use 'all-data' query key

# Performance Optimization Guidelines
1. Data Fetching:
- Implement granular queries instead of fetching all data at once
- Use pagination for large datasets
- Cache frequently accessed data
- Implement real-time listeners only when necessary

2. State Management:
- Use optimistic updates for better UX
- Implement proper loading states
- Handle errors gracefully with user feedback
- Maintain atomic transactions for data consistency

3. Component Optimization:
- Memoize expensive computations
- Implement virtualization for long lists
- Lazy load components and routes
- Use proper React hooks dependencies

4. Firebase Best Practices:
- Structure data for efficient querying
- Minimize unnecessary reads/writes
- Use batch operations when possible
- Implement proper security rules

5. Code Quality:
- Write comprehensive tests
- Document complex logic
- Follow clean code principles
- Use TypeScript for better type safety

6. Error Handling:
- Implement retry mechanisms
- Provide meaningful error messages
- Log errors for debugging
- Handle edge cases gracefully

7. UI/UX Considerations:
- Show loading states
- Provide immediate feedback
- Handle offline scenarios
- Maintain responsive design

8. Data Validation:
- Validate data on both client and server
- Implement proper type checking
- Handle null/undefined cases
- Sanitize user inputs

9. Pagination Implementation:
- Use cursor-based pagination for efficiency
- Maintain page state in URL
- Handle loading states during page transitions
- Cache paginated results

10. Modal and Form Handling:
- Implement proper form validation
- Handle form submission states
- Provide clear error messages
- Maintain modal state consistency

11. Data Synchronization:
- Handle concurrent updates
- Implement proper locking mechanisms
- Maintain data consistency
- Handle offline/online transitions

12. Security Considerations:
- Implement proper authentication
- Validate user permissions
- Sanitize data inputs
- Handle sensitive data properly
16 changes: 16 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
NODE_ENV=development
VITE_FIREBASE_API_KEY="AIzaSyDaDxYhQdUW3VeN2B-Dd-PbtUh4O-_gTHY"
VITE_FIREBASE_AUTH_DOMAIN="careops-dev.firebaseapp.com"
VITE_FIREBASE_PROJECT_ID="careops-dev"
VITE_FIREBASE_STORAGE_BUCKET="careops-dev.firebasestorage.app"
VITE_FIREBASE_MESSAGING_SENDER_ID="266860605377"
VITE_FIREBASE_APP_ID="1:266860605377:web:9d8b0415e495f5e633c940"
VITE_FIREBASE_MEASUREMENT_ID="G-K18YZ571MX"

# NODE_ENV=production
# VITE_FIREBASE_API_KEY="AIzaSyCh73Me0Jb0x-5UHHTDgph8VIMtbNIJPXI"
# VITE_FIREBASE_AUTH_DOMAIN="ehsan-charity-dev.firebaseapp.com"
# VITE_FIREBASE_PROJECT_ID="ehsan-charity-dev"
# VITE_FIREBASE_STORAGE_BUCKET="ehsan-charity-dev.appspot.com"
# VITE_FIREBASE_MESSAGING_SENDER_ID="393202045574"
# VITE_FIREBASE_APP_ID="1:393202045574:web:915fa20b33356bfd6bb707"
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ dist-ssr
*.njsproj
*.sln
*.sw?

# envireonment files
.env
.env.production

/coverage
54 changes: 54 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Contributing to CareOps

We love your input! We want to make contributing to CareOps as easy and transparent as possible, whether it's:

- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer

## We Develop with Github
We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.

## We Use [Github Flow](https://guides.github.com/introduction/flow/index.html)
Pull requests are the best way to propose changes to the codebase. We actively welcome your pull requests:

1. Fork the repo and create your branch from `main`.
2. If you've added code that should be tested, add tests.
3. If you've changed APIs, update the documentation.
4. Ensure the test suite passes.
5. Make sure your code lints.
6. Issue that pull request!

## Any contributions you make will be under the CC BY-NC License
In short, when you submit code changes, your submissions are understood to be under the same [Creative Commons Attribution-NonCommercial 4.0 International License](LICENSE.md) that covers the project. Feel free to contact the maintainers if that's a concern.

## Report bugs using Github's [issue tracker](https://github.com/yourusername/careops/issues)
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/yourusername/careops/issues/new).

## Write bug reports with detail, background, and sample code

**Great Bug Reports** tend to have:

- A quick summary and/or background
- Steps to reproduce
- Be specific!
- Give sample code if you can.
- What you expected would happen
- What actually happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)

## Use a Consistent Coding Style

* Use TypeScript for all new code
* 2 spaces for indentation rather than tabs
* Use meaningful variable names
* Write JSDoc comments for functions and complex logic
* Follow the existing code style

## License
By contributing, you agree that your contributions will be licensed under the Creative Commons Attribution-NonCommercial 4.0 International License.

## References
This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md).
Loading