A comprehensive social fitness platform that connects gym enthusiasts, enables gym discovery, and fosters a community of fitness-minded individuals. FitCheck combines social networking with fitness tracking, allowing users to share workout posts, discover gyms, track personal records, and connect with like-minded people.
- Multi-Provider Authentication: Email/password and Google OAuth integration
- User Profiles: Customizable profiles with bio, profile pictures, and personal stats
- Username System: Unique usernames with profile customization
- Account Verification: Email verification for new accounts
- Feed System: Infinite scroll feed with workout posts and updates
- Post Creation: Rich post creation with image uploads, descriptions, and tags
- Engagement: Like, comment, and share posts with real-time updates
- Following System: Follow/unfollow users and see their activities
- Real-time Messaging: Direct messaging between users with WebSocket support
- Profile Visits: View other users' profiles, posts, and gym activities
- Personal Records (PRs): Track and manage personal bests for various exercises
- Gym Integration: Add gyms to your profile and share gym visits
- Workout Posts: Share workout descriptions, images, and achievements
- Progress Tracking: Visual representation of fitness journey
- Gym Directory: Comprehensive database of gyms with detailed information
- Interactive Maps: Location-based gym discovery using Leaflet maps
- Gym Profiles: Detailed gym pages with ratings, amenities, and user reviews
- Search & Filter: Advanced search functionality for finding gyms
- User-Gym Associations: Link your profile to gyms you frequent
- Real-time Chat: Instant messaging system with WebSocket integration
- Comment System: Threaded comments on posts with real-time updates
- Notifications: Stay updated on likes, comments, and messages
- Framework: React 19 with Vite for fast development
- Routing: React Router DOM for client-side navigation
- State Management: React hooks and context for state management
- Styling: SCSS for modular and maintainable styles
- UI Components: Custom component library with Lucide React icons
- Image Handling: React Image Crop for profile picture cropping
- Maps: React Leaflet for interactive gym location maps
- Runtime: Node.js with Express.js framework
- Database: Supabase (PostgreSQL) for data persistence
- Authentication: Supabase Auth with custom token validation
- File Storage: Firebase Storage for image uploads
- Real-time: Socket.IO for live messaging and notifications
- API Design: RESTful API with comprehensive endpoint coverage
- Users: Profile information, authentication data
- Posts: Social media posts with images and metadata
- Comments: Threaded comment system
- Gyms: Comprehensive gym database with locations and amenities
- Personal Records: User fitness tracking data
- Messages: Real-time messaging system
- Relationships: Following/follower associations
- Node.js (v16 or higher)
- npm or yarn package manager
- Supabase account and project
- Firebase project (for file storage)
Create .env files in both frontend and backend directories:
VITE_API_BASE_URL=http://localhost:3001
VITE_SUPABASE_URL=your_supabase_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
VITE_SITE_URL=http://localhost:5173PORT=3001
SUPABASE_URL=your_supabase_url
SUPABASE_SERVICE_KEY=your_supabase_service_key
FIREBASE_PROJECT_ID=your_firebase_project_id
FIREBASE_CLIENT_EMAIL=your_firebase_client_email
FIREBASE_PRIVATE_KEY=your_firebase_private_key
NODE_ENV=development-
Clone the repository
git clone https://github.com/Xan1237/fitcheck.git cd fitcheck -
Install root dependencies
npm install
-
Install frontend dependencies
cd frontend npm install -
Install backend dependencies
cd ../backend npm install -
Set up database
- Create a Supabase project
- Run the SQL scripts in
backend/sql/to set up tables - Configure authentication providers in Supabase dashboard
-
Set up Firebase Storage
- Create a Firebase project
- Enable Storage and configure security rules
- Generate service account credentials
-
Start the backend server
cd backend npm start -
Start the frontend development server
cd frontend npm run dev -
Access the application
- Frontend: http://localhost:5173
- Backend API: http://localhost:3001
- Connect your GitHub repository to Vercel
- Configure environment variables in Vercel dashboard
- Deploy automatically on push to main branch
- Connect your GitHub repository to Render
- Configure environment variables
- Set build command:
cd backend && npm install - Set start command:
cd backend && npm start
fitcheck/
โโโ frontend/ # React frontend application
โ โโโ public/ # Static assets
โ โโโ src/
โ โ โโโ components/ # Reusable UI components
โ โ โ โโโ header/ # Navigation header
โ โ โ โโโ footer/ # Page footer
โ โ โ โโโ BottomNav/ # Mobile navigation
โ โ โ โโโ map/ # Map components
โ โ โ โโโ ...
โ โ โโโ pages/ # Page components
โ โ โ โโโ feed/ # Main social feed
โ โ โ โโโ profile/ # User profiles
โ โ โ โโโ gym/ # Gym pages
โ โ โ โโโ messages/ # Messaging interface
โ โ โ โโโ ...
โ โ โโโ services/ # API and external services
โ โ โโโ data/ # Static data and configurations
โ โ โโโ assets/ # Images and media
โ โโโ package.json
โโโ backend/ # Node.js backend server
โ โโโ controllers/ # Route handlers and business logic
โ โโโ routes/ # Express route definitions
โ โโโ middleware/ # Custom middleware functions
โ โโโ models/ # Data models and schemas
โ โโโ config/ # Configuration files
โ โโโ sql/ # Database scripts
โ โโโ utils/ # Helper utilities
โ โโโ websocket/ # Socket.IO configuration
โ โโโ package.json
โโโ restTests/ # API testing files
โโโ vercel.json # Vercel deployment configuration
โโโ README.md
POST /auth/signup- User registrationPOST /auth/signin- User loginPOST /auth/validate-google-token- Google OAuth validation
GET /api/profile/:username- Get user profilePUT /api/profile/:username- Update user profilePOST /api/uploadProfilePicture- Upload profile pictureGET /api/checkProfileOwnership/:username- Check profile ownership
GET /api/posts- Get feed posts with paginationPOST /api/createPost- Create new postDELETE /api/post/:id- Delete postPOST /api/post/:id/comment- Add commentGET /api/post/:id/comments- Get post commentsGET /api/addPostLike/:id- Toggle post like
POST /api/addPersonalRecord- Add personal recordPUT /api/pr- Update personal recordDELETE /api/pr- Delete personal recordGET /api/getNumberPR/:username- Get PR count
GET /api/getGymsByProvince/:province- Get gyms by locationGET /api/gym/:id- Get gym detailsPOST /api/addUserGym- Associate user with gymGET /api/getUserGyms/:username- Get user's gyms
POST /api/newChat- Create new chatPOST /api/newMessage- Send messageGET /api/getMessages/:chatId- Get chat messagesGET /api/getUserChats- Get user's chats
POST /api/newFollower- Follow userPOST /api/unfollowUser- Unfollow userGET /api/getFollowerCount/:username- Get follower countGET /api/getFollowingCount/:username- Get following count
- React 19: Latest React version with improved performance
- Vite: Fast build tool and development server
- React Router DOM: Client-side routing
- Axios: HTTP client for API requests
- SCSS: CSS preprocessor for enhanced styling
- Socket.IO Client: Real-time communication
- React Leaflet: Interactive maps
- Lucide React: Modern icon library
- React Icons: Additional icon sets
- React Image Crop: Image cropping functionality
- Node.js: JavaScript runtime
- Express.js: Web application framework
- Supabase: Backend-as-a-Service (Database & Auth)
- Firebase Admin: File storage and additional services
- Socket.IO: Real-time bidirectional communication
- Morgan: HTTP request logging
- CORS: Cross-origin resource sharing
- dotenv: Environment variable management
- PostgreSQL (via Supabase): Primary database
- Supabase Auth: User authentication and management
- Firebase Storage: File and image storage
- Vercel: Frontend hosting and deployment
- Render: Backend hosting and deployment
- JWT Authentication: Secure token-based authentication
- Environment Variables: Sensitive data protection
- CORS Configuration: Controlled cross-origin requests
- Input Validation: Server-side request validation
- File Upload Security: Secure image upload handling
- SQL Injection Protection: Parameterized queries via Supabase
- Responsive Design: Mobile-first approach with desktop optimization
- Dark/Light Mode: Adaptive theming (can be extended)
- Infinite Scroll: Seamless content loading
- Real-time Updates: Live feed updates and messaging
- Progressive Enhancement: Graceful degradation for older browsers
- Accessibility: ARIA labels and keyboard navigation support
- REST client files in
restTests/directory - Comprehensive endpoint testing with sample requests
# Frontend tests (if configured)
cd frontend
npm test
# Backend API tests using REST files
# Use VS Code REST Client extension or similar tool- Responsive Breakpoints: Optimized for mobile, tablet, and desktop
- Touch-Friendly UI: Appropriate touch targets and gestures
- Mobile Navigation: Bottom navigation bar for mobile users
- Performance: Optimized images and lazy loading
-
Feature Development
- Create feature branch from main
- Develop frontend and backend components
- Test API endpoints using REST files
- Ensure responsive design
-
Code Review
- Create pull request
- Review code for security and performance
- Test deployment previews
-
Deployment
- Merge to main branch
- Automatic deployment via Vercel (frontend) and Render (backend)
- Monitor application health
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Issues: Report bugs and request features via GitHub Issues
- Discussions: Community discussions on GitHub Discussions
- Email: Contact the development team for urgent matters
- Mobile App: React Native application for iOS and Android
- Advanced Analytics: Workout tracking and progress analytics
- Gym Partnerships: Integration with gym management systems
- Social Challenges: Community fitness challenges and competitions
- AI Recommendations: Personalized gym and workout recommendations
- Video Content: Support for workout video sharing
- Nutrition Tracking: Meal logging and nutrition insights