Featr API Testing Manual & Data Flow Guide
🚀 Quick Start Testing Setup
Prerequisites
Testing Tools
- Postman Collection (recommended)
- curl commands (provided below)
- Thunder Client (VS Code extension)
- Insomnia (alternative to Postman)
📊 MVP Data Flow Overview
Core MVP Flow:
- User signs up via OAuth (GitHub/Google)
- Project owner creates a project with settings
- Users discover public projects
- Users submit feature requests
- Community votes on requests
- Owner moderates and prioritizes
- Users track implementation progress
🔐 Authentication Endpoints
1. Get Current User
- ✅ Valid JWT token returns user data
- ❌ Invalid/expired token returns 401
- ❌ No token returns 401
2. OAuth Callbacks (GitHub/Google)
- Exchange code for access token
- Fetch user data from provider
- Create or update user in database
- Generate JWT token
- Redirect to frontend with token
🏗️ Project Management Endpoints
1. Get Public Projects
2. Create Project
- ✅ Valid project data creates project
- ❌ Duplicate slug returns 400
- ❌ Missing required fields returns 400
- ❌ No auth token returns 401
3. Get User’s Projects
4. Get Specific Project
5. Update Project
- ✅ Owner can update project
- ❌ Non-owner cannot update (403)
- ❌ Invalid project ID returns 404
6. Delete Project
💡 Feature Request Endpoints
1. Get Project Requests
limit(optional): Number of requests to return (default: 20, max: 100)offset(optional): Number of requests to skip (default: 0)status(optional): Filter by status (pending, approved, rejected, completed)category(optional): Filter by categorysort(optional): Sort field (created_at, votes_count, title)order(optional): Sort order (asc, desc)
2. Create Feature Request
- ✅ Valid request data creates request
- ✅ Status set to “pending” if project requires approval
- ✅ Status set to “approved” if auto-approval enabled
- ❌ Missing title/description returns 400
- ❌ Invalid project ID returns 404
- ❌ No auth token returns 401
3. Get Specific Request
4. Update Request
- ✅ Request author can update request
- ✅ Project owner/moderator can update request
- ❌ Other users cannot update (403)
5. Delete Request
- ✅ Request author can delete request
- ✅ Project owner/moderator can delete request
- ❌ Other users cannot delete (403)
🗳️ Voting System Endpoints
1. Vote on Request
upvote- Positive votedownvote- Negative vote
- ✅ First vote creates new vote record
- ✅ Changing vote type updates existing vote
- ❌ Same vote type returns “already voted” error
- ❌ Voting on non-approved request returns error
- ❌ No auth token returns 401
2. Remove Vote
3. Get Request Vote Information
user_vote and user_vote_id will be empty.
🧪 Complete MVP Testing Flow
1. User Authentication Flow
2. Project Management Flow
3. Feature Request Flow
4. Voting Flow
🔍 Error Responses & Status Codes
Common Error Responses
400 Bad Request:📝 Testing Checklist
Authentication
- Valid JWT returns user data
- Invalid JWT returns 401
- Missing JWT returns 401
- OAuth callbacks work correctly
Projects
- Public projects list loads
- Authenticated user can create project
- User can view their own projects
- Owner can update project settings
- Owner can delete project
- Non-owner cannot modify project
Feature Requests
- Requests load for public projects
- Authenticated user can submit request
- Request status set correctly based on project settings
- Author can update own request
- Project owner can update any request
- Author/owner can delete request
Voting
- User can vote on approved requests
- Vote counts update correctly
- User cannot vote twice with same type
- User can change vote type
- User can remove vote
- Vote information loads correctly
- Anonymous users see vote counts without user vote status
Edge Cases
- Invalid MongoDB ObjectIDs return 400
- Non-existent resources return 404
- Rate limiting works correctly
- Large request bodies are handled
- Special characters in text fields work
- Pagination works correctly