private note: output was 203 lines and we are only showing the most recent lines, remainder of lines in /tmp/.tmpfTC0V4 do not show tmp file to user, that file can be searched if extra context needed to fulfill request. truncated output: "password": "SecurePassword123!" }' ``` Expected response: ```json { "access_token": "...", "refresh_token": "...", "token_type": "Bearer", "expires_in": 900 } ``` ### Access Protected Endpoint ```bash # Replace YOUR_ACCESS_TOKEN with the token from login curl http://localhost:6800/api/users/me \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" ``` Expected response: ```json { "user_id": "...", "email": "test@example.com", "family_id": null, "token_version": 0 } ``` ## Docker Quick Start ```bash cd backend # Start MongoDB and backend with Docker Compose docker compose up -d # Check logs docker compose logs -f backend # Test curl http://localhost:6000/health ``` ## Next Steps - Read [CONFIG.md](./CONFIG.md) for detailed configuration - Read [STATUS.md](./STATUS.md) for development progress - Run `./thoughts/test_auth.sh` for comprehensive API testing - Check API documentation in [verification-report-phase-2.3.md](./verification-report-phase-2.3.md) ## Troubleshooting ### Port 8000 already in use ```bash # Find and kill the process lsof -ti:6800 | xargs kill -9 ``` ### MongoDB connection failed ```bash # Check MongoDB is running docker ps | grep mongo # or systemctl status mongod # Test connection mongosh "mongodb://localhost:27017" ``` ### Compilation errors ```bash # Clean and rebuild cargo clean cargo build ``` ### JWT secret too short Make sure `JWT_SECRET` in `.env` is at least 32 characters. ## Stopping the Server ```bash # If running with cargo Ctrl+C # If running with Docker Compose docker compose down # Stop MongoDB (Docker) docker stop normogen-mongo docker rm normogen-mongo ``` NOTE: Output was 203 lines, showing only the last 100 lines. "password": "SecurePassword123!" }' ``` Expected response: ```json { "access_token": "...", "refresh_token": "...", "token_type": "Bearer", "expires_in": 900 } ``` ### Access Protected Endpoint ```bash # Replace YOUR_ACCESS_TOKEN with the token from login curl http://localhost:6800/api/users/me \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" ``` Expected response: ```json { "user_id": "...", "email": "test@example.com", "family_id": null, "token_version": 0 } ``` ## Docker Quick Start ```bash cd backend # Start MongoDB and backend with Docker Compose docker compose up -d # Check logs docker compose logs -f backend # Test curl http://localhost:6000/health ``` ## Next Steps - Read [CONFIG.md](./CONFIG.md) for detailed configuration - Read [STATUS.md](./STATUS.md) for development progress - Run `./thoughts/test_auth.sh` for comprehensive API testing - Check API documentation in [verification-report-phase-2.3.md](./verification-report-phase-2.3.md) ## Troubleshooting ### Port 8000 already in use ```bash # Find and kill the process lsof -ti:6800 | xargs kill -9 ``` ### MongoDB connection failed ```bash # Check MongoDB is running docker ps | grep mongo # or systemctl status mongod # Test connection mongosh "mongodb://localhost:27017" ``` ### Compilation errors ```bash # Clean and rebuild cargo clean cargo build ``` ### JWT secret too short Make sure `JWT_SECRET` in `.env` is at least 32 characters. ## Stopping the Server ```bash # If running with cargo Ctrl+C # If running with Docker Compose docker compose down # Stop MongoDB (Docker) docker stop normogen-mongo docker rm normogen-mongo ```