Skip to content

GraphQL API to log and track drink consumption and water content

Notifications You must be signed in to change notification settings

ChrisPlease/drink-api

Repository files navigation

Water Log API

Welcome to the Waterlog API.

This app is a GraphQL lambda (and associated lambdas) for creating and editing "Drinks", and logging "Entries".

Development Guide

Requirements

Getting started

  • Clone the repo
  • Copy .env.sample, rename to .env and populate variables

DB and migrations

This project uses Postgres@16 in a docker container. To set up the db:

% docker compose up -d

To run migrations and seed the database, run a dev container of the graphql-lambda:

% docker build -f Dockerfile.dev -t graphql-lambda:dev .
% docker run -it graphql-lambda:dev /bin/bash 

% pnpm prisma migrate dev

# After migrations, you don't need this container anymore, feel free to delete

Building the project

% pnpm build

Running the project

This project uses the aws sam cli for testing and deployment. To begin using the lambdas locally, run

About

GraphQL API to log and track drink consumption and water content

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published