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
- 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
Follow these steps to get a working instance set up on your computer:
- Run
npm install
to install all dependencies - Follow this guide to set up an Amazon RDS instance
- 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 - Create a
.env
file with valueDATABASE_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 - Moreover, in
.env
, add the keyNEXT_PUBLIC_CLIENT_ID="someID.apps.googleusercontent.com"
and enter your OAuth client ID - There is a database schema outlined in
prisma/schema.prisma
. To create the database tables, runnpx prisma migrate dev --name init
- Boot up the application with
npm run dev