A food recipes database, with features for meal planning, shopping list.
- Keep hand written recipes as well as ones from the internet (allrecipes, youtube, instagram, etc.) in one centralized location.
- Plan meals weekly or daily and groceries shopping with these recipes through search and tags.
- Share and collaborate with family and friends.
Clone and cd into the project to install dependencies.
git clone https://github.com/quangd42/meal-org.git
cd meal-org
go mod tidy
Create a .env file. Here's an example:
PORT=8080
# Generate a random string for jwt-secret
JWT_SECRET=[jwt-secret]
# Replace [db-user] and [db-name] with your local postgres info
DB_USER=[db-user]
DB_NAME=[db-name]
DATABASE_URL=postgres://${DB_USER}:@localhost:5432/${DB_NAME}?sslmode=disable
You can generate your own JWT_SECRET with a command like this:
openssl rand -base64 64
To start the server locally:
# setup the database
make db/reset
# generate code and build server binary
make build
# run the binary
make run
make help
for more details.
Exposed APIs can be found in the tests in form of hurl files.
After setting up the local environment per quick start, to develop locally with live reloading on the server:
make live/server
When extending the UI with Templ, additionally you can get browser live reloading by running:
# See details of what this does in the Makefile.
# make live/server in included in make live
make live
I'm currently testing the APIs with hurl. Make sure to have it installed. Test setup and tear down are done in test_integration.sh
To start, create a new .env in the scripts dir:
# Replace [db-user] with your postgres user
DB_USER=[db-user]
To run the test script:
make test
If you'd like to contribute, please fork the repository and open a pull request to the main
branch.