Coder Social home page Coder Social logo

siamr902 / crunch-fitness Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 4.46 MB

Spin-off of the Crunch Fitness site with authentication and workout tracking functionality.

Home Page: https://crunch-tracker.vercel.app/

TypeScript 95.81% JavaScript 2.13% CSS 2.05%
next-auth nextjs prisma railway react tailwindcss typescipt fitness-tracker

crunch-fitness's Introduction

logo

Crunch Fitness++

About

Full-stack remodel of the crunch fitness website, inspired by my local gym. Features include user authentication using next-auth, a monthly membership payments system using stripe, a hosted postgres database on Railway to store users' workouts, and more. Prisma was used as the ideal ORM to facilitate operations and queries on the database, as well as integrate with Next-Auth using the prisma adapter. Currently, authenticated users have the ability to create, update, and delete workouts. Future additions include a nutrition tracker and a system where users can track their physical stats. Additionally, I may consider adding a way to sort the workouts by date completed and rating.

Mini-Obstacles

I experienced a couple of minor difficulties while creating this project. For one, dynamic style changes, like the weather background depending on the current status, must be implemented using css-in-js, as tailwind cannot support dynamic styles. If a user deletes a workout, the exercises that go along with the workout should also be deleted from the database. This is where prisma referential actions, like cascading deletes, come into use. There were also a handful of issues I faced during the deployment phase of the project. I can't recall if it was explicitly stated in the docs, but you do need a NEXTAUTH_SECRET variable when deploying to production; otherwise, you will get a callback error when tryinng to sign in. One other trivial issue I faced was not importing an instance of prisma client for every file where it was used. Locally, prisma client was instantiated as a global variable; however, in production that was not the case, so I had to import it separately in each file afterwards.

crunch-fitness's People

Contributors

siamr902 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.