GET /api/hikes/:id/comments- Get all comments for a hikePOST /api/hikes/:id/comments- Add comment (authenticated users)DELETE /api/hikes/:hikeId/comments/:commentId- Delete comment (own or admin)
GET /api/hikes/:id/carpool-offers- Get all ride offersPOST /api/hikes/:id/carpool-offers- Offer a rideDELETE /api/hikes/:hikeId/carpool-offers/:offerId- Delete offerGET /api/hikes/:id/carpool-requests- Get all ride requestsPOST /api/hikes/:id/carpool-requests- Request a rideDELETE /api/hikes/:hikeId/carpool-requests/:requestId- Delete request
GET /api/hikes/:id/packing-list- Get packing list (returns defaults if none exists)PUT /api/hikes/:id/packing-list- Update packing list with checked items
GET /api/my-hikes- Get user's dashboard with:- Hikes I'm interested in (upcoming)
- Hikes I'm confirmed for (upcoming, with payment status)
- Past hikes attended (last 10)
- Stats (total hikes, multi-day hikes)
PUT /api/profile/emergency-contact- Update user's emergency contact infoGET /api/hikes/:id/emergency-contacts- Get all attendees' emergency contacts (admin only)
- Updated
POST /api/hikesto accept:image_url- URL to destination imagedestination_url- Link to destination websitedaily_distances- Array of {day, distance, description}overnight_facilities- Text description
- Updated
PUT /api/hikes/:idwith same fields
POST /api/auth/register- Now sends verification emailGET /api/auth/verify-email/:token- Verify email with token
All tables created and ready:
- ✅
hike_comments- Discussion on hikes - ✅
carpool_offers- Ride sharing offers - ✅
carpool_requests- Ride requests - ✅
packing_lists- Personal packing lists per hike - ✅
user_achievements- Milestone tracking - ✅ Users table updated with:
- Email verification fields
- Emergency contact fields (name, phone, medical_info)
- ✅ Hikes table updated with:
- image_url, destination_url
- daily_distances (JSONB)
- overnight_facilities
Status: Ready to run on production database (idempotent schema.sql)
What: New tab showing personalized hike view Components needed:
- New tab button in navigation
- Dashboard with 3 sections:
- Hikes I'm Interested In (cards)
- Hikes I'm Confirmed For (cards with payment status)
- Past Hikes (list)
- Stats cards at top (Total Hikes, Multi-Day Count)
What: Add tabs to existing hike details modal New tabs to add:
-
Comments 💬
- Show all comments with user names and timestamps
- Text area to add new comment
- Delete button for own comments
-
Carpooling 🚗
- Two sections: Ride Offers & Ride Requests
- Form to offer ride (location, seats, time)
- Form to request ride (pickup location)
- Show driver/requester contact info
-
Packing List 🎒
- Checkbox list of items
- Pre-populated based on hike type (day/multi)
- Auto-saves when checked/unchecked
- Button to add custom items
What: Update add/edit hike forms Fields to add:
- Image URL input
- Destination website URL input
- For multi-day hikes only:
- Daily distances (dynamic array: Day 1: 10km, Day 2: 15km, etc.)
- Overnight facilities (textarea)
What: User profile section for emergency info Components needed:
- Profile/Settings tab
- Form with:
- Emergency contact name
- Emergency contact phone
- Medical info (allergies, conditions)
- For admins: View emergency contacts button in hike details
What: Show new hike fields in detail view Updates needed:
- Show hike image if available
- Link to destination website
- For multi-day: Show daily breakdown
- Show overnight facility details
// Add state
const [myHikes, setMyHikes] = useState(null);
// Add fetch function
const fetchMyHikes = async () => {
const response = await fetch(API_URL + '/api/my-hikes', {
headers: { 'Authorization': 'Bearer ' + token }
});
const data = await response.json();
setMyHikes(data);
};
// Add tab to navigation
// Add dashboard UI with cards// Add state
const [comments, setComments] = useState([]);
const [newComment, setNewComment] = useState('');
// Fetch comments when modal opens
// Add comment form
// Add comment list with delete buttons// Add state for offers and requests
const [carpoolOffers, setCarpoolOffers] = useState([]);
const [carpoolRequests, setCarpoolRequests] = useState([]);
// Forms for offering/requesting rides
// Display lists with contact info// Add state
const [packingList, setPackingList] = useState({ items: [] });
// Fetch list when modal opens
// Checkbox rendering
// Auto-save on check/uncheck// Update newHike and editHikeData state
// Add conditional rendering for multi-day fields
// Add daily distances array input// Add Profile tab
// Form for emergency contact info
// Admin view in hike details- Run
schema.sqlon production database - Verify SendGrid email is verified
- Test backend endpoints locally
- Build frontend with all UI updates
- Test email verification flow
cd backend
# Option 1: Fix gcloud
gcloud run deploy hiking-portal-api --source . --region us-central1 --allow-unauthenticated
# Option 2: Use Cloud Build
gcloud builds submit --tag gcr.io/helloliam/hiking-portal-api
gcloud run deploy hiking-portal-api --image gcr.io/helloliam/hiking-portal-apicd frontend
npm run build
firebase deploy --only hosting- Register new user → check email verification
- Express interest in hike
- Confirm attendance
- Add comment to hike
- Offer/request carpool
- Check packing list
- View My Hikes dashboard
- Update emergency contact
- Admin: view emergency contacts
- Main file:
backend/server.js(1746 lines) - All endpoints implemented ✅
- Main file:
frontend/src/App.js - Needs UI updates for new features
- Schema:
schema.sql(complete, idempotent)
BACKEND_ADDITIONS.md- Original endpoint specsFEATURES_IMPLEMENTED.md- This fileDEPLOY_INSTRUCTIONS.md- Deployment guideFIX_EMAIL_ISSUE.md- SendGrid setupDEPLOYMENT_SUMMARY.md- Overall status
- Read this document
- Implement Priority 1 (My Hikes) first - it's the most impactful
- Then add tabs to hike details modal (Comments, Carpooling, Packing)
- Update forms for multi-day fields
- Add emergency contact section
- Run schema.sql on database
- Deploy backend (see DEPLOY_INSTRUCTIONS.md)
- Deploy frontend
- Test all features
- Sign up → Receive verification email
- Click verification link
- Wait for admin approval
- Login → See upcoming hikes
- Express interest in hike
- View hike details → see comments, carpooling, packing list
- Confirm attendance
- Offer/request carpool
- Check off packing list items
- View "My Hikes" dashboard
- Login
- Check "My Hikes" dashboard
- See confirmed hikes with payment status
- Update packing lists
- Coordinate carpooling
- Discuss hikes via comments
- Approve new users
- Create hikes with all details (image, URL, multi-day info)
- Manage attendees and payments
- View emergency contacts for safety
- Monitor discussions
- Send test notifications
Total Lines of Backend Code Added: ~450 lines Backend Completion: 100% ✅ Frontend Completion: ~30% (email verification only) Database Schema: 100% ✅
Next Step: Implement frontend UI components for all features