A web application for tracking weight trends by integrating with smart scales from Withings and Fitbit.
- 📊 Weight trend visualization with moving averages
- 🔄 Automatic sync with Withings and Fitbit smart scales
- 📱 Responsive design for mobile and desktop
- 🔐 Secure authentication with Clerk
- 📈 Goal tracking and progress monitoring
- 🌍 Metric and imperial unit support
- 🔗 Legacy user migration from classic TrendWeight
- Frontend: React + TypeScript + Vite + Tailwind CSS
- Backend: C# ASP.NET Core Web API
- Database: Supabase (PostgreSQL)
- Authentication: Clerk with JWT
For detailed architecture information, see ARCHITECTURE.md.
- Node.js (v18 or higher)
- .NET 9 SDK
- A Supabase project (for database)
- A Clerk account (for authentication)
-
Clone the repository:
git clone https://github.com/trendweight/trendweight.git cd trendweight -
Install dependencies:
npm install
-
Copy
.env.exampleto.envand configure your environment variables:cp .env.example .env
-
Start the development servers:
npm run dev
This starts both the frontend (http://localhost:5173) and backend (http://localhost:5199) servers.
-
Create a Clerk application at https://clerk.com
-
Configure the following social login providers in Clerk Dashboard:
- Google OAuth
- Microsoft OAuth
- Apple OAuth
-
Set the following environment variables in your
.envfile:# Frontend (Vite) VITE_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key VITE_SUPABASE_URL=https://your-project-ref.supabase.co VITE_SUPABASE_ANON_KEY=your_supabase_anon_key # Backend (ASP.NET Core) Clerk__Authority=https://your-instance.clerk.accounts.dev Clerk__SecretKey=your_clerk_secret_key Supabase__Url=https://your-project-ref.supabase.co Supabase__AnonKey=your_supabase_anon_key Supabase__ServiceKey=your_supabase_service_role_key -
Configure allowed redirect URLs in Clerk:
- Development:
http://localhost:5173/* - Production:
https://yourdomain.com/*
- Development:
npm run dev- Start both frontend and backend in development modenpm run dev:stop- Stop the development serversnpm run build- Build all workspaces for productionnpm run test- Run tests in all workspacesnpm run check- Run TypeScript and lint checksnpm run format- Format code in all workspacesnpm run clean- Clean all build artifacts and dependencies
Build and run with Docker:
npm run docker:build
npm run docker:runThe application is designed to be deployed as a Docker container. The included Dockerfile creates a production-ready image that serves both the API and frontend.
Build the Docker image:
docker build -t trendweight:latest .The container runs on port 8080 and requires environment variables for backend configuration. See ARCHITECTURE.md for deployment details.
MIT License - see LICENSE for details.
Contributions are welcome. However, it's essentially a one-man show (me), and I'm pretty protective of the project—probably too overprotective. That said, if you have something you'd like to contribute, please open an issue and let's discuss.
|
Isabel |
Mitja Bezenšek |