Skip to content

Latest commit

 

History

History
211 lines (145 loc) · 8.72 KB

README.md

File metadata and controls

211 lines (145 loc) · 8.72 KB

UT Dining Logo

UT Dining

UT Dining is a mobile application that provides comprehensive information about dining options at the University of Texas at Austin, including menus, nutrition data, allergens, and more.

This project has been adopted by Longhorn Developers. Huge thanks to Ethan Lanting (@EthanL06) for creating it!

Currently in Beta ‼️‼️
Join the Beta Test here (iOS only): TestFlight - UT Dining

UT Dining App Screenshot

Table of Contents

  1. Features
  2. Tech Stack
  3. How it Works
  4. Getting Started
  5. Project Structure
  6. Contributing
  7. Related Repositories
  8. License

Features

  • Real-time Menu Updates: View current menus for all UT Austin dining locations
  • Favorites: Save your favorite food items and get notified when they appear on menus
  • Meal Planning: Create daily meal plans with nutrition tracking
  • Allergen Information: Filter food items based on dietary restrictions and allergens
  • Location Information: Check operating hours, location details, and whether dining halls are currently open

Tech Stack

How it Works


At the core of the system is a remote Render instance, which is scheduled to run every 24 hours at 7:00 AM UTC (or 1:00 AM CST). This instance is responsible for scraping the dining menus from UT Austin, sourced from this page. Once the menus are scraped, the data is stored in a Supabase database.

Every 24 hours, the Expo mobile application fetches the latest menu data from the database, keeping the application up-to-date. To optimize performance and reduce loading times, the data is cached locally in an SQLite database using Drizzle ORM. This local cache allows the app to quickly retrieve the necessary information, ensuring a smooth, offline-first user experience.

Getting Started

Prerequisites

Installation

  1. Fork the Repository

    Go to the UT Dining repository and click the Fork button in the top-right corner of the page.

    After forking, clone the repository to your local machine:

    git clone https://github.com/<your-username>/ut-dining.git
    cd ut-dining
  2. Install Dependencies

     pnpm install
    
  3. Run Local Supabase Instance (OPTIONAL)

    For this step, you need Docker Desktop installed on your machine. Follow the guide to install it on your system.

    Next, install the Supabase CLI. Follow the guide here.

    After installing the Supabase CLI, run the following command to start a local Supabase instance:

    supabase start

    Once it's up and running, you should see a message like this in the terminal:

    Started supabase local development setup.
    
          API URL: http://localhost:54321
           DB URL: postgresql://postgres:postgres@localhost:54322/postgres
       Studio URL: http://localhost:54323
     Inbucket URL: http://localhost:54324
         anon key: eyJh......
    service_role key: eyJh......

    The API URL and anon key are the environment variables you need to configure in the next step.

  4. Configure Environment Variables

    Copy the .env-example file to create a .env file:

    cp .env-example .env

    Update with your Supabase API URL and anon key credentials:

     EXPO_PUBLIC_SUPABASE_URL=<supabase-url>
     EXPO_PUBLIC_SUPABASE_ANON_KEY=<supabase-anon-key>

    If not running Supabase locally, ask @EthanL06 for environment variables.

  5. Create an Expo Account

    Create an account at expo.dev. Once you create the account, you can log in with:

    npx expo login
  6. Start the Development Server

    pnpm run start

    Tunneling for Physical Devices

    If you're using a physical device on a public Wi-Fi network, use the following commands to tunnel the server to your device:

    pnpm run start --tunnel

    Note: Tunneling may have limitations with Supabase connections. Using an emulator is recommended for full functionality.

    Debugging Drizzle with Drizzle Studio

    While the development server is running, press Shift + M in the terminal and select expo-drizzle-studio-plugin to open Drizzle Studio in your browser. You can use this tool to inspect the SQLite database and troubleshoot any issues related to the local cache with SQLite and Drizzle ORM. Read more about Drizzle Studio here.

  7. Launch on your device

    Scan the QR code with your mobile device's camera or Expo Go app, or press:

    • a to open on Android emulator
    • i to open on iOS simulator

Project Structure

ut-dining/
├── app/               # Expo Router screens and local UI components
├── assets/            # Images and static assets
├── components/        # Global reusable UI components
├── data/              # Static data and constants
├── db/                # SQLite Database schema and utilities
├── drizzle/           # Drizzle ORM migrations and metadata
├── hooks/             # Custom React hooks
├── store/             # Zustand state management
├── types/             # TypeScript type definitions
└── utils/             # Helper functions and utilities

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes using conventional commit messages:
    feat: add new feature
    fix: resolve issue with X
    docs: update documentation
    style: format code (no functional changes)
    refactor: restructure code without changing behavior
    test: add or update tests
    chore: update dependencies or configuration
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Related Repositories

Here are the repositories related to the UT Dining project:

  1. UT Dining Scraper
    This repository contains the code for scraping dining menus from UT Austin and storing them in the Supabase database.

  2. UT Dining Website
    This repository hosts the code for the UT Dining website.

License

This project is licensed under the MIT License.

You are free to use, modify, and distribute this software under the terms of the MIT License. See the LICENSE file for more details.