A modern fitness platform connecting users with gyms and personal trainers.
- Node.js 18+
- npm or yarn
- Backend API running on
http://localhost:8080
# Clone repository
git clone <repository-url>
cd AWS_WS_FE
# Install dependencies
npm install
# Copy environment variables
cp env.example .env.local
# Run development server
npm run devOpen http://localhost:3000 in your browser.
AWS_WS_FE/
βββ app/ # Next.js App Router pages
β βββ auth/ # Authentication pages
β βββ dashboard/ # Dashboard pages (admin, gym-staff, pt)
β βββ gyms/ # Gym pages
β βββ trainers/ # Trainer pages
β βββ offers/ # Offer pages
β βββ profile/ # User profile
β
βββ components/ # React components
β βββ ui/ # Reusable UI components
β βββ layout/ # Layout components (Header, Footer)
β βββ landing/ # Landing page components
β βββ gyms/ # Gym-specific components
β βββ trainers/ # Trainer-specific components
β βββ offers/ # Offer-specific components
β
βββ lib/ # Utility libraries
β βββ api.ts # API service layer
β βββ cognito.ts # AWS Cognito integration
β βββ aws.ts # AWS SDK utilities
β βββ utils.ts # Helper functions
β
βββ store/ # State management (Zustand)
β βββ authStore.ts # Authentication state
β βββ searchStore.ts # Search state
β βββ uiStore.ts # UI state
β
βββ types/ # TypeScript type definitions
β βββ index.ts # All type definitions
β
βββ docs/ # Documentation
β βββ api/ # API documentation
β βββ frontend/ # Frontend guides
β βββ backend/ # Backend guides
β βββ aws/ # AWS documentation
β βββ deployment/ # Deployment guides
β
βββ public/ # Static assets
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- State Management: Zustand
- Forms: React Hook Form + Zod
- HTTP Client: Axios
- Authentication: AWS Cognito
- Icons: Lucide React
- Framework: Spring Boot 3
- Language: Java 21
- Database: PostgreSQL 15 + PostGIS
- Authentication: JWT (AWS Cognito)
- Storage: AWS S3
- API Documentation: Swagger/OpenAPI
- π Search gyms and trainers by location
- π Geo-location based search (radius)
- π° Browse offers and deals
- β Rate and review gyms/trainers
- π© Report inappropriate content
- π€ User profile management
- π’ Register and manage gym
- πΌ Create gym offers
- π₯ Assign personal trainers
- π View analytics
- πͺ Create PT profile
- π List specializations and certifications
- π΅ Set hourly rates
- π― Create PT offers
- ποΈ Associate with gyms
- π‘οΈ Moderate offers
- π Review reports
- β Approve/reject content
- π₯ Manage users
Create .env.local file:
# API Configuration
NEXT_PUBLIC_API_BASE_URL=http://localhost:8080/api/v1
# AWS Cognito
NEXT_PUBLIC_AWS_REGION=us-east-1
NEXT_PUBLIC_COGNITO_USER_POOL_ID=your-pool-id
NEXT_PUBLIC_COGNITO_CLIENT_ID=your-client-id
# AWS S3 (for media upload)
NEXT_PUBLIC_S3_BUCKET=easybody-media
NEXT_PUBLIC_S3_REGION=us-east-1Comprehensive documentation is available in the docs/ folder:
- API Documentation - Complete API reference
- Frontend Guide - Frontend development guide
- Integration Status - Current integration status
- Backend Setup - Backend setup guide
- Deployment Guide - Deployment instructions
npm run devnpm run build
npm startnpm run lintThis project has been heavily optimized for performance:
- β 60 FPS on all devices
- β Removed heavy animations (glow, neon, 3D effects)
- β Optimized font loading (9 weights β 3 weights)
- β Simplified transitions (500ms β 150ms)
- β Removed backdrop-blur effects
- β Responsive design (mobile-first)
- β Lazy loading images
- β Code splitting
Result: 2-3x faster performance! π
- User signs up via AWS Cognito
- Email verification (OTP)
- Login to get JWT token
- Register user in backend database
- JWT token used for all API calls
import { api } from '@/lib/api';
const results = await api.search.searchOffers({
latitude: 40.7128,
longitude: -74.0060,
radiusKm: 10,
offerType: 'GYM_OFFER',
minRating: 4.0,
page: 0,
size: 20
});// Get presigned URL
const { data } = await api.media.getPresignedUrl('offers', 'jpg');
// Upload to S3
await fetch(data.uploadUrl, {
method: 'PUT',
body: file,
headers: { 'Content-Type': file.type }
});
// Use public URL
const imageUrl = data.publicUrl;- Swagger UI:
http://localhost:8080/swagger-ui/index.html - API Docs:
http://localhost:8080/v3/api-docs
Admin: [email protected] / Password123
Gym Staff: [email protected] / Password123
PT User: [email protected] / Password123
Client: [email protected] / Password123
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
This project is proprietary and confidential.
For questions or issues:
- Check documentation
- Check API docs
- Open an issue on GitHub
Built with β€οΈ by the Easy Body Team