Skip to content

DenouementX/Calorie-Tracker

Repository files navigation

Calorie-Tracker

A website to help you keep track of protein and caloric intake. The frontend is built using React and Tailwind CSS while the backend is powered by Next.js, Prisma to run an instance of a PostgreSQL database hosted with Amazon RDS, and OAuth 2.0 to access Google APIs.

Website Link: calorie-tracker-bay.vercel.app

TODO

  • Set up database to read and write macros from
  • Implement calendar feature to select dates from a dropdown
  • Make the website look nicer
  • Set up Google Authentication so it's no longer just for my use
    • Create an authentication/sign-in page
    • Fix rows not rerendering
    • Create log out button in tracker page
  • Migrate from SQLite to PostgreSQL with Amazon RDS
  • Deploy the website on Vercel

Developer Notes (for Mac)

Follow these steps to get a working instance set up on your computer:

  1. Run npm install to install all dependencies
  2. Follow this guide to set up an Amazon RDS instance
  3. On the AWS console, navigate to the RDS database security group and under the inbound tab, delete the existing rule and create a new one allowing connections from source 0.0.0.0/0 (everyone). In general, this is not safe but ok for development
  4. Create a .env file with value DATABASE_URL="postgres[ql]://[username[:password]@][host[:port],]/database[?parameter_list]" to specify the connection to Amazon RDS. Information about formatting the connection URI can be found here
  5. Moreover, in .env, add the key NEXT_PUBLIC_CLIENT_ID="someID.apps.googleusercontent.com" and enter your OAuth client ID
  6. There is a database schema outlined in prisma/schema.prisma. To create the database tables, run npx prisma migrate dev --name init
  7. Boot up the application with npm run dev

About

A website to help you keep track of protein and caloric intake

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published