A tool for University of Minnesota students to get notifications for their
favorite dining hall meals. This project is associated with
Social Coding. If you are in the group and need
access to the repository, email your github username to calle159@umn.edu.
- Package Manager - Bun
- Framework - Next.js
- Styling - Tailwind CSS
- Formatter - Prettier
- Linter - Eslint
- In a terminal, clone the repository using
git clone https://github.com/david-callender/FoodFinder.git. This will create a folder calledFoodFinderin the current working directory. - Install bun from here. You will have to completely restart your shell or VSCode for any
buncommands to work. - Run
bun installto install all required packages. - Run
bun pm trust --allto trust installed packages. - Create a
.envfile with the structure defined below. - Run
bun devto start the dev server.
Create a .env file in the frontend/ folder that contains the following data, where YOUR-KEY can be anything, as long as it matches the backend.
NEXT_PUBLIC_BACKEND_URL=http://localhost:8080
access_key=YOUR-KEY
refresh_key=YOUR-KEY- Run
bun lintto lint your code for common issues. - Run
bun formatto format your code.
Create a .env file in the backend/ folder that contains the following data, where YOUR-KEY can be anything, as long as it matches the frontend.
access_key=YOUR-KEY
refresh_key=YOUR-KEYThe dineocclient package uses the encodings/json/v2 API. Currently, this
library is not available unless you set the following environment variable prior
to builds: GOEXPERIMENT=jsonv2
To set this environment variable on powershell, use the following command:
$env:GOEXPERIMENT="jsonv2"
Using this command will set the environment variable for the rest of your powreshell session.
In bash, you can use the following command:
export GOEXPERIMENT=jsonv2
Other *nix shells will have similar syntax, if you aren't using bash then you can look up specific methods to set variables in your particular shell.
The go.mod files of all current modules, and any new modules, should be set up with
replace github.com/david-callender/FoodFinder/utils => ../utils to allow any libraries
within utils to be used as dependencies across all modules in the project.
The module notifier located at /notifier from the root of the project
reads its sending address as NOTIFIER_EMAIL, its SMTP password as
NOTIFIER_PASSWORD, and the database connection string as DATABASE_URL. The
notifier should not generally be run from dev machines without prior discussion.
However, you must make sure to set these environment variables before running
it or else you will get an error.
Make sure run go get . in the notifier directory as well.
The module scraper located at /scraper from the root of the project also
reads the database connections tring as DATABASE_URL. It can take arguments
in the form of -back N and -forward N which specify the number of days in
the past and future to scrape. It will delete all menu data that is older than
the furthest day in the past that will be scraped based on specified values.
- Install Go.
- Run
go get .to install packages. - Run
go install github.com/air-verse/air@latestto install air. - Run
airto start the dev server.
- Run
go fmt .format your code.