A full-stack application for managing Michigan Lake data with React Native/Expo frontend and FastAPI backend.
- Prerequisites & Software Installation
- Project Setup
- Git Workflow with GitHub Desktop
- Building & Running with Docker
- Accessing the Application
- Troubleshooting
Install the following software in this order:
- Download from: https://git-scm.com/download/win
- Run the installer and follow the default options
- Verify installation:
git --version
- Download from: https://desktop.github.com/
- Install and sign in with your GitHub account
- This provides a GUI interface for all Git operations
- Download from: https://nodejs.org/ (LTS version recommended)
- Verify installation:
node --version npm --version
- Download from: https://www.python.org/downloads/
- Important: Check "Add Python to PATH" during installation
- Verify installation:
python --version pip --version
- Download from: https://www.docker.com/products/docker-desktop/
- Install and sign in (create free Docker account if needed)
- Verify installation:
docker --version docker compose --version
- Download from: https://www.postgresql.org/download/windows/
- Remember the superuser password
- Verify installation:
psql --version
Using GitHub Desktop:
- Open GitHub Desktop
- Click "File" → "Clone Repository"
- Select the repository
fiorittoev/itm411-teamthree8 - Choose a local path (e.g.,
C:\Users\YourUsername\Desktop\Programming) - Click "Clone"
Using Terminal:
git clone https://github.com/fiorittoev/itm411-teamthree8.git
cd itm411-teamthree8Navigate to the backend directory:
cd backendCreate a Python virtual environment:
python -m venv venvActivate the virtual environment:
# Windows PowerShell
.\venv\Scripts\Activate.ps1
# Windows Command Prompt (cmd)
venv\Scripts\activate.batInstall Python dependencies:
pip install -r requirements.txtNavigate to the frontend directory:
cd ../frontendInstall Node.js dependencies:
npm installBackend (.env file)
Create/update backend/.env:
DATABASE_URL=postgresql://postgres:your_password_here@localhost:5432/mml_db
SUPABASE_URL=https://xxxx.supabase.co
SUPABASE_ANON_KEY=your_public_key_here
SUPABASE_SERVICE_ROLE_KEY=your_service_key_here
Frontend (.env file)
Create/update frontend/.env:
EXPO_PUBLIC_API_URL=http://localhost:8000
EXPO_PUBLIC_SUPABASE_URL=https://xxxx.supabase.co
EXPO_PUBLIC_SUPABASE_ANON_KEY=your_public_key_here
Docker (.env for docker-compose)
Create/update docker-compose.yml environment variables:
- Update
POSTGRES_PASSWORDwith a secure password - Ensure
DATABASE_URLmatches the PostgreSQL credentials
The backend is a FastAPI application with the following structure:
backend/
├── app/
│ ├── main.py # Main FastAPI application entry point
│ ├── core/
│ │ └── config.py # Configuration settings, environment variables
│ └── db/
│ ├── base.py # Database base setup and session management
│ └── models/ # SQLAlchemy ORM models (create as needed)
├── alembic/
│ ├── versions/ # Database migration files (auto-generated)
│ ├── env.py # Alembic environment configuration
│ └── script.py.mako # Alembic migration script template
├── alembic.ini # Alembic configuration file
├── requirements.txt # Python dependencies
├── Dockerfile # Docker configuration for backend
└── .env # Environment variables (DO NOT commit)
Key Files:
main.py- Define your API routes hereconfig.py- Store database URLs, API keys, and other settingsalembic/versions/- Database schema changes tracked hererequirements.txt- Add new Python packages here and runpip install -r requirements.txt
The frontend is an Expo React Native application with the following structure:
frontend/
├── app/
│ ├── _layout.tsx # Root layout component (navigation & auth routing)
│ ├── auth.tsx # Authentication screen (Sign in / Sign up)
│ ├── modal.tsx # Modal screen component
│ └── (tabs)/
│ ├── _layout.tsx # Tab navigation layout
│ ├── index.tsx # Home tab screen
│ └── explore.tsx # Explore tab screen
├── services/
│ ├── api.ts # API client for backend communication
│ └── supabase.ts # Supabase initialization (authentication)
├── assets/
│ └── images/ # Static images and assets
├── scripts/
│ └── app/ # Additional app scripts
├── package.json # npm dependencies and scripts
├── .env # Environment variables (DO NOT commit)
├── app.json # Expo app configuration
├── tsconfig.json # TypeScript configuration
├── eslint.config.js # ESLint configuration
├── Dockerfile # Docker configuration for frontend
└── .expo/ # Expo configuration (auto-generated)
Key Files:
app/_layout.tsx- Root navigation and session managementapp/auth.tsx- Authentication UI and logicapp/(tabs)/- Tab-based screens (Home, Explore)services/api.ts- Modify to add API calls to the backendservices/supabase.ts- Supabase client configurationpackage.json- Add new npm packages here and runnpm install
- Open GitHub Desktop
- Ensure you're on the correct repository (top-left dropdown)
- Click the "Fetch origin" button
- If there are new changes, click "Pull origin" to download them
- The status will show "This branch is up to date" when complete
- Click "Current Branch" at the top
- Click "New Branch"
- Enter branch name (e.g.,
feature/add-user-auth) - Choose "main" as the base branch
- Click "Create Branch"
- Click "Publish branch" to push it to GitHub
- Make changes to files in your editor
- In GitHub Desktop, you'll see changed files in the "Changes" tab
- Check the files you want to commit
- Enter a commit message (e.g., "Add authentication endpoints")
- Click "Commit to [branch-name]"
- After committing, click "Push origin" to upload changes to GitHub
- Status bar will show "No local changes" when complete
- After pushing changes, click "Create Pull Request"
- This opens a browser window to GitHub
- Add a description of your changes
- Click "Create pull request"
- Wait for team review and approval
- After pull request is approved, go to GitHub in your browser
- Click "Merge pull request"
- Click "Confirm merge"
- Back in GitHub Desktop, click "Fetch origin" to get the merged changes
- Click "Current Branch" at the top
- Select the branch you want to work on from the list
- Click "Switch Branch"
Docker allows you to run the entire application (database, backend, frontend) in isolated containers.
- Docker Desktop must be running (check system tray)
From the project root directory:
Run both Mobile and Web:
cd itm411-teamthree8
docker compose --profile mobile --profile web up --buildRun Mobile only:
docker compose --profile mobile up --buildRun Web only:
docker compose --profile web up --buildThese commands will:
- Build Docker images for backend and selected frontend(s)
- Start PostgreSQL database
- Start FastAPI backend
- Start Expo development servers
- Download and configure all dependencies
First run may take 5-10 minutes.
While running, you can view logs in the same terminal. To stop:
# Press Ctrl+C in the terminaldocker compose up --builddocker compose downdocker compose down -vOnce docker compose up is running (with appropriate profiles), you can access:
- URL: http://localhost:8081
- Open in your browser
- Hot reload enabled - changes are reflected immediately
Using Expo Go App (Easiest):
- Download "Expo Go" from App Store or Google Play
- On your phone, open Expo Go
- In the terminal where
docker compose upis running, scan the QR code - Your app will load on your phone
Using Android Emulator:
- Install Android Studio: https://developer.android.com/studio
- In the terminal, run:
cd frontend npm run android
- This automatically opens the Android emulator and loads your app
Using iOS Simulator (Mac only):
- In the terminal, run:
cd frontend npm run ios
- URL: http://localhost:8000
- API Documentation (Swagger UI): http://localhost:8000/docs
- Alternative docs (ReDoc): http://localhost:8000/redoc
- Host: localhost
- Port: 5432
- Username: postgres
- Password: (set in docker-compose.yml)
- Database: mml_db
Connect with pgAdmin or DBeaver:
- Download pgAdmin: https://www.pgadmin.org/download/
- Create new connection with the above credentials
Terminal 1 - Backend:
cd backend
.\venv\Scripts\Activate.ps1
python -m uvicorn app.main:app --reloadBackend will be available at http://localhost:8000
Terminal 2 - Frontend:
cd frontend
npm startFollow the prompts to open in web, iOS, or Android
Docker is recommended as it ensures consistency across team members and matches production environment.
"Docker daemon is not running"
- Open Docker Desktop from your Start menu and wait 1-2 minutes for it to start
"Port 5432 already in use"
- Another PostgreSQL instance is running
- Stop other services or change the port in docker-compose.yml
"Cannot connect to database"
- Ensure
DATABASE_URLin backend/.env matches docker-compose.yml credentials - Check that mml-db container is running:
docker ps
Expo won't start
- Clear cache:
npm run reset-project - Delete node_modules:
rm -r node_modulesthennpm install
Port 8081 already in use
- Close other applications using that port
- Or change port in docker-compose.yml frontend-web service
"ModuleNotFoundError" when running locally
- Activate virtual environment:
.\venv\Scripts\Activate.ps1 - Verify Python version:
python --version(should be 3.10+)
Database migration errors
- Reset database:
docker compose down -vthendocker compose up --build
# Docker commands
docker compose up --build # Start all services
docker compose down # Stop all services
docker compose logs -f # View live logs
docker compose ps # View running containers
docker compose down -v # Stop and remove volumes (CAREFUL!)
# Git commands (or use GitHub Desktop)
git status # Check current branch status
git add . # Stage all changes
git commit -m "message" # Commit changes
git push # Push to GitHub
git pull # Pull latest changes
git branch -a # List all branches
# Frontend commands
npm install # Install dependencies
npm start # Start development server
npm run web # Run web version
npm run android # Run Android version
npm run ios # Run iOS version
npm run lint # Check code style
# Backend commands
python -m venv venv # Create virtual environment
.\venv\Scripts\Activate.ps1 # Activate virtual environment
pip install -r requirements.txt # Install dependencies
python -m uvicorn app.main:app --reload # Run development server- Expo Documentation
- FastAPI Documentation
- Docker Documentation
- React Native Documentation
- GitHub Desktop Guide
Last Updated: February 2026
For questions or issues, contact the team or create an issue on GitHub.