Hiking-Logbook

Hiking Logbook Frontend Setup Guide

This guide explains how to set up and develop the Hiking Logbook React frontend application.

Overview

The frontend is a React.js application with these key features:

Before You Start

You need:

What’s Inside

The frontend has:

Setup Steps

1. Install Dependencies

cd frontend
npm install

2. Set Up Environment

Create frontend/.env file:

# Get these from Firebase Console > Project Settings
REACT_APP_FIREBASE_API_KEY=your_api_key
REACT_APP_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
REACT_APP_FIREBASE_PROJECT_ID=your_project_id
REACT_APP_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
REACT_APP_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
REACT_APP_FIREBASE_APP_ID=your_app_id

# Backend API URL
REACT_APP_API_URL=http://localhost:3001

3. Start the App

npm start

The app will open at http://localhost:3000

What You Can Do

Test It Works

# Run tests to make sure everything works
npm test

If Something Goes Wrong

  1. Port busy: Run npx kill-port 3000
  2. Can’t connect to backend: Check backend is running on port 3001
  3. Firebase errors: Check your .env file has correct values