Fitlog is a GenAI-powered workout tracking application that allows users to log their routines, workouts, and sets. The app includes features like fuzzy search for routine and workout names, powered by Fuse.js, and integrates Prisma for database management. This is a MERN-stack application built using Next.js for server-side rendering.
Here is the database schema for tracking user routines, workouts, and sets:
user_id
, username
, and password
.routine_id
, routine_name
, and user_id
. A routine has multiple workouts.workout_id
, workout_name
, routine_id
, and date
. A workout has multiple sets.set_id
, set_weight
, set_reps
, workout_id
, and date
.Clone the repository:
git clone https://github.com/yourusername/fitlog.git
Navigate into the project directory:
cd fitlog
Install dependencies:
npm install
Set up environment variables by creating a .env file. Add your Prisma database URL, Clerk credentials, and other required environment variables:
DATABASE_URL="your_postgres_database_url"
NEXT_PUBLIC_CLERK_FRONTEND_API="your_clerk_frontend_api"
CLERK_API_KEY="your_clerk_api_key"
GROQ_API_KEY="Groq Api Key"
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/login
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/signup
Apply Prisma migrations to your database:
npx prisma migrate dev
Run the development server:
npm run dev
Open your browser and go to http://localhost:3000 to see the app in action.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Feel free to fork the repository and submit pull requests. Contributions are welcome!
Future Enhancements
Advanced Analytics: Integrate charts and analytics for users to visualize their workout progress.
GenAI Improvements: Enhance the AI assistant with personalized workout recommendations.
Mobile App: Plan to extend the web app into a mobile application using React Native.
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.