Files
family-hub/TESTING_GUIDE.md

2.6 KiB

🎯 PRACTICAL TESTING GUIDE - Phase 3.1

Your Backend URL

http://10.0.0.243:8000

API Documentation


How to Access Weekly Reports & Stats

Option 1: Browser (Easiest for Testing)

Get Weekly Report

  1. Open browser
  2. Go to: http://10.0.0.243:8000/docs
  3. Click on "GET /api/v1/chores/reports/weekly"
  4. Click "Try it out"
  5. Click "Execute"
  6. 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

  1. Go to: http://10.0.0.243:8000/docs
  2. Click on "GET /api/v1/chores/reports/user/{user_id}"
  3. Click "Try it out"
  4. Enter user_id (1 for Lou, 2 for Jess, etc.)
  5. Click "Execute"
  6. 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

This is where we're headed - making it accessible through nice UI:

What We'll Build:

  1. Admin Dashboard - See weekly reports with charts
  2. User Stats Page - View individual performance
  3. Reports Page - Historical data and trends
  4. Enhanced Kiosk - Better completion feedback

Testing Before Frontend

Step 1: Complete Some 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:

  1. Admin Reports Dashboard
  2. User Stats Page
  3. Enhanced Kiosk Completion Modal
  4. Weekly Report View

This will make everything visual, accessible, and user-friendly! 🎨