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