Skip to content

[Feature]: Add Firestore Rate Limiting and Spam Protection for Community PostsΒ #462

@Tushar15769

Description

@Tushar15769

πŸ“Œ Description

The current community posting system allows any authenticated user to continuously create posts without restrictions because Firestore rules only validate:

request.auth != null

There is currently:

No posting cooldown
No rate limiting
No minimum content length validation
No spam detection
No reputation abuse prevention

Because the reputation system awards +10 points per post, users can spam addDoc() requests in tight loops to artificially inflate reputation scores and flood the community feed.

This creates both moderation and security concerns while reducing platform quality for legitimate users.


🎯 Objective

This feature aims to improve community integrity, reduce spam abuse, and strengthen Firestore security validation.

This will:

Prevent automated spam posting
Reduce reputation farming abuse
Improve community quality
Protect Firestore usage limits
Improve moderation reliability


πŸ› οΈ Proposed Solution

Add Firestore write rate limiting rules
Add cooldown period between posts
Enforce minimum content length validation
Add backend or Cloud Function spam checks
Limit reputation gain frequency
Improve moderation and abuse handling


πŸ“Œ Features to Include

Firestore posting cooldown
Rate limiting logic
Minimum content validation
Reputation abuse prevention
Spam detection safeguards
Improved Firestore security rules


πŸ”„ Alternatives Considered

Manual moderation only
Frontend-only throttling
Reputation removal without spam prevention

These approaches remain easy to bypass and difficult to scale.


πŸ§ͺ Acceptance Criteria

  • Posting cooldown implemented
  • Rate limiting rules added
  • Minimum content validation enforced
  • Reputation farming prevention added
  • Firestore rules updated securely
  • Spam posting blocked successfully
  • Existing posting workflow remains functional

πŸ“· Screenshots / References (if any)

N/A


πŸ“’ Contribution Guidelines

  • Comment "assign me" to work on this issue
  • Wait for assignment before starting
  • Follow project coding standards
  • Submit a clean PR with description

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions