2.6 KiB
2.6 KiB
🎯 PRACTICAL TESTING GUIDE - Phase 3.1
Your Backend URL
Quick Access Links
API Documentation
- Interactive Docs: http://10.0.0.243:8000/docs
- ReDoc: http://10.0.0.243:8000/redoc
How to Access Weekly Reports & Stats
Option 1: Browser (Easiest for Testing)
Get Weekly Report
- Open browser
- Go to: http://10.0.0.243:8000/docs
- Click on "GET /api/v1/chores/reports/weekly"
- Click "Try it out"
- Click "Execute"
- See the report in the Response body!
Direct URL (after logging in):
http://10.0.0.243:8000/api/v1/chores/reports/weekly
http://10.0.0.243:8000/api/v1/chores/reports/weekly?weeks_ago=1 (last week)
http://10.0.0.243:8000/api/v1/chores/reports/weekly?user_id=1 (specific user)
Get User Stats
- Go to: http://10.0.0.243:8000/docs
- Click on "GET /api/v1/chores/reports/user/{user_id}"
- Click "Try it out"
- Enter user_id (1 for Lou, 2 for Jess, etc.)
- Click "Execute"
- See your stats!
Direct URL (after logging in):
http://10.0.0.243:8000/api/v1/chores/reports/user/1 (Lou's stats)
http://10.0.0.243:8000/api/v1/chores/reports/user/2 (Jess's stats)
Option 2: Using Postman (If you have it)
Get Weekly Report
GET http://10.0.0.243:8000/api/v1/chores/reports/weekly
Headers:
Authorization: Bearer YOUR_JWT_TOKEN
Get User Stats
GET http://10.0.0.243:8000/api/v1/chores/reports/user/1
Headers:
Authorization: Bearer YOUR_JWT_TOKEN
Option 3: Frontend (RECOMMENDED - Let's Build This!)
This is where we're headed - making it accessible through nice UI:
What We'll Build:
- Admin Dashboard - See weekly reports with charts
- User Stats Page - View individual performance
- Reports Page - Historical data and trends
- Enhanced Kiosk - Better completion feedback
Testing Before Frontend
Step 1: Complete Some Chores
- Go to kiosk: http://10.0.0.243:5173/kiosk (or your frontend URL)
- Log in as different users
- Complete a few chores
Step 2: Check the Data
- Visit: http://10.0.0.243:8000/docs
- Try "GET /api/v1/chores/completions" - See all completions
- Try "GET /api/v1/chores/reports/weekly" - See weekly summary
Authentication Note
To access these endpoints through direct URLs or Postman, you need to be logged in. The /docs interface handles this automatically when you authenticate there.
Ready for Frontend?
Say "yes" and we'll build:
- Admin Reports Dashboard
- User Stats Page
- Enhanced Kiosk Completion Modal
- Weekly Report View
This will make everything visual, accessible, and user-friendly! 🎨