Skip to content

pantharshit007/gymetry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gymetry

Gymetry Logo

Website Issues Stars License

Landing page

About

Gymetry makes it easy to log your daily workouts and visualize your fitness journey with powerful data insights. Whether you're tracking weights, reps, or even your walking activity, Gymetry offers an intuitive dashboard to monitor progress over time.

Installation

Clone the Repository

git clone https://github.com/pantharhsit007/gymetry.git
cd gymetry

Important

Make sure to set up the .env file before running the docker-compose.

Docker (Recommended)

docker-compose up --watch

or

Install Dependencies

pnpm install

Start the Development Server

pnpm dev

Environment Variables

Create a .env file in the root directory from .env.example and add the following:

NEXT_PUBLIC_API_URL=http://localhost:3000
AUTH_SECRET=""
AUTH_GOOGLE_ID=""
AUTH_GOOGLE_SECRET=""
DATABASE_URL="postgresql://postgres:mysecretpassword@localhost:5432/gymetry-db"
REDIS_URL="redis://localhost:6379"
UPSTASH_REDIS_REST_URL=""
UPSTASH_REDIS_REST_TOKEN=""
CACHE_TTL="86400" # 24 hours
NEXT_PUBLIC_POSTHOG_KEY=""
NEXT_PUBLIC_POSTHOG_HOST="https://us.i.posthog.com"

Make sure to update the values as necessary for your setup.

Setting Up Database & Redis

Gymetry uses PostgreSQL as its database and Redis for caching. You have a couple of options:

Option 1: Using Docker (Recommended)

Start PostgreSQL

pnpm db:docker

or

docker run --name gymetry-db \
  -e POSTGRES_USER=postgres \
  -e POSTGRES_PASSWORD=mysecretpassword \
  -e POSTGRES_DB=gymetry \
  -p 5432:5432 \
  -d postgres

Start Redis

docker run --name gymetry-redis \
  -p 6379:6379 \
  -d redis

Option 2: Using Providers

Grab the Database and Redis URLs from your provider

  • PostgreSQL: Neon, Avian or Vercel
  • Redis: Redis Labs, Redis Enterprise, Upstash, etc.

Ensure that your .env file’s DATABASE_URL and REDIS_URL match the settings above.

Tech Stack

  • Frontend: Next.js, Tailwind CSS, TypeScript
  • Backend: Next.js API Routes, NextAuth.js for authentication
  • Database: PostgreSQL
  • Caching: Redis

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a new branch for your feature (git checkout -b feature-name).
  3. Commit your changes (git commit -m 'Add some feature').
  4. Push to the branch (git push origin feature-name).
  5. Open a Pull Request.

License

This project is licensed under the MIT License. See the LICENSE file for details.